Source repo for giessdenkiez.de project by Technologiestiftung Berlin and CityLAB Berlin.
This is a short list of the things that are needed for running this project yourselves.
- Netlify.com for hosting
- vercel.com for serverless functions to interact with the database
- AWS RDS Postgres
- auth0.com + vercel.com for user management
- AWS Fargate python script in docker for rain data aggreagation from Deutsche Wetterdientst (DWD) + Mapbox API for creating vector tiles for mobile
These are the related repos:
- React frontend (this is here)
- vercel.com DB API
- vercel.com Auth0 API (currently only for username and user deletion)
- AWS Fargate Service for DWD rain data and Mapbox API vector tiles
Below is a rough sketch of the architecture:
Duplicate the .env.sample
file, rename it .env
and adapt the values to your needs.
Set the environment variable BUILD_TARGET
in the netlify.toml
, in your .env
file, in the build contexts or via the npm-scripts. You can use this to build the demo mode.
Make sure to set your NODE_ENV
to either test
, development
or production
Start the project via
npm start
To deploy the frontend we use netlify.com
Take a look at the netlify.toml
for the the used commands to deploy it. Make sure to set all the variables you have in your .env
file in the environment section of your projects build & deploy settings.
The purpose of the demo mode (created if you set the env variable BUILD_TARGET=DEMO
) is to run this application in the exhibition of the CityLAB Berlin. In this mode all requests to the api get mocked responses except for the get tree by id and get all trees. It uses the msw (Mock Service Worker) module underneath to handle API requests and does a module replacement for the auth0-spa-js library wrapper with webpack.
To start the DEMO mode run.
npm run demo