add code structure to README

This commit is contained in:
Son NK 2019-12-19 23:36:37 +02:00
parent 4147e19530
commit ed5496024d

View file

@ -420,6 +420,22 @@ Generate the migration script and make sure to review it before commit it. Somet
> flask db migrate
### Code structure
The repo consists of 3 entry points:
- wsgi.py and server.py: the webapp.
- email_handler.py: the email handler.
- cron.py: the cronjob.
Here are a small sum-ups of the directory structure and their roles:
- app/: main Flask app. It is divided into different packages that represents different features like oauth, api, dashboard, etc.
- local_data/: contain files that are there to facilitate local development. They are replaced during the deployment.
- migrations/: generated by flask-migrate. Edit these files only when you spot (very rare) errors on database migration files.
- static/: files available at `/static` url.
- templates/: contain both html and email templates.
- tests/: tests. We don't really distinguish unit, functional or integration test. A test is simply here to make sure a feature works correctly.
### OAuth flow