A tool to visualize and inform citizens of Berlin about governmental decisions.
You want to help? Awesome. Scroll through the issues, open a new one, or just send a short notice to mail@hierbautberlin.de. We are happy about every person who wants to help.
HierBautBerlin uses Elixir and Phoenix. Information on how to install Elixir can be found here.
As database it uses PostgreSQL with the PostGIS extension. If you don't want to install PostGIS locally, you can run it in a container:
podman run -d --name hierbautberlin-db -e POSTGRES_PASSWORD=postgres -p 5434:5432 docker.io/postgis/postgis:17-3.5
export DATABASE_PORT=5434The importers need qpdf, pdftotext (poppler-utils) and dumppdf.py (pip install pdfminer.six).
Assets are built with esbuild and dart-sass (installed by mix), JavaScript
dependencies are installed with npm (Node.js 22+). Common tasks are run with
just (just lists all recipes).
After you installed everything, the setup is as follows:
just update
just setup
just startThe app runs on http://localhost:4000, sent emails show up in http://localhost:4000/dev/mailbox.
Before you contribute code, please make sure to read the CONTRIBUTING.md
just checkYou can also run the ExUnit tests in watch mode with:
just run-testsThe text analysis (finding streets, addresses and places in news) and the map need the streets, street numbers and places of Berlin. They are imported from OpenStreetMap (streets, addresses, parks) and from gdi.berlin.de (LOR planning areas, schools):
just import-geoIt downloads the OSM extract of Berlin (~100 MB) and needs ogr2ogr (Debian:
gdal-bin). A full import takes about a minute. Running it again updates the
data; ids and links to news items are kept. In the Docker container use
bin/import_geo_objects.sh --release.
After the address matching or the geo data changed, the links of existing news
can be updated. Without --apply it only shows what would change:
just reanalyze BERLIN_AMTSBLATT
just reanalyze BERLIN_PRESSE --since 2026-01-01 --applyThe list next to the map is sorted by relevance (see
lib/hierbautberlin/geo_data/relevance.ex). After changing those rules, calculate
it again for all news items with mix geo.relevance.
just restore-dump dump.sql hierbautberlin_prod # creates the database
export DATABASE_NAME=hierbautberlin_prod
mix ecto.migrate
mix geo.relevance
just import-geo
just startCopy the production file storage into file_storage/ to see the Amtsblatt PDFs.
The app runs as Docker image built from the Dockerfile (e.g. with Coolify). The
container runs the web server and the importers, so run only one instance. The
migrations run on every start.
It needs Postgres with PostGIS and these environment variables:
| Variable | |
|---|---|
DATABASE_URL |
required, e.g. ecto://user:password@host/database |
SECRET_KEY_BASE |
required, mix phx.gen.secret |
PHX_HOST |
the domain, default hierbautberlin.de |
MAILGUN_API, MAILGUN_DOMAIN |
sending emails |
BUGSNAG_API |
optional, error reporting |
PLAUSIBLE_SCRIPT_ID |
optional, empty disables the visitor statistics |
POOL_SIZE, PORT |
optional, default 10 and 4000 |
The Amtsblatt PDFs, the import folder and the OSM download are stored in
/app/data, mount a volume there.
This project is funded by the German Federal Ministry of Education and Research and is part of the 9th batch of the prototype fund.

