# dvp05/zero_t1-1 architecture

> Architecture diagram of the GitHub repository dvp05/zero_t1-1, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dvp05/zero_t1-1
- Repository: https://github.com/dvp05/zero_t1-1

## Overview

TIDALIS is a coastal flood intelligence control room: environmental observations feed forecasts and a time-stepped flood scenario, which supports spatial isolation analysis, emergency prioritization, SOS triage, and mitigation recommendations presented in a map-centered operator interface. The graph combines documented capabilities with relationships visible in the supplied excerpts and SOURCE INDEX; several important implementation files were not sampled, so their internal interactions are not inferred.

Main entry points: [`backend/app/main.py`](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/main.py) (FastAPI endpoints), [`frontend/src/components/ContextInspector.jsx`](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/ContextInspector.jsx) (Context inspector), [`backend/app/scenario/engine.py`](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/scenario/engine.py) (Storm scenario engine), [`frontend/src/App.jsx`](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/App.jsx) (Control-room shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Observation ingestion"]
  node_collector_pipeline["Collection pipeline<br/>[pipeline.py]"]
  node_collectors["Environmental collectors"]
  node_collector_service["Live collector service"]
end

subgraph group_intelligence["Flood intelligence"]
  node_flood_model["Flood prediction<br/>[flood_model.py]"]
  node_forecast["Sensor forecasting<br/>[forecast_engine.py]"]
  node_anomaly["Anomaly detection<br/>[anomaly_engine.py]"]
  node_event_fusion["Event fusion<br/>[event_fusion.py]"]
  node_scenario["Storm scenario engine<br/>[engine.py]"]
  node_city_model["Coastal city model<br/>[city_model.py]"]
  node_what_if["What-if simulation<br/>[what_if.py]"]
end

subgraph group_response["Emergency response"]
  node_isolation["Road isolation analysis"]
  node_priority["Emergency prioritization<br/>[priority_engine.py]"]
  node_sos["SOS triage<br/>[sos_engine.py]"]
  node_mitigation["Mitigation planning"]
  node_topology["Topological analysis"]
  node_exposure["Exposure analysis<br/>[exposure_engine.py]"]
end

subgraph group_platform["API and state"]
  node_data_store[("Operational data store<br/>[data_store.py]")]
  node_schemas["Domain schemas<br/>[schemas.py]"]
  node_api["FastAPI endpoints<br/>[main.py]"]
end

subgraph group_operator_ui["Operator interface"]
  node_copilot["Evidence-grounded copilot<br/>[copilot_engine.py]"]
  node_frontend_app["Control-room shell<br/>[App.jsx]"]
  node_frontend_store["Frontend state store<br/>[store.js]"]
  node_map["3D digital twin map<br/>[MapView.jsx]"]
  node_timeline["Scenario timeline"]
  node_tactical["Tactical operations panels<br/>[TacticalRail.jsx]"]
  node_inspector["Context inspector"]
  node_brief_panel["Command brief panel"]
  node_priority_panel["Priority panel<br/>[PriorityPanel.jsx]"]
  node_zone_panel["Zone intelligence panel<br/>[ZoneIntelPanel.jsx]"]
  node_services_panel["Public services panel"]
  node_event_panel["Event panel<br/>[EventPanel.jsx]"]
end

node_operator(("Emergency operator"))
node_weather_service["Open-Meteo"]

node_operator -->|"uses"| node_frontend_app
node_weather_service -->|"provides observations"| node_collector_pipeline
node_collector_pipeline -->|"orchestrates"| node_collectors
node_collector_pipeline -.->|"supplies collected data"| node_collector_service
node_api -->|"uses"| node_collector_service
node_api -->|"reads and writes"| node_data_store
node_api -->|"uses"| node_schemas
node_api -->|"generates forecast"| node_forecast
node_api -->|"runs detection"| node_anomaly
node_api -->|"uses"| node_event_fusion
node_api -->|"serves scenario"| node_scenario
node_api -->|"serves triage"| node_sos
node_api -->|"serves plans"| node_mitigation
node_api -->|"uses"| node_exposure
node_api -->|"serves simulations"| node_what_if
node_scenario -->|"predicts flood risk"| node_flood_model
node_scenario -->|"uses terrain model"| node_city_model
node_scenario -->|"evaluates isolation"| node_isolation
node_scenario -->|"ranks emergencies"| node_priority
node_scenario -->|"builds command brief"| node_copilot
node_isolation -->|"reads road network"| node_city_model
node_priority -->|"uses isolation results"| node_isolation
node_sos -.->|"uses elevation data"| node_city_model
node_mitigation -->|"uses analysis"| node_topology
node_copilot -->|"queries"| node_data_store
node_frontend_app -->|"initializes and refreshes"| node_frontend_store
node_frontend_app -->|"renders"| node_map
node_frontend_app -->|"renders"| node_timeline
node_frontend_app -->|"renders"| node_tactical
node_frontend_app -->|"renders"| node_inspector
node_frontend_store -->|"requests data"| node_api
node_frontend_store -->|"provides state"| node_map
node_inspector -->|"reads state"| node_frontend_store
node_inspector -->|"renders"| node_brief_panel
node_inspector -->|"renders"| node_priority_panel
node_inspector -->|"renders"| node_zone_panel
node_inspector -->|"renders"| node_services_panel
node_inspector -->|"renders"| node_event_panel

click node_collector_pipeline "https://github.com/dvp05/zero_t1-1/blob/main/data_collection/pipeline.py"
click node_collectors "https://github.com/dvp05/zero_t1-1/tree/main/data_collection"
click node_collector_service "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/collector_service.py"
click node_data_store "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/data_store.py"
click node_schemas "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/models/schemas.py"
click node_api "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/main.py"
click node_flood_model "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/ml/flood_model.py"
click node_forecast "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/ml/forecast_engine.py"
click node_anomaly "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/ml/anomaly_engine.py"
click node_event_fusion "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/fusion/event_fusion.py"
click node_scenario "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/scenario/engine.py"
click node_city_model "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/geospatial/city_model.py"
click node_isolation "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/isolation_engine.py"
click node_priority "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/priority_engine.py"
click node_sos "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/sos_engine.py"
click node_mitigation "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/mitigation_engine.py"
click node_topology "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/topological_engine.py"
click node_exposure "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/exposure_engine.py"
click node_what_if "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/simulation/what_if.py"
click node_copilot "https://github.com/dvp05/zero_t1-1/blob/main/backend/app/copilot/copilot_engine.py"
click node_frontend_app "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/App.jsx"
click node_frontend_store "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/store.js"
click node_map "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/map/MapView.jsx"
click node_timeline "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/TimelineScrubber.jsx"
click node_tactical "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/TacticalRail.jsx"
click node_inspector "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/ContextInspector.jsx"
click node_brief_panel "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/CommandBriefPanel.jsx"
click node_priority_panel "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/PriorityPanel.jsx"
click node_zone_panel "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/ZoneIntelPanel.jsx"
click node_services_panel "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/PublicServicesPanel.jsx"
click node_event_panel "https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/EventPanel.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_collector_pipeline,node_collectors,node_collector_service toneBlue
class node_flood_model,node_forecast,node_anomaly,node_event_fusion,node_scenario,node_city_model,node_what_if toneAmber
class node_isolation,node_priority,node_sos,node_mitigation,node_topology,node_exposure toneMint
class node_data_store,node_schemas,node_api toneRose
class node_copilot,node_frontend_app,node_frontend_store,node_map,node_timeline,node_tactical,node_inspector,node_brief_panel,node_priority_panel,node_zone_panel,node_services_panel,node_event_panel,node_operator,node_weather_service toneIndigo
```

## Components

### Observation ingestion

- [Collection pipeline](https://github.com/dvp05/zero_t1-1/blob/main/data_collection/pipeline.py): `data_collection/pipeline.py`
- [Environmental collectors](https://github.com/dvp05/zero_t1-1/tree/main/data_collection): `data_collection`
- [Live collector service](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/collector_service.py): `backend/app/services/collector_service.py`

### Flood intelligence

- [Flood prediction](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/ml/flood_model.py): `backend/app/ml/flood_model.py`
- [Sensor forecasting](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/ml/forecast_engine.py): `backend/app/ml/forecast_engine.py`
- [Anomaly detection](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/ml/anomaly_engine.py): `backend/app/ml/anomaly_engine.py`
- [Event fusion](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/fusion/event_fusion.py): `backend/app/fusion/event_fusion.py`
- [Storm scenario engine](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/scenario/engine.py): `backend/app/scenario/engine.py`
- [Coastal city model](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/geospatial/city_model.py): `backend/app/geospatial/city_model.py`
- [What-if simulation](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/simulation/what_if.py): `backend/app/simulation/what_if.py`

### Emergency response

- [Road isolation analysis](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/isolation_engine.py): `backend/app/services/isolation_engine.py`
- [Emergency prioritization](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/priority_engine.py): `backend/app/services/priority_engine.py`
- [SOS triage](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/sos_engine.py): `backend/app/services/sos_engine.py`
- [Mitigation planning](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/mitigation_engine.py): `backend/app/services/mitigation_engine.py`
- [Topological analysis](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/topological_engine.py): `backend/app/services/topological_engine.py`
- [Exposure analysis](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/exposure_engine.py): `backend/app/services/exposure_engine.py`

### API and state

- [Operational data store](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/services/data_store.py): `backend/app/services/data_store.py`
- [Domain schemas](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/models/schemas.py): `backend/app/models/schemas.py`
- [FastAPI endpoints](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/main.py): `backend/app/main.py`

### Operator interface

- [Evidence-grounded copilot](https://github.com/dvp05/zero_t1-1/blob/main/backend/app/copilot/copilot_engine.py): `backend/app/copilot/copilot_engine.py`
- [Control-room shell](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Frontend state store](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/store.js): `frontend/src/store.js`
- [3D digital twin map](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/map/MapView.jsx): `frontend/src/components/map/MapView.jsx`
- [Scenario timeline](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/TimelineScrubber.jsx): `frontend/src/components/TimelineScrubber.jsx`
- [Tactical operations panels](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/TacticalRail.jsx): `frontend/src/components/TacticalRail.jsx`
- [Context inspector](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/ContextInspector.jsx): `frontend/src/components/ContextInspector.jsx`
- [Command brief panel](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/CommandBriefPanel.jsx): `frontend/src/components/CommandBriefPanel.jsx`
- [Priority panel](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/PriorityPanel.jsx): `frontend/src/components/PriorityPanel.jsx`
- [Zone intelligence panel](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/ZoneIntelPanel.jsx): `frontend/src/components/ZoneIntelPanel.jsx`
- [Public services panel](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/PublicServicesPanel.jsx): `frontend/src/components/PublicServicesPanel.jsx`
- [Event panel](https://github.com/dvp05/zero_t1-1/blob/main/frontend/src/components/EventPanel.jsx): `frontend/src/components/EventPanel.jsx`

### Other components

- **Emergency operator**
- **Open-Meteo**

## Connections

- Emergency operator → Control-room shell: uses (evidence: `README.md`)
- Open-Meteo → Collection pipeline: provides observations (evidence: `README.md`)
- Collection pipeline → Environmental collectors: orchestrates (evidence: `data_collection/pipeline.py`)
- Collection pipeline → Live collector service: supplies collected data
- FastAPI endpoints → Live collector service: uses (evidence: `backend/app/main.py`)
- FastAPI endpoints → Operational data store: reads and writes (evidence: `backend/app/main.py`)
- FastAPI endpoints → Domain schemas: uses (evidence: `backend/app/main.py`)
- FastAPI endpoints → Sensor forecasting: generates forecast (evidence: `backend/app/main.py`)
- FastAPI endpoints → Anomaly detection: runs detection (evidence: `backend/app/main.py`)
- FastAPI endpoints → Event fusion: uses (evidence: `backend/app/main.py`)
- FastAPI endpoints → Storm scenario engine: serves scenario (evidence: `backend/app/main.py`)
- FastAPI endpoints → SOS triage: serves triage (evidence: `backend/app/main.py`)
- FastAPI endpoints → Mitigation planning: serves plans (evidence: `backend/app/main.py`)
- FastAPI endpoints → Exposure analysis: uses (evidence: `backend/app/main.py`)
- FastAPI endpoints → What-if simulation: serves simulations (evidence: `backend/app/main.py`)
- Storm scenario engine → Flood prediction: predicts flood risk (evidence: `backend/app/scenario/engine.py`)
- Storm scenario engine → Coastal city model: uses terrain model (evidence: `backend/app/scenario/engine.py`)
- Storm scenario engine → Road isolation analysis: evaluates isolation (evidence: `backend/app/scenario/engine.py`)
- Storm scenario engine → Emergency prioritization: ranks emergencies (evidence: `backend/app/scenario/engine.py`)
- Storm scenario engine → Evidence-grounded copilot: builds command brief (evidence: `backend/app/scenario/engine.py`)
- Road isolation analysis → Coastal city model: reads road network (evidence: `backend/app/services/isolation_engine.py`)
- Emergency prioritization → Road isolation analysis: uses isolation results (evidence: `backend/app/services/priority_engine.py`)
- SOS triage → Coastal city model: uses elevation data
- Mitigation planning → Topological analysis: uses analysis (evidence: `backend/app/services/mitigation_engine.py`)
- Evidence-grounded copilot → Operational data store: queries (evidence: `backend/app/copilot/copilot_engine.py`)
- Control-room shell → Frontend state store: initializes and refreshes (evidence: `frontend/src/App.jsx`)
- Control-room shell → 3D digital twin map: renders (evidence: `frontend/src/App.jsx`)
- Control-room shell → Scenario timeline: renders (evidence: `frontend/src/App.jsx`)
- Control-room shell → Tactical operations panels: renders (evidence: `frontend/src/App.jsx`)
- Control-room shell → Context inspector: renders (evidence: `frontend/src/App.jsx`)
- Frontend state store → FastAPI endpoints: requests data (evidence: `README.md`)
- Frontend state store → 3D digital twin map: provides state (evidence: `frontend/src/components/map/MapView.jsx`)
- Context inspector → Frontend state store: reads state (evidence: `frontend/src/components/ContextInspector.jsx`)
- Context inspector → Command brief panel: renders (evidence: `frontend/src/components/ContextInspector.jsx`)
- Context inspector → Priority panel: renders (evidence: `frontend/src/components/ContextInspector.jsx`)
- Context inspector → Zone intelligence panel: renders (evidence: `frontend/src/components/ContextInspector.jsx`)
- Context inspector → Public services panel: renders (evidence: `frontend/src/components/ContextInspector.jsx`)
- Context inspector → Event panel: renders (evidence: `frontend/src/components/ContextInspector.jsx`)
