# abhitecz/flood_evacuation_planning_system architecture

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

- Interactive diagram: https://gitdiagram.com/abhitecz/flood_evacuation_planning_system
- Repository: https://github.com/abhitecz/flood_evacuation_planning_system

## Overview

AeroSentry is a flood-damage intelligence and evacuation-planning prototype. Its principal workflow is satellite-derived flood-mask generation, assessment of exposed pre-event infrastructure, and presentation of impact layers and evacuation information in a map dashboard. Separate documented capabilities include hydrological awareness, bilingual situation reports, and historical disaster records. Several backend and orchestration files were not sampled; where their connections are documented only at the product level, edges are dashed or omitted rather than inferred from filenames.

Main entry points: [`src/Dashboard.jsx`](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/src/Dashboard.jsx) (Crisis Dashboard), [`damage_analysis.py`](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/damage_analysis.py) (Exposure Assessment), [`main.py`](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/main.py) (Pipeline Runner), [`Sentinalhub.py`](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/Sentinalhub.py) (Sentinel Hub Fetch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Flood Sensing"]
  node_sentinelhub["Sentinel Hub Fetch<br/>[Sentinalhub.py]"]
  node_credentials["Hub Credentials<br/>[Client_id.py]"]
  node_imageproc["SAR Mask Engine<br/>[image.py]"]
  node_floodmask["Flood Mask<br/>[flood_mask.tif]"]
end

subgraph group_analysis["Impact Analysis"]
  node_damage["Exposure Assessment<br/>[damage_analysis.py]"]
  node_osm[("Pre-event OSM")]
  node_damageoutputs["Impact Layers"]
  node_routing["Isolation Routing<br/>[cutoff_analysis.py]"]
  node_runner["Pipeline Runner<br/>[main.py]"]
end

subgraph group_services["Crisis Services"]
  node_api["Crisis API<br/>[api.py]"]
  node_hydrology["GloFAS Hydrology"]
  node_sitreports["Bilingual SitRep<br/>[api.py]"]
  node_history["Disaster History<br/>[Dashboard.jsx]"]
end

subgraph group_interfaces["User Interfaces"]
  node_userdashboard["Crisis Dashboard<br/>[Dashboard.jsx]"]
  node_assessmentui["Damage Map UI<br/>[App.jsx]"]
end

node_operator(("Responder"))
node_maptiles["Map Tile Service"]
node_browser(("Responder Browser"))

node_sentinelhub -->|"loads credentials"| node_credentials
node_sentinelhub -->|"writes raster"| node_floodmask
node_imageproc -->|"exports mask"| node_floodmask
node_damage -->|"queries snapshot"| node_osm
node_damage -->|"writes layers"| node_damageoutputs
node_runner -.->|"runs ingestion"| node_sentinelhub
node_runner -.->|"runs assessment"| node_damage
node_runner -.->|"runs routing"| node_routing
node_damage -->|"uses mask"| node_floodmask
node_routing -.->|"uses road results"| node_damageoutputs
node_api -.->|"requests discharge"| node_hydrology
node_api -.->|"generates reports"| node_sitreports
node_browser -->|"uses"| node_userdashboard
node_browser -.->|"uses"| node_assessmentui
node_userdashboard -.->|"requests data"| node_api
node_userdashboard -->|"shows records"| node_history
node_userdashboard -->|"loads tiles"| node_maptiles
node_assessmentui -.->|"displays layers"| node_damageoutputs

click node_sentinelhub "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/Sentinalhub.py"
click node_credentials "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/Client_id.py"
click node_imageproc "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/image.py"
click node_floodmask "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/outputs/flood_mask.tif"
click node_damage "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/damage_analysis.py"
click node_damageoutputs "https://github.com/abhitecz/flood_evacuation_planning_system/tree/main/outputs/damage"
click node_routing "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/cutoff_analysis.py"
click node_runner "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/main.py"
click node_api "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/api.py"
click node_sitreports "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/api.py"
click node_history "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/src/Dashboard.jsx"
click node_userdashboard "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/src/Dashboard.jsx"
click node_assessmentui "https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/src/App.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_sentinelhub,node_credentials,node_imageproc,node_floodmask,node_browser toneBlue
class node_damage,node_osm,node_damageoutputs,node_routing,node_runner toneAmber
class node_api,node_hydrology,node_sitreports,node_history toneMint
class node_userdashboard,node_assessmentui toneRose
class node_operator,node_maptiles toneIndigo
```

## Components

### Flood Sensing

- [Sentinel Hub Fetch](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/Sentinalhub.py): `Sentinalhub.py`
- [Hub Credentials](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/Client_id.py): `Client_id.py`
- [SAR Mask Engine](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/image.py): `image.py`
- [Flood Mask](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/outputs/flood_mask.tif): `outputs/flood_mask.tif`

### Impact Analysis

- [Exposure Assessment](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/damage_analysis.py): `damage_analysis.py`
- **Pre-event OSM**
- [Impact Layers](https://github.com/abhitecz/flood_evacuation_planning_system/tree/main/outputs/damage): `outputs/damage`
- [Isolation Routing](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/cutoff_analysis.py): `cutoff_analysis.py`
- [Pipeline Runner](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/main.py): `main.py`

### Crisis Services

- [Crisis API](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/api.py): `api.py`
- **GloFAS Hydrology**
- [Bilingual SitRep](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/api.py): `api.py`
- [Disaster History](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/src/Dashboard.jsx): `src/Dashboard.jsx`

### User Interfaces

- [Crisis Dashboard](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/src/Dashboard.jsx): `src/Dashboard.jsx`
- [Damage Map UI](https://github.com/abhitecz/flood_evacuation_planning_system/blob/main/src/App.jsx): `src/App.jsx`

### Other components

- **Responder**
- **Map Tile Service**
- **Responder Browser**

## Connections

- Sentinel Hub Fetch → Hub Credentials: loads credentials (evidence: `Sentinalhub.py`)
- Sentinel Hub Fetch → Flood Mask: writes raster (evidence: `Sentinalhub.py`)
- SAR Mask Engine → Flood Mask: exports mask (evidence: `image.py`)
- Exposure Assessment → Pre-event OSM: queries snapshot (evidence: `damage_analysis.py`)
- Exposure Assessment → Impact Layers: writes layers (evidence: `damage_analysis.py`)
- Pipeline Runner → Sentinel Hub Fetch: runs ingestion (evidence: `README.md`)
- Pipeline Runner → Exposure Assessment: runs assessment (evidence: `README.md`)
- Pipeline Runner → Isolation Routing: runs routing (evidence: `README.md`)
- Exposure Assessment → Flood Mask: uses mask (evidence: `damage_analysis.py`)
- Isolation Routing → Impact Layers: uses road results (evidence: `README.md`)
- Crisis API → GloFAS Hydrology: requests discharge (evidence: `README.md`)
- Crisis API → Bilingual SitRep: generates reports (evidence: `README.md`)
- Responder Browser → Crisis Dashboard: uses
- Responder Browser → Damage Map UI: uses
- Crisis Dashboard → Crisis API: requests data (evidence: `README.md`)
- Crisis Dashboard → Disaster History: shows records (evidence: `src/Dashboard.jsx`)
- Crisis Dashboard → Map Tile Service: loads tiles (evidence: `src/Dashboard.jsx`)
- Damage Map UI → Impact Layers: displays layers
