This is a Next.js project bootstrapped with create-next-app.
Install and switch to the Node.js version specified in .nvmrc using your version manager of choice.
Important
Since v16.13, installations of Node.js are distributed with Corepack by default for managing package managers. However, due to its experimental status, Corepack currently needs to be explicitly enabled before usage:
corepack enableFor alternative methods to install pnpm, see here.
Copy .env.example to .env.local and add your Mapbox token (NEXT_PUBLIC_MAPBOX_TOKEN). You can get one from mapbox.com or ask a team member for the shared token.
cp .env.example .env.localInstall the dependencies:
pnpm installStart the development server:
pnpm devGenerate an optimized production build and start the compiled application in production mode:
pnpm build
pnpm startThis project uses the Vitest test runner with React Testing Library for unit testing and Storybook for UI development and documentation.
In Storybook, each story is a small code snippet that configures a component into a key UI state. When configured with Storybook's Vitest addon, stories are transformed into component tests to be run by Vitest. Stories are tested in two ways: a smoke test to ensure it renders and, if a play function is defined, that function is run and any assertions made within it are validated. See the Storybook documentation for more information.
Run Vitest in watch mode:
pnpm testRun Vitest once:
pnpm test:runRun Vitest with coverage report:
pnpm test:coverageStart the Storybook development server (default: http://localhost:6006):
pnpm storybookCompiles the Storybook instance so it can be deployed:
pnpm storybook:buildThe tools are stored in their specific folders under components/
Located in components/home/ToolCarousel.tsx
Whenever a new metric within a tool or a tool is added, this component needs to be updated accordingly. Check for the data from where the instance of the tool is retrieving its data, and add the values accordingly.
All context code is stored under context/
Can be used for more complex tooltips beyond MUI's default. Links, images and any HTML content can be added
This component was written to create an optimized version of thea loading spinner