The user interface for the SylvaLens forest analytics platform, built with Next.js (App Router) and Mapbox GL JS.
- Interactive Map: Explore administrative boundaries, cadastre parcels, and BD Forêt classifications.
- Custom Analytics: Draw polygons to trigger spatial analytics (FORMS-T, Hansen, LiDAR).
- Report Generation: Download CSV and PDF reports.
- Contract-Driven API: Uses
openapi-typescriptfor end-to-end type safety with the backend services.
- Node.js (v20+)
- pnpm
- Mapbox Access Token
Copy the .env.example file to .env.local and add your Mapbox token:
cp .env.example .env.localFill in:
NEXT_PUBLIC_MAPBOX_TOKEN=pk.your_token_here
To ensure type safety with the backend and raster services (which must be running locally):
pnpm run generate:apipnpm install
pnpm run devThe application will be available at http://localhost:3000.
This Next.js application is configured to build as standalone for optimized Docker deployments.
pnpm run buildSee the sylvalens/infra repository for production deployment orchestration.