Skip to content

Backend

The backend is the FastAPI service. It serves non-AI application APIs and owns the data-facing contract used by the Angular frontend and generated TypeScript client.

Responsibilities

AreaNotes
Location profilesSearch, map pins, and organization detail payloads assembled from CSTAR Cloud SQL tables.
CSTAR dataHazards, adaptation goals, actions, funding-gap projects, peer solutions, and solution examples.
Hazard layersGoogle Earth Engine layer config and tile URLs for climate-hazard map overlays.
TranslationDynamic Google Cloud Translate endpoint used by frontend autoTranslate flows.
Disclosure trendsDataset-wide disclosure summaries for a selected year.
Onboarding telemetryApp-owned role-selection table created by the backend on startup.

Ask CDP AI chat and follow-up generation are owned by the separate AI Server.

Backend Docs

PagePurpose
Database LayerSQLModel models, repository pattern, Cloud SQL settings, and app-owned tables.
Hazard Data ServiceEarth Engine integration and hazard layer API behavior.

Caveats

  • CSTAR analytical tables are managed outside the app. The backend only auto-creates app-owned write tables, currently UserRoleSelection.
  • Location detail reads still need a disclosure-year filtering decision before multiple disclosure years can safely coexist in the same table set.
  • The database schema script lives at scripts/create_empty_tables.sql, not under docs/.

CDP operating memory.