This project is developped and built with Vite, using React, Redux and Redux Toolkit.
Follow the instructions in dev-env
Both the frontend and the backend development servers will be started in docker containers.
This setup assumes that an API server is already configured.
URLs and credentials can be configured in .env.development.
Requirements:
- Node.js 18
- yarn
Setup:
- In this folder, install frontend dependencies:
yarn install
- Generate the OpenAPI client with the script
./scripts/generate-services-from-openapi.sh
- Start the local development server:
yarn start
In the project directory, you can run:
Install all dependencies from package.json
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Runs the linter and returns lint errors.
This check is automatically enforced on commit using a pre-commit hook. Use git commit --no-verify
to bypass this check (e.g. to commit on a branch with work in progress).
Attempts to fix lint problems automatically using eslint --fix
.
This is especially useful to apply prettier
format rules, if they are not enforced by your IDE.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Parses source code to extract all translation keys used in frontend, and updates the translation catalogs accordingly in public/locales
.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
You can learn more in the Vite documentation.
To learn React, check out the React documentation.
Copyright 2021-2023 Association Tournesol and contributors.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
See the full legal code AGPL-3.0-or-later.
Copyright 2021 Association Tournesol - Author Chris Vossen
Tournesol Criteria Icons are licensed under the
Creative Commons Attribution 4.0 International (CC BY 4.0).
You are free to share, copy and redistribute the material in any medium
or format, and/or to adapt remix, transform, and build upon the material
for any purpose, even commercially, as long as you give appropriate
credit, provide a link to the license, and indicate if changes were made.
You may do so in any reasonable manner, but not in any way that suggests
the licensor endorses you or your use.
You should have received a copy of the license along with this
work. If not, see <https://creativecommons.org/licenses/by/4.0/>.
See the full legal code CC BY 4.0.
Affected materials:
public/images/criteriaIcons/reliability.svg
public/images/criteriaIcons/pedagogy.svg
public/images/criteriaIcons/importance.svg
public/images/criteriaIcons/layman_friendly.svg
public/images/criteriaIcons/entertaining_relaxing.svg
public/images/criteriaIcons/engaging.svg
public/images/criteriaIcons/diversity_inclusion.svg
public/images/criteriaIcons/better_habits.svg
public/images/criteriaIcons/backfire_risk.svg
Copyright 2019 Mozilla Corporation
Firefox Browser logo is licensed under the
Mozilla Public License Version 2.0 (MPL 2.0).
You should have received a copy of the license along with this
work. If not, see <https://www.mozilla.org/en-US/MPL/2.0/>.
See the full legal code Mozilla Public License Version 2.0.
Affected materials:
public/logos/Fx-Browser-icon-fullColor.svg
Copyright 2019 Microsoft Corporation
Affected materials:
public/logos/Edge-Browser-icon-fullColor.svg
The specific texts of the front end's Terms of Service and the Privacy Policy are dedicated to the public domain as stated by the license Creative Commons Zero v1.0 Universal.
See the human-readable disclaimer, or the full legal code for more information.