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 install
to install dependenciesnpm run dev
to run the development server (with hot reload)npm run build
to build the project, placing resulting files in./out
npm run start
to start a local server