Table of Content
Project Info
The platform is our contribution to democratizing access to political debates and issues.
Open Discourse is a non-profit project of the employees of Limebit GmbH. The idea emerged from the skills and motivations of the employees, in break conversations and from the common ideas of democracy.
We hope that through our preliminary work, data-based journalism, science and civil society will benefit and that the facilitated access to data will encourage to analyze the political history of the Bundestag based on the language used by politicians.
Repository Structure
This Repo is structured in three different parts.
- database:
- Docker-Container for the Postgres Database
- Contains Scripts that update the Database
- frontend:
- Frontend for the Full Text Search
- proxy:
- Docker-Container for the Proxy, which protects the database
- python:
- Includes every python script in different subsections, sorted by execution order
Docker Setup
For a quick setup using Docker, please read the DOCKER_SETUP
Local Setup
Required software: python3, yarn, docker-compose, node version 12 - ideally installed via node version manager (nvm)
- run
yarn
in following directories:database
frontend
- run
sh setup.sh
in thepython
directory - run
docker-compose build
in theroot
folder
Start the Database
These steps will guide you through starting the Database
Database: Normal Start
You can easily start the Database via docker-compose.
// run from repository root
docker-compose up -d database
Database: Initial Start / Reset
For the initial start of the Database, you will also need to upload the schema.
// run from database folder
yarn run db:update:local
Generate Data
Generate the OpenDiscourse-Database from the ground up. The Database has to be started for this script to finish.
This script is just a pipeline executing all scripts in src
. You can also manually run every script seperatly. For Documentation on this, please visit the README in src
// run from python folder
sh build.sh
Start the Full Text Search
Note: All of the previous steps have to be completed at least once for the Full Text Search to work properly.
If you want to setup the Full Text Search, follow these steps:
- run
yarn
in following directories:frontend
proxy
Choose one of the following ways to start the Frontend:
Run Frontend with Docker
- run
docker-compose up -d
in theroot
folder
Run Frontend locally
- run
docker-compose up -d database proxy
in theroot
folder - run
yarn dev
in thefrontend
folder
Further Documentation
- Documentation of the database can be found in the README in database
- Documentation of the frontend can be found in the README in frontend
- Documentation of the proxy can be found in the README in proxy
- Documentation of the python service can be found in the README in python
- Documentation of every python-script can be found in the README in python/src
Notes
- We use Python 3.7.4 during development of the project
- The graphql endpoint was deprecated and removed by version 1.1.0