mein.berlin is a participation platform for the city of Berlin, Germany. It is based on adhocracy 4.
- Node.js (+ npm)
- Python 3.x (+ venv + pip)
- libmagic
- libjpeg
- libpq (only if PostgreSQL is used)
- GDAL
- SpatiaLite with JSON1 enabled (only if SpatiaLite is used for local development)
- Redis (required in production, optional for development)
Note: If you are on macOS, you need GNU sed installed for the following steps to work:
brew install gnu-sed
sudo apt update && sudo apt install -y libsqlite3-mod-spatialite
brew update
brew install spatialite-tools
brew install gdal
For GeoDjango to be able to find the SpatiaLite library, add the following to your local.py:
SPATIALITE_LIBRARY_PATH = "/usr/local/lib/mod_spatialite.dylib"
If you are using pyenv, you need to create your venv with the following command:
PYTHON_CONFIGURE_OPTS="--enable-loadable-sqlite-extensions" pyenv install 3.12.9 (with your version)
git clone https://github.com/liqd/a4-meinberlin.git
cd a4-meinberlin
make install
make fixtures
make watch
If you need to test with PostgreSQL instead of SpatiaLite, run:
make postgres-create
To start the test server with PostgreSQL:
export DATABASE=postgresql
make postgres-start
make watch
To remove the Python virtual environment and npm modules:
make clean
If your virtual environment is located outside the project, uninstall Python packages manually:
pip uninstall -r requirements/dev.txt
If you need to do testing with a proper celery setup.
For celery to register and run tasks you need to make sure that:
- the redis server is running
- the celery config parameter "always eager" is disabled (add
CELERY_TASK_ALWAYS_EAGER = Falseto yourlocal.py)
To start a celery worker in the foreground, run:
make celery-worker-start
Stop celery with ctr+C
To inspect all registered tasks, list the running worker nodes, run:
make celery-worker-status
To send a dummy task to the queue and report the result, run:
make celery-worker-dummy-task
See more info about Celery in the docs
If you need to do testing with periodical task working.
For celery to run scheduled tasks you need to make sure that:
- the redis server is running
- the celery worker is running (see previous step)
To start celery beat in the foreground, run:
make celery-beat
Stop celery beat with ctr+C
To add scheduled tasks (same for all environments) check the docs
In case of settings.TIME_ZONE change, tasks need to be synced with the new time. See HOWTO
Berlin.de base styles for the public site are vendored as meinberlin/assets/berlin_css/berlin_marketing.scss (from berlin.de/i9f/r1/bundle/berlin_marketing.css) and imported via style_user_facing.scss.
For style-guide alignment with the Vertical Participation design system (designsystem.berlin.de), we merge in only the relevant rules and tokens via meinBerlin SCSS overrides — we do not replace the marketing bundle wholesale.
Merged from participation (via overrides):
| Change | Override location |
|---|---|
Primary green #439c76 ($primary, $panel-colored) |
styles_user_facing/variables/_colors.scss |
.panel--colored background |
components_user_facing/_service-panel.scss |
.text--color-primary |
styles_user_facing/_utility.scss |
| Search submit arrow colour | components_user_facing/_searchform-slot.scss |
Topic pills (pill--topic) |
components_user_facing/_pill.scss |
meinBerlin-only layout fixes (not in either vendor bundle): teaser blocks, hero, accordion, content footer — see components_user_facing/ and changelog/style-guide-alignment.md.
Updating vendor CSS (before releases):
- Download
berlin_marketing.cssfrom berlin.de; update paths inberlin_marketing.scssas noted in the file header. - When the participation style guide changes, diff
berlin_participation.cssagainst marketing and port only what meinBerlin still needs into the override files above. - Run
npm run buildand regression-test key pages.
Font Awesome and berlin_marketing.js are still loaded from berlin.de separately (base.html). Until upstream versions are pinned, update vendor CSS only before releases — breaking changes are not always announced.