Partijgedrag is a web application that provides insight into the voting behavior of political parties in the Dutch parliament. It was originally created by Elwin Oost and later rebuilt in TypeScript.
This repository is a monorepo containing three main components:
app/: The web application, split into a frontend and a backend.frontend/: A React/TypeScript frontend built with Vite.backend/: A Node.js/TypeScript backend using Express, node-pg and SafeQL.
etl/: A Go application responsible for extracting, transforming, and loading the voting data into the database.docker-compose.yml: Defines the services for the application, which for now is only the PostgreSQL database.
The application requires a PostgreSQL database. You can start one using Docker Compose:
docker compose up -dor Podman
podman compose up -dThis will start a PostgreSQL server and expose it on port 5432.
The etl service fetches and processes parliamentary data.
- Navigate to the ETL directory:
cd etl - On the first run, seed the database:
go run cmd/manage_categories/main.go --action=seed
- Run the ETL process:
go run cmd/etl/main.go
The app is split into a backend and a frontend, which are separately for development.
- Navigate to the app directory:
cd app - Install dependencies:
npm install
- Set up your environment variables:
cd backend; cp .env.example .env; cd ../frontend; cp .env.example .env; cd ..
Ensure the
DATABASE_URLin the new.envfile is correctly configured for your environment.
-
Start the app server:
cd -; npm run dev
The backend will be running on
http://localhost:3001.The frontend will be accessible at
http://localhost:3000.
This project uses open data provided by the Tweede Kamer der Staten-Generaal (Dutch House of Representatives). For more information about the data sources and API documentation, visit https://opendata.tweedekamer.nl.



