This project is part of IroCO2. You are not in the principal repository. For any general information about the project, please refer to the principal repository.
This is the frontend of the IroCO2 application, developed using Nuxt 3 and Vue 3. It provides the user interface and client-side logic for the IroCO2 carbon calculator platform.
Clone the repository and install dependencies:
# with npm
npm install
# with yarn
yarn install
# with pnpm
pnpm install
# with bun
bun install
Start the development server at http://localhost:3000
:
# with npm
npm run dev
# with yarn
yarn dev
# with pnpm
pnpm run dev
# with bun
bun run dev
# with npm
npm run build
# with yarn
yarn build
# with pnpm
pnpm run build
# with bun
bun run build
Preview the production build locally:
# with npm
npm run preview
# with yarn
yarn preview
# with pnpm
pnpm run preview
# with bun
bun run preview
components/
— Vue components (UI, forms, charts, navigation, etc.)pages/
— Application pages (e.g., calculator, catalog, admin, login, help, etc.)service/
— Business logic and API service layerspublic/
— Static assets (favicon, icons, etc.)assets/
— Styles and imageslayouts/
— Application layoutsmiddleware/
— Middleware logicstores/
— Pinia stores (state management)lib/
,enum/
,type/
— Utilities, enums, and typesnuxt.config.ts
— Nuxt configurationtailwind.config.js
— Tailwind CSS configurationpackage.json
— Project dependencies and scripts
The frontend is deployed on AWS Cloudfront. The cloudfront distribution is configured in the terraform repository.
To deploy the frontend, provide the following variables through .env
file :
- CLERK_PUBLISHABLE_KEY : See official Clerk documentation
- IROCALC_API_URL : FQDN of the IroCO2 backend API
Run yarn generate
to generate the static files.
Connect to your AWS environnement and run the following commands :
export S3_BUCKET_ID=`aws ssm get-parameter --name /IROCO2/PARAMETERS/FRONTEND/CLOUDFRONT_BUCKET_ID --query 'Parameter.Value' --output text --region eu-west-3 --with-decryption`
export CLOUDFRONT_DISTRIBUTION_ID=`aws ssm get-parameter --name /IROCO2/PARAMETERS/FRONTEND/CLOUDFRONT_DISTRIBUTION_ID --query 'Parameter.Value' --output text --region eu-west-3 --with-decryption`
aws s3 sync ${BUILD_FOLDER} s3://${S3_BUCKET_ID}/
aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_DISTRIBUTION_ID} --paths '/*'
Distributed under the Apache 2.0 License. See LICENSE for more information.
See docs/ for technical documentation. (If this folder is empty, refer to the principal repository.)
For ADRs and workflow documentation, see the principal repository and workflows.
See CONTRIBUTING.md