Le registre de preuve de covoiturage est un projet beta.gouv.fr qui a pour but de certifier qu'un covoiturage a bien eu lieu. L'objectif de l'outil est d'agir en tant que tiers de confiance entre les différents acteurs du covoiturage (opérateurs, autorités organisatrices de mobilité, entreprises, régions, etc.) pour simplifier la mise en place d'incitations à destination des covoitureuses et covoitureurs. Cette Startup d'État a pour objectif d'aider à réduire l'auto-solisme et l'emprunte écologique des déplacements courts.
- Plus d'informations sur le Registre de preuve de covoiturage
- Application territoire/opérateurs
- Documentation générale
- Documentation technique
- Statistiques publiques
- Metabase
- Grafana
- Page de statut des services
- Dépôt de l'application (monorepo)
- Dépôt de l'infrastructure
- Dépôt de l'observatoire (obsolète)
Services
An easy way to boot the application on your local machine is by using Docker.
You will need docker
and docker-compose
.
Service | slug | ENV | URL | Folder |
---|---|---|---|---|
Frontend * | - |
APP_APP_URL | http://localhost:4200 | /dashboard |
API | api |
APP_API_URL | http://localhost:8080 | /api |
Redis | redis |
APP_REDIS_URL | redis://redis:6379 | - |
Postgres | postgres |
APP_POSTGRES_URL | postgresql://postgres:post | - |
Mailhog | mailer |
APP_MAIL_SMTP_URL | http://localhost:8025 | - |
S3 | s3 |
AWS_* | http://localhost:9000 | - |
⚠️ docker-compose.yml
is used inlocal
environment only
Installation
- Cloner le repo et
cd
dedans cp api/.env.example api/.env
- Modifier
api/.env
docker-compose build
./rebuild.sh
docker-compose run --rm migrator npm run migrate
terminal 1: docker-compose up api
terminal 2: docker-compose up dashboard
# nav to http://localhost:4200
Migrations
// use SKIP_GEO_MIGRATIONS=true to skip geo migrations
// use SKIP_SQL_MIGRATIONS=true to skip sql migrations
cd api
npm run migrate
// OR
docker-compose run api npm run migrate
Frontend testing
# default browser is Chrome
npm run test
npm run test --browsers ChromeHeadless
CHROME_BIN=$(which chrome) npm run test
CHROME_BIN=$(which chromium) npm run test
CHROME_BIN=$(which brave-browser) npm run test
# requires karma-firefox-launcher (installed)
npm run test --browsers Firefox
End-to-end testing
# standalone e2e (running in CI)
./tool.sh e2e
# local e2e
./tool.sh bootstrap
./tool.sh local_e2e
Notes
- You can monitor your development inbox at http://localhost:8025. Emails are usually cleared in the tests.
- Tests are not stateless yet. You might need to clean up data manually when they crash.
Configuration
Secrets configuration
For all secrets, use the .env
file which is NOT COMMITED to Git.
For none secret values configuring the system, commit the ENV vars in docker-compose.yml
For static application configuration (timeout, etc.) edit/add the .ts
files in each service config/
folder.
Versions
The project follows the semver specification.
License
DINUM, 2017-2023.
The source code is published under Apache license 2.0.