Architecture
High-Level Flow
- The viewer sends a GeoJSON feature collection to the backend.
- The backend loads GRB reference data and evaluates multiple distances.
- The backend returns:
- full BRDR output via
/actualiser - reduced viewer-oriented output via
/actualiser/viewer
- full BRDR output via
- The viewer renders:
resultgeometryresult_diff_min(negative diff)result_diff_plus(positive diff)diffschart values per distance step
Backend
- Framework: FastAPI
- Main file:
grb_webservice.py - Typings/models:
grb_webservice_typings.py - BRDR dependency:
brdrpackage
Important behavior:
- Request validation on feature IDs (must be present and unique).
- Compatibility handling for GRB type labels across BRDR versions.
503when upstream GRB service is unavailable.
Viewer
- Framework: React + TypeScript + Vite
- Map library: OpenLayers
- Path:
brdr-viewer/brdr-viewer
Capabilities:
- draw a new point/line/polygon
- edit geometry vertices (where applicable)
- auto-trigger recalculation after drawing/editing (manual recalc remains available)
- inspect timeline steps, prediction markers, and geometry-aware diff chart
Runtime Modes
- Native: Python backend + Node viewer
- Containerized backend: Docker backend + Node viewer
- One-command local startup:
start-local.ps1/start-local.cmd