An app + a web component + a dataset to help french entreprises finding public aid programs for their ecological transition.
A project from the transition-ecologique-entreprises
SE team.
- NodeJS (v18)
- Back: Express (v4)
- tsoa (v5)
- Front: VueJS (v3)
- Design system: DSFR
- Vue-dsfr:
- https://github.com/dnum-mi/vue-dsfr/tree/main
- https://vue-dsfr.netlify.app/ (doc complete en cours de migration)
- https://docs.vue-ds.fr/ (nouvelle doc en cours de rédaction)
- Vue-dsfr:
- Design system: DSFR
This repository is a monorepo, based on npm workspaces composed of two workspaces:
- the "web" workspace contains the front-end implementations.
- the "backend" workspace contains the back-end implementations.
- the "data" workspace contains the datasets and common files for datasets builds.
The runtime is Node 18.x for this application.
You can use nvm to install this specific version.
# from the root folder of the project
nvm install
nvm use
Some environment variables are needed for the services to work. Copy and modify the .env.example
file from the folders (back
/data
/web
) you want to build/start to .env
in the same directory.
If you want to run the project locally and quickly, you can use the following commands:
# from the root folder of the project
npm install
npm run start-all
- Go to http://localhost:4242/ to access the front-end
Use the following commands to build the project:
# All workspaces
npm run build
# Or for a specific workspace
npm run build-front # web
npm run build-back # backend
# Or alternatively
npm run build -w packages/web
npm run build -w packages/backend
Use the following commands to start the project:
# All workspaces
npm run start-all
# Or for a specific workspace
# Front-end
npm run start-front
# Back-end
npm run start-back
# Or alternatively
PORT=4242 npm run start --workspace packages/web
npm run start --workspace packages/backend
To run the project in development mode, use the following commands:
# All workspaces
npm run dev
# Or for a specific workspace
# Front-end
npm run dev-front
# Back-end
npm run dev-back
# Or alternatively
npm run dev --workspace packages/web
npm run dev --workspace packages/backend
- Linting is done with eslint and type check with
tsc
orvue-tsc
(typescript compiler).
npm run lint
# With fix
npm run lint:fix
# Type check on web workspace
npm run vue:type:check
- Lint sass files with stylelint
npm run lint:sass
# With fix
npm run lint:sass:fix
-
Jetbrains
https://www.jetbrains.com/help/webstorm/using-stylelint-code-quality-tool.html -
Vsode
https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint
# This script builds the front
# and previews the produced index.html file from the dist folder
# on http://localhost:4242
npm run dev:build:start
More scripts are defined for each workspace: checkout their respective documentation and package.json
file.
- backend: README / package.json
- data: README / package.json
- web: README / package.json
Scripts can be triggered with:
npm run <script-name> -w packages/<workspace-name>
Source program data are stored as YAML files, we use JSON Schema to validate every file.
The validations are triggered by Github CI on each pull request on preprod and main branches.
To run the validation tests manually, run:
npm run test-data -w packages/backend
We use scalingo manifest json to deploy the app on scalingo with specific environment variables. see scalingo manifest for more details.
- Team
- Product owner: Jean-Baptiste Le Dévéhat
- Coaching: Julien Rayneau
- Designers: Coline Lebaratoux
- Business Developers:
- Céline Bagault
- Manon Piffault
- Rodolphe GAGETTA
- Maintainers - Developers:
- Old team members:
- Pierre Camilleri (Maintainer - Developer)
- Julien Paris (Maintainer - Developer)