A modern, theme-capable frontend application for the Climate Policy Radar Navigator
platform. This repository contains the code necessary to build and deploy the
navigator-frontend
container.
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Run development server (default theme)
npm run dev
# Run with specific theme
THEME=cclw npm run dev
- Node.js (v18 or higher)
- Docker
- Make
- Trunk.io for code quality
First-time setup:
make install_trunk # Only if trunk.io not already installed
-
Docker (recommended)
make # Default theme # or make THEME=cclw
-
Manual Setup
npm install npm run dev
Configuration is managed through environment variables. See .env.example
for all
available options.
Key variables:
THEME
: Set the active theme (e.g., 'cclw', 'default')API_URL
: Backend API endpointAUTH_URL
: Authentication service URL
This project uses:
- Vitest for unit testing
- Playwright for E2E testing
- BrowserStack for cross-browser testing
- Act for GitHub workflows debugging/testing (click here for our act scripts)
Run tests:
# Unit tests
npm run test
# E2E tests
npm run test-e2e
Containers are automatically:
- Built and tested via GitHub Actions
- Pushed to AWS ECR
- Deployed via navigator-infra
Themes are configured in themes/[theme-name]/config.ts
. Each theme can override:
- Styling
- Feature flags
- Environment-specific configurations
We have the ability to turn features on per theme. These are controlled via the
themeConfig.features
.
These are accessed via ./src/utils/features.ts
.
This project is licensed under the terms specified in LICENSE.md.