Integreat - The mobile guide for newcomers. Multilingual. Offline. Open Source.
This content management system helps local integration experts to provide multilingual information for newcomers.
This section provides a brief overview of setting up the development environment. We support various environments: you can set up everything locally using your preferred package manager, use it as a devcontainer, or utilize the nix-flake (coming soon). Please clone the repository with the following snippet before starting to setup your development environment.
git clone git@github.com:digitalfabrik/integreat-cms.git
cd integreat-cms
To configure your development environment on your system, please follow these steps carefully.
- Ensure that the following packages are installed alongside your preferred IDE:
npm
version 7 or laternodejs
version 18 or laterpython3
version 3.11 or laterpython3-pip
(Debian-based distributions) /python-pip
(Arch-based distributions)python3-venv
(only on Debian-based distributions)gettext
for translation features- Either
postgresql
ordocker
to run a local database server
- Execute
tools/install.sh
to download all dependencies. - Execute
tools/migrate.sh
to apply all database schema migrations. - Optionally, run
tools/loadtestdata.sh
to apply a predefined set of test data.
To configure your development container, please follow these steps carefully.
- Make sure you have Docker and VSCode (not VSCodium) installed on your machine.
- Open the project in VSCode.
- If you're opening VSCode for the first time, you'll be prompted to install the "Dev Containers" extension. Click "Install" to proceed.
- Open the command palette (Ctrl + Shift + P or Cmd + Shift + P on macOS) and search for "> Remote-Containers: Open Folder in Container".
- VSCode will open the project in a new container, install all further required tools and load the testdata.
The perfect is the enemy of the good; thus, this section illuminates aspects of our evolving development setup.
A known limitation exists where certain versions of Visual Studio Code (VSCode) may not copy the user's .gitconfig
file correctly into the Devcontainer environment. In such cases, when you attempt to commit changes within the Devcontainer, you may be prompted to enter your Git username and email every time. This can be inconvenient and disrupt the workflow. However, there is a workaround for this issue. You can resolve it by appending the content of your personal .gitconfig
file, located at $HOME/.gitconfig
, to the end of the repository-specific .git/config
file, which in this case would be integreat-cms/.git/config
. By doing so, you ensure that the necessary Git configuration settings are correctly applied within the Devcontainer environment, allowing for a smoother development experience.
For more information, refer to this issue in the VSCode Remote Extension repository.
Testing is not yet fully integrated into our Visual Studio Code Container, but we provide convenient task definitions to facilitate testing. For example, you can simply type task current python test
and hit enter to run the current Python test file. Take a look at the .vscode/tasks.json
for more helpful tasks and extend this file as needed.
The user must be in the docker group on linux, VSCode does not allow to optionally enter sudo password.
Run the development server using /tools/run.sh
, then open your browser and go to http://localhost:8000
. The default login credentials are username: "root" and password: "root1234".
For detailed instructions, tutorials and the source code reference have a look at our great documentation:
📓 https://digitalfabrik.github.io/integreat-cms/
Alternatively, you can generate it yourself using the tools/make_docs.sh
script.
- Integreat CMS: The main package of the integreat-cms with the following sub-packages:
- API: This app provides wrapper functions around all API routes and classes mapping the cms models to API JSON responses.
- CMS: This app contains all database models, views, forms and templates forming the content management system for backend users.
- Core: This is the project’s main app which contains all configuration files.
- Firebase API: This app provides wrapper functions around the Firebase API to send push notifications.
- GVZ API: This app provides wrapper functions around our Gemeindeverzeichnis API to automatically import coordinates and region aliases.
- Nominatim API: This app provides wrapper functions around our Nominatim API to automatically import region bounding boxes.
- Sitemap: This app dynamically generates a sitemap.xml for the webapp.
- SUMM.AI API: This app provides wrapper functions around the SUMM.AI API for automatic translations into Easy German.
- XLIFF: This app allows (de-)serialization of translations from/to XLIFF (XML Localization Interchange File Format) for standardised exchange with translation agencies.
- Tests: This app contains all tests to verify integreat-cms works as intended
To better understand the overall intention it might also be helpful to look at the wiki for municipalities (GER) that teaches how to use our CMS.
Copyright © 2018 Tür an Tür - Digitalfabrik gGmbH and individual contributors. All rights reserved.
This project is licensed under the Apache 2.0 License, see LICENSE and NOTICE.md.