Skip to content

mwananchi-tech/bunge-hub

Repository files navigation

Bunge Hub

Open-source web platform for exploring Kenya's parliamentary record. Every bill debated, every contribution made, every question raised in the 13th Parliament: structured, searchable, and openly available.

Built on top of odnelazm, which handles scraping, parsing, and ingesting Hansard data from mzalendo.com into a PostgreSQL database. Bunge Hub is the read layer on top of that database: a React Router v7 SSR app that queries it and presents the data.

Stack

Local development

1. Start PostgreSQL

docker run -d \
  --name bunge-hub-db \
  -e POSTGRES_USER=odnelazm \
  -e POSTGRES_PASSWORD=odnelazm \
  -e POSTGRES_DB=odnelazm \
  -p 5432:5432 \
  postgres:16

2. Populate the database

Install odnelazm-pipeline from the odnelazm repository:

cargo install --git https://github.com/mwananchi-tech/odnelazm odnelazm-pipeline

Run the ingest pipeline to fetch the last 3 months of sittings and enrich member profiles:

odnelazm-pipeline ingest \
  --start-date $(date -v-3m +%Y-%m-%d) \
  --enrich-members

See the odnelazm-ingest README for the full reference, including the enrich subcommand for AI-generated summaries.

3. Install dependencies

npm install

4. Configure environment

cp .env.example .env

Set DATABASE_URL to your PostgreSQL connection string:

DATABASE_URL=postgres://odnelazm:odnelazm@localhost:5432/odnelazm

5. Run the dev server

npm run dev

The app will be available at http://localhost:5173.

Other scripts

npm run build       # production build
npm run typecheck   # TypeScript type check
npm run lint        # ESLint
npm run lint:fix    # ESLint with auto-fix
npm run format      # Prettier check
npm run format:fix  # Prettier auto-format

Docker

docker build -t bunge-hub .
docker run -p 3000:3000 -e DATABASE_URL=postgres://... bunge-hub

Contributing

Issues and pull requests are welcome. The project is licensed under the GPL-3.0.

About

Kenya's parliamentary record, open and queryable. Browse bills, debates, and member contributions from Parliament, with full transcripts, bill journey timelines, and committee tracking.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages