docker compose up -d --buildcd api # to go to the api directory
cp .env.example .env # and set your own env variable
make install # for installing hooks and the dependenciesThe api and the ingestion read the same variables and must use the same engine:
| Variable | Value |
|---|---|
SEARCH_ENGINE |
opensearch (default) or elasticsearch |
SEARCH_HOSTNAME |
http://localhost:9201 for the OpenSearch of docker compose up -d opensearch, http://localhost:9202 for docker compose --profile elasticsearch up -d elasticsearch |
SEARCH_CREDENTIALS |
user:password, or the base64 token of it |
ELASTIC_API_KEY still works as the former name of SEARCH_CREDENTIALS: the deployed sealed secrets hold it. The deployed environments set SEARCH_ENGINE: elasticsearch. An index is built for one engine: after switching, run uv run ingest index again.
poetry run api # for launching the API
poetry run pytest # for running the testspoetry run ruff check --fix # for checking and fixing
poetry run ruff format # for formatting
poetry run pyright # for type checking
poetry run pre-commit run --all-files # for running all the checksThe search index is built by the separate ingestion/ project (uv), which publishes the format of the indexed chunks as a JSON schema.
cd ingestion
cp .env.example .env # and set your own env variable
uv sync
uv run ingest fetch legi # snapshot a raw source to S3
uv run ingest index # build the indexcd web # to go to the web directory
cp .env.example .env # and set your own env variablepnpm install --frozen-lockfile # for installing the dependencies
pnpm build # for building the web app
pnpm build:standalone # scripts used for building app for standalone usage
pnpm dev # for running the web app in development mode
pnpm start # for running the web app in production mode
pnpm start:standalone # scripts used for running app for standalone usagepnpm type-check # for type-checking
pnpm lint # for lintingThis repository enforces stricter install policies to reduce supply-chain risk:
- Minimum package age: installs refuse packages published less than 72 hours ago.
- Configured via
minimum-release-age(also applied inweb/.npmrc).
- Configured via
- Trust policy: pnpm will fail if trust evidence is downgraded.
- Configured via
trust-policy.
- Configured via
- Dependency build scripts are blocked by default and must be explicitly approved.
- Configured via
strict-dep-builds. - Approvals are recorded in
web/pnpm-workspace.yamlunderonlyBuiltDependencies.
- Configured via
| Type de document | Nombre |
|---|---|
| Code du travail | 11,313 |
| Contributions | 2,016 |
| Information | 52 |
| Ministère du Travail | 1,416 |
| service-public.fr | 527 |