This codebase consists of the front-end SPA for the Carbon Mapper Data Portal at https://data.carbonmapper.org. It's built with NextJS with NodeJS.
Environment configuration is stored in the .env file at the root of the repository, and an example is provided in .env.example. All configuration keys are passed into the frontend and available to all viewers once deployed, so they should be considered public.
A mapbox public API key is required for the NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN variable in your .env. To get started, you can sign up for a free account on mapbox and use your "Default public token" for your account.
As a Next.js project using Node.js, the following commands are configured to manage the project:
npm installto install dependenciesnpm run devto run the development server (with hot reload)npm run buildto build the project, placing resulting files in./outnpm run startto start a local server