A free software game designed to explore the orders of magnitude of CO2 footprints in our daily lives and raise awareness about climate change.
This application is based on the work of Thomas James Watson (thank you! ❤️) for wikitrivia. Original source code available on github.
This project uses open data provided by ADEME (Agence de l'Environnement et de la Maîtrise de l'Énergie, the French state agency working on climate change). The raw data is available on the ADEME website, either through a user-friendly website, or via an API. To enable offline gameplay and reduce redundant API calls (since the data doesn't change frequently), the information is stored within the app and manually updated regularly. The last update was performed on 2025-09-30.
Contributions to the project are very welcome! By contributing, you agree that your work will be licensed under the AGPL license (see the LICENSE file for details).
This project is using the Next.js framework, itself based on React. NodeJS 18.17.0 or higher is required to build and run the project.
npm install
npm run i18n-compilenpm run devThen visit http://localhost:3000/ to preview the website.
disCO2very uses Lingui to manage translations. If you add or modify any text in the app, you must run:
npm run i18n-extractThis will modify the english keys in locales/en/messages.po. Look for entries starting with #~: these are now outdated and should be removed.
Then open the other languages files like locales/fr/messages.po and look for empty strings "" to add the missing translations.
Once done, run:
npm run i18n-compileTo build a static version of the website to the out folder, that you can then deploy anywhere (it's plain HTML + JS, no server needed) run:
npm run buildThe data used is hardcoded in the code to allow to play offline. That's why it's important to regularly pull the latest data from the ImpactCO2 github repository.
- For the data, use the ADEME API documentation page to execute queries.
- Start with the
/thematiquesroute, click onTry it outand then compare the categories withdata/ademe/0-categories.jsonand complete the file if needed - Then use the
/thematiques/ecv/{id}route, execute it with thedetailparameter set to1for each category number and each language, and copy paste the response to the corresponding file indata/ademe/{language}/{thegoodfile}.json git diffyour changes to check theids used infootprintDetail, it has to have a matching ID indata/ademe/footprintDetailCategories.json. If you are missing it here, you have to investigate in the ImpactCO2 website to find what the new category is, as they are not providing them in the API
- Start with the
- For the icons,
- Download all the SVG icons from the github repository
public/iconsfolder and save them inpublic/images/ademe - Execute the
./clean-ademe-image.shscript, as not all the ADEME images are used in disCO2very, so no need to bundle them
- Download all the SVG icons from the github repository
- Finish by updating the date above in this file, to inform people of the last time the data has been updated