{"id":19019856,"url":"https://github.com/catalalang/catala-dsfr","last_synced_at":"2026-03-19T07:42:04.723Z","repository":{"id":166998151,"uuid":"596977748","full_name":"CatalaLang/catala-dsfr","owner":"CatalaLang","description":"Web prototype for automated generation of individual explanations from Catala programs","archived":false,"fork":false,"pushed_at":"2024-06-21T17:06:57.000Z","size":2681,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-27T00:23:01.567Z","etag":null,"topics":["catala","dsfr","french-benefits","react-dsfr","rescript","rescript-bindings","rescript-react","simulator"],"latest_commit_sha":null,"homepage":"https://code.gouv.fr/demos/catala","language":"ReScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CatalaLang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-03T10:56:26.000Z","updated_at":"2024-06-21T17:07:01.000Z","dependencies_parsed_at":"2023-11-08T10:42:15.763Z","dependency_job_id":"7a1e0f9d-037e-4e8a-8efa-0f1b4d996beb","html_url":"https://github.com/CatalaLang/catala-dsfr","commit_stats":null,"previous_names":["catalalang/catala-dsfr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CatalaLang/catala-dsfr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalaLang%2Fcatala-dsfr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalaLang%2Fcatala-dsfr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalaLang%2Fcatala-dsfr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalaLang%2Fcatala-dsfr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CatalaLang","download_url":"https://codeload.github.com/CatalaLang/catala-dsfr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalaLang%2Fcatala-dsfr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29948860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["catala","dsfr","french-benefits","react-dsfr","rescript","rescript-bindings","rescript-react","simulator"],"created_at":"2024-11-08T20:14:45.973Z","updated_at":"2026-02-28T19:31:36.211Z","avatar_url":"https://github.com/CatalaLang.png","language":"ReScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003e\n\t\u003cbig\u003eCatala DFSR\u003c/big\u003e\n  \u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n   \u003ca href=\"https://github.com/CatalaLang/catala-dsfr/issues\"\u003eReport Bug\u003c/a\u003e\n   •\n   \u003ca href=\"https://code.gouv.fr/fr/explicabilite/catala/\"\u003eWebsite\u003c/a\u003e\n  \u003c/p\u003e\n\nSource code for the web demo about automated generation of individual\nexplanations of [Catala](https://catala-lang.org) programs hosted at\n[https://code.gouv.fr/demos/catala](https://code.gouv.fr/demos/catala/).\n\n\u003c/div\u003e\n\n---\n\nThis project is built on top of the following libraries:\n\n- [`@catala-lang/french-law`](https://github.com/CatalaLang/catala/tree/master/french_law/js)\n- [`@catala-lang/rescript-catala`](https://github.com/CatalaLang/catala/tree/master/runtimes/rescript)\n- [`@catala-lang/catala-explain`](https://github.com/CatalaLang/catala-explain)\n- [`@catala-lang/catala-web-assets`](https://github.com/CatalaLang/catala-web-assets)\n- [`@codegouvfr/rescript-react-dsfr`](https://github.com/codegouvfr/rescript-react-dsfr)\n- [`@codegouvfr/react-dsfr`](https://github.com/codegouvfr/react-dsfr)\n\n## Local dev\n\n```\n# Install dependencies\nyarn\n\n# Start a local dev server\nyarn dev\n```\n\n\u003e [!WARNING]\n\u003e When adding modifications to the Rescript files, if you start seeing errors\n\u003e like that in your `yarn dev` output:\n\u003e\n\u003e ```\n\u003e 14:28:30 [vite] hmr invalidate /src/components/Form.bs.js Could not Fast Refresh.\n\u003e ```\n\u003e \n\u003e That means that the fast reload isn't working properly. To avoid that, each\n\u003e ReScript file must export only one React component. You can hide internal\n\u003e code by providing an interface file that only exports the component you want\n\u003e to use.\n\u003e\n\u003e Generally, you should always have an inteface file (`.resi`) for each\n\u003e implementation file (`.res`) to [speed up incremental\n\u003e build](https://rescript-lang.org/docs/manual/latest/build-performance#speed-up-incremental-build).\n\n### Using local packages\n\nIf you want to use one of the `@catala-lang` packages from your local machine\ninstead of the published version, you can use `yarn link` to link them to this\nproject.\n\n```\n# In the library you want to link\nyarn link\n\n# In this project\nyarn link @catala-lang/\u003clibrary-name\u003e\n```\n\u003e [!IMPORTANT]\n\u003e But then some shenanigans will appear. First, there might be duplicate\n\u003e dependencies between `catala-dsfr` and the linked dependencies. These duplicates\n\u003e will show as error messages so you know which they are. To remove the dependency\n\u003e duplication, you should link the version of the duplicate dependency in\n\u003e `catala-dsfr/node_modules/\u003cduplicate-library-name\u003e` and make sure\n\u003e `@catala-lang/\u003clibrary-name\u003e` uses it with `yarn link \u003cduplicate-library-name\u003e`\n\u003e in the local folder of `@catala-lang/\u003clibrary-name\u003e`.\n\u003e\n\u003e Now that the links are OK, you have to tell `vite` to watch for the changes in\n\u003e the dependencies to have reloading work. For that, follow the instructions to\n\u003e modify `vite.config.ts` in `catala-dsfr`\n\u003e [here](https://vitejs.dev/config/server-options.html#server-watch). At last,\n\u003e don't forget to run `yarn watch` in the local folder of\n\u003e `@catala-lang/\u003clibrary-name\u003e`, so that the modifications in the Rescript files\n\u003e are watched and compiled to modifications to JS files that `vite` can pick up.\n\n## Versioned assets\n\nMultiple versions of\n[@catala-lang/catala-web-assets](https://github.com/CatalaLang/catala-web-assets)\nand [@catala-lang/french-law](https://github.com/CatalaLang/french-law) are\nused in this project.\n\nIn the `assets-versions.json` file is defined the list of versions available.\nEach version is defined by a pair of versions for each package (one for the web\nassets and one for the french law library) and named with the corresponding\ndate.\n\n### To add a new version\n\nTo add a new version of the assets, you need to use the [yarn\naliases](https://classic.yarnpkg.com/en/docs/cli/add#toc-yarn-add-alias):\n\n```bash\n# For @catala-lang/catala-web-assets\nyarn add @catala-lang/catala-web-assets-\u003clatest-version\u003e@npm:@catala-lang/catala-web-assets@\u003clatest-version\u003e\n\n# For @catala-lang/french-law\nyarn add @catala-lang/french-law-\u003clatest-version\u003e@npm:@catala-lang/french-law@\u003clatest-version\u003e\n```\n\n\u003e [!TIP]\n\u003e The latest version of the `@catala-lang/catala-web-assets` package and the\n\u003e `@catala-lang/french-law` package are automatically updated with the\n\u003e `./update-assets.sh` (`yarn assets`) script run before `yarn build` and `yarn\n\u003e dev`. Consequently, you don't need to manually update the version of the\n\u003e packages in the `package.json` file.\n\n\u003e [!IMPORTANT]\n\u003e For now, if a new version of one of the packages is added, you need to **manually** update\n\u003e the `assets-versions.json` file with the new version.\n\n ```diff\n {\n   \"available\": [\n +   {\n +    \"name\": \"\u003cdate\u003e\",\n +    \"french-law\": \"\u003clatest-version\u003e\"\n +    \"catala-web-assets\": \"\u003clatest-version\u003e\",\n +  },\n   ]\n }\n ```\n\n### Using local assets\n\nIf you want to use `@catala-lang/french-law` (resp.\n`@catala-lang/catala-web-assets`) from your local machine instead of the\npublished version, you can use `yarn link` to link them to this project.\n\n\u003e [!IMPORTANT]\n\u003e See the [Using local packages](#using-local-packages) section for more\n\u003e information about how to link local packages.\n\nThen, add the new version in `assets-versions.json` with the `local` version.\n\n```diff\n{\n  \"available\": [\n+   {\n+     \"name\": \"local\", # or whatever name you want to give to the version\n+     \"french-law\": \"local\"\n+     \"catala-web-assets\": \"\u003clatest-version\u003e\", \n+   },\n  ]\n}\n```\n\n## Build for production and deploy\n\n### To test before deploy\n\n```\n# Build for production\nyarn build\n\n# Locally preview the production build\nyarn serve\n```\n\n### To deploy\n\n```\n# Build for production and rsync files to the \u003cdestination\u003e (could be a ssh address)\nyarn deploy \u003cdestination\u003e\n```\n\n## Sponsors\n\nThis library has been developed during a research project funded by the\n[_mission logiciels libres et communs numériques_](https://www.code.gouv.fr/)\nof the [_direction interministérielle du\nnumérique_](https://www.numerique.gouv.fr/) in collaboration with the\n[Catala](https://catala-lang.org/) project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalalang%2Fcatala-dsfr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatalalang%2Fcatala-dsfr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalalang%2Fcatala-dsfr/lists"}