- Production : https://code.travail.gouv.fr
- master (dev) : https://master-code-travail.dev.fabrique.social.gouv.fr
Make sure you're using NodeJS 12+.
# Install all the packages
yarn
yarn build
Note: environment file can be created using scripts/setup-env.js) according to NODE_ENV
, default to dev
Package | description |
---|---|
code-du-travail-api | NodeJS koa API |
code-du-travail-data | Elastic indexing scripts |
code-du-travail-frontend | Next.js frontend application |
react-ui | React components and styleguide |
react-fiches-service-public | React components for fiches service-public.fr |
Run the frontend with our online latest API :
API_URL=https://api-master-code-travail.dev.fabrique.social.gouv.fr/api/v1 yarn workspace @cdt/frontend dev
If you need to work on both frontend and api, don't provide API_URL as it will fallback to http://localhost:1337/api/v1
yarn workspace @cdt/frontend dev
The React components are defined in the react-ui package and showcased here: https://socialgouv-react-ui.netlify.com
To run the NodeJS API, you need an Elasticsearch instance.
The provided docker-compose.yml provide all the environment.
We recommend using the docker-compose.override.dev.yml
config for local development.
Copy/paste and rename the docker-compose.override.dev.yml
to docker-compose.override.yml
(more information on the docker-compose documentation).
cp docker-compose.override.dev.yml docker-compose.override.yml
To fill your ElasticSearch, you'll need to a local cdtn-admin endpoint :
Then you can launch services using docker-compose
# start elasticsearch
docker-compose up elasticsearch
# Launch indexing script : fill ElasticSearch
yarn workspace @cdt/data start:dev
# Start API in dev mode : runs on http://localhost:1337
yarn workspace @cdt/api dev
To launch a local tf-serve instance, you can report to the README of our serving-ml project
You can also read the packages readme
- See code of conduct
- Work on feature branches
- Make conventional commits
-
Issues GitHub : https://github.com/SocialGouv/code-du-travail-numerique/issues
-
nomenclature des labels :
- t :
t
ype of issue - p : name of
p
roduct (we differentiate ES and nav by themes for now) - s :
s
tatus of the issue - o : name of the dedicated t
o
ol
- t :