This project is created by DCB and aims to facilitate the creation of community maps by and for Romanian diaspora communities across the globe.
The Map Kit allows members of these communities to create their own map based application to manage and share POIs around a certain region. Its goal is to provide clear information on places of interest and services in demand among the Romanian diaspora in the city and its surroundings.
- Clone the repo
- Create Docker containers
docker compose up
Endpoints are reachable on port 8000.
Will be injected per script with the following info:
user: god password: god email: god@dcb.berlin
Log into the admin panel with those credentials.
When you create a new username (google login, Auth0), make sure you set it to 'approved' in Django's admin section, otherwise none of the api endpoints that require a jwt token (i.e. /my-communities/*) will work.
Run
docker exec -t map-kit-api python src/manage.py loaddata src/locations/fixtures/*
We use token based auth and authenticate users with OIDC via Auth0.
The backend just uses tokens that it receives, it does not do anything else (issuing, refreshing tokens etc.). The frontend will have to prompt the user to start the social login flow via Auth0, get a token, and then use that token in any subsequent requests to the backend.
We use Auth0 because it makes managing multiple authentication providers (Google, Facebook etc.) much easier. We can add new ones or remove one without touching the application configuration.
- Adjust Auth0 variables (prefixed
OIDC_
) in .env. - Use an exising Mapbox token or create a new one, and add it as
MAPBOX_TOKEN
to .env. - Build your containers again.
TODO
- Expand this section.
docker exec -it map-kit-api pytest src/tests/
You can still profit from full interactivity with the debugger in this testing setup, if needed.
docker exec -it map-kit-api black src
In the future we will add pre-commit hooks to simplify this.
Problem Admin and working user are the same.
Solution Remove the user and registering it again. The 2 users with the same email will be merged.