This application serves the data from the MySQL database built with the scraper.
- Install the development environment :
- Install Node.js
- Install [npm5](https://www.npmjs.com/package/npm5
- Install sails :
npm install -g sails
-
Clone the repository:
git clone <URL>
-
Install the project dependencies:
npm install
-
Launch the scraper :
sails lift
/!\ If you are running the scraper at the same time, make sure to launch this app on another port : sails lift --port 1328
for example.
-
This project uses Firebase for push notifications. See Firebase section below to configure project.
-
This project uses reverse geocoding APIs. Mostly data.gouv.fr, and sometimes Google Maps API (when we couldn't get results with
data.gouv.fr
). See Google Maps API section below to configure project.
This project uses Firebase. It sends push notifications:
- when a deputy has a new work (written question, law proposal)
- when new ballots occur : they are summed up in a single daily notification
You should register your own Firebase account and generate firebase_service_account.json
file if you want to use push notifications. We use two Firebase projects : one for the development environment and one for production.
So, the existing configuration use two firebase_service_account.json
files. You can store them in the config
folder and add a reference in the config/env/production.js
and config/env/development.js
files together with the server key:
```shell
firebase: {
configFile: 'firebase_service_account.json',
serverKey: 'AAAA.....dkjkf',
}
```
This project uses Google Maps API for reverse geocoding, when data.gouv.fr don't give us results.
If you want to keep it, you should get your own api key
from Google. You can store it in config/env/production.js
and config/env/development.js
.
shell gmap: { key: 'AI...xxxx' },
Pull request are more than welcome ! If you want to do it, use a feature branch and please make sure to use a descriptive title and description for your pull request.
The project uses unit tests. You must update them depending on your changes in the code. All unit tests should pass after your pull request.
Direct Assemblée api is under the AGPLv3.
See LICENSE for more license info.
For any question or if you need help, you can send contact us at contact@direct-assemblee.org.