Our participation in the Open Climate Collabathon, 16-17 nov 2019. Our prompt was "Subnational Carbon Budget Assessments"
We decided to separate Backend and Frontend, using two servers communicating through APIs. This configuration allows us to work separately on both architecture sides, in case we want to improve or change the stack of one of them.
This structure with APIs from the backend is also in the spirit of the Collabathon. In deed, on the long term, data generated by the model could be accessible through APIs for other projects.
GitHub - 42-AI/open_climate_collabathon at dev
Backend Installation | Django API
Python3 and pip3 required
Go to /dev_django
$ pip install -r requirements.txt
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver
and go to 127.0.0.1:8000 in your browser to test it localy
To use another IP address and serve on your network, simply add it to ALLOWED_HOSTS in settings.py and run with:
$ python manage.py runserver IP
Frontend Installation | React app
nodeJS and npm required
Go to /dev_react
$ npm start
and go to 127.0.0.1:8080 in your browser to test it localy