The frontend is the React/TypeScript public Geoportal interface for this
repository. It runs locally as the frontend Docker Compose service on port
3000, or directly with npm from frontend/.
Testing:
- Testing Guide - test suite, coverage, accessibility checks, and test-writing patterns.
- Testing Quick Reference - common testing commands and snippets.
Code quality:
- Linting and Formatting - ESLint, Prettier, and local workflow.
- Linting Quick Reference - short command and troubleshooting reference.
Features:
- Homepage Map Visualization - H3 hex map, featured carousel, preview layers, and Allmaps behavior.
Configuration:
- Google Tag Manager is injected by the SSR root only when
VITE_KAMAL_DEST=prdandVITE_GTM_IDis present and matches a GTM container ID. Kamal leaves this blank by default and setsVITE_GTM_IDonly for theprddestination.
The frontend stack currently uses:
- React 19 and React DOM 19.
- React Router 7 for routing, loaders, SSR, build, and production serving.
- TypeScript, Vite 7, and React Router dev tooling.
- Vitest 3, Testing Library,
happy-dom, axe, and pa11y for tests and accessibility checks. - Material UI 7, Tailwind, Leaflet, GeoBlacklight frontend components, Allmaps, H3, Recharts, and Lucide icons.
Run from frontend/:
# Development and production build checks
npm run dev
npm run build
npm run start
# Testing
npm test
npm run test:watch
npm run test:coverage
npm run test:a11y
# Code quality
npm run lint
npm run lint:fix
npm run format
npm run format:checkRun from the repository root after frontend dependency or Vite config changes:
make frontend-resetThen hard-refresh the browser or use a private/incognito window to avoid stale chunk URLs.
- Update this file when
frontend/package.jsonscripts or major dependencies change. - Update testing docs when Vitest, Testing Library, axe, pa11y, or test setup changes.
- Update feature docs when homepage map, featured resource, preview-layer, or Allmaps behavior changes.
- Run
npm run lint,npm run format:check, andnpm testbefore merging frontend behavior changes.