### Install Dependencies and Run Dev Server Source: https://github.com/betagouv/mon-entreprise/blob/master/site/README.md Install JavaScript dependencies using Yarn, optionally fetch API data, and start the development server. ```sh yarn install yarn postinstall yarn start ``` -------------------------------- ### Start API Server Source: https://context7.com/betagouv/mon-entreprise/llms.txt Start the API server for development with automatic reloading or in production mode. Redis URL is optional for caching and rate-limiting. ```bash # Développement (rechargement automatique) yarn workspace api start # Production NODE_ENV=production SCALINGO_REDIS_URL=redis://... yarn workspace api start:prod ``` -------------------------------- ### Installer le paquet publicodes et modele-social Source: https://github.com/betagouv/mon-entreprise/blob/master/modele-social/README.md Utilisez npm pour installer les dépendances nécessaires. ```bash npm install publicodes modele-social ``` -------------------------------- ### Start mon-entreprise development server Source: https://github.com/betagouv/mon-entreprise/blob/master/modele-as/CONTRIBUTING.md Run this command to start the development server for modele-as and mon-entreprise. Rules will update automatically and the site will reload on changes. ```sh yarn start ``` -------------------------------- ### Get OpenAPI schema for the API Source: https://context7.com/betagouv/mon-entreprise/llms.txt Download the complete OpenAPI 3.0 schema for the Mon-entreprise API using GET /api/v1/openapi.json. This merges definitions from '@publicodes/rest-api' with custom examples and metadata. ```bash curl -s https://mon-entreprise.urssaf.fr/api/v1/openapi.json | jq '.info, .paths | keys' ``` ```bash # Télécharger et explorer localement curl -o openapi.json https://mon-entreprise.urssaf.fr/api/v1/openapi.json ``` -------------------------------- ### Build and Preview Application Locally Source: https://github.com/betagouv/mon-entreprise/blob/master/site/README.md These commands allow you to simulate the application's behavior after a full build, including static pre-rendering and Netlify redirects. Use `yarn preview:en` for the English version. ```sh yarn run build:preview ``` ```sh yarn preview ``` ```sh # pour la version anglaise yarn preview:en ``` -------------------------------- ### Get OpenAPI Specification Source: https://context7.com/betagouv/mon-entreprise/llms.txt Returns the complete OpenAPI 3.0 schema of the API, merging definitions from `@publicodes/rest-api` with custom examples and metadata from `mon-entreprise`. ```APIDOC ## GET /api/v1/openapi.json ### Description Retourne le schéma OpenAPI 3.0 complet de l'API, fusionnant les définitions de `@publicodes/rest-api` avec les exemples et métadonnées personnalisés de `mon-entreprise`. ### Method GET ### Endpoint /api/v1/openapi.json ### Request Example ```bash curl -s https://mon-entreprise.urssaf.fr/api/v1/openapi.json | jq '.info, .paths | keys' ``` ### Response #### Success Response (200) - **info** (object) - API information including title, version, and description. - **paths** (object) - An object containing the API paths and their operations. #### Response Example ```json { "title": "Mon-entreprise API", "version": "v1", "description": "..." } [ "/evaluate", "/rules", "/rules/{rule}" ] ``` ```