# sahinurrahman-debug/beaconspace architecture

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

- Interactive diagram: https://gitdiagram.com/sahinurrahman-debug/beaconspace
- Repository: https://github.com/sahinurrahman-debug/beaconspace

## Overview

BeaconSpace maps flood impacts from a user-supplied area and event date, then reports damage and disrupted settlement access. The main runtime path is the CLI or dashboard into the pipeline, which obtains satellite, elevation, and pre-event OSM data, analyzes impact, and writes maps and a bilingual situation report. The dashboard can display run outputs or trigger a run. Edges are based on the README and SOURCE INDEX references; unsampled implementation details are not inferred.

Main entry points: [`floodsys/pipeline.py`](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/pipeline.py) (Run pipeline), [`app/dashboard.py`](https://github.com/sahinurrahman-debug/beaconspace/blob/main/app/dashboard.py) (Dashboard), [`floodsys/cli.py`](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/cli.py) (CLI), [`floodsys/data/s1.py`](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/s1.py) (Sentinel-1 pairs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_cli["CLI<br/>[cli.py]"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_pipeline["Run pipeline<br/>[pipeline.py]"]
  node_presets["Area presets<br/>[presets.py]"]
  node_config["Run parameters<br/>[config.py]"]
end

subgraph group_inputs["Data and preparation"]
  node_radar["Sentinel-1 pairs<br/>[s1.py]"]
  node_optical["Sentinel-2 evidence<br/>[s2.py]"]
  node_elevation["DEM hydrology<br/>[dem.py]"]
  node_osm["Pre-event OSM<br/>[osm.py]"]
  node_grid["Raster grid<br/>[grid.py]"]
end

subgraph group_analysis["Flood impact analysis"]
  node_detector["Flood and debris detection<br/>[detect.py]"]
  node_model["U-Net inference<br/>[model.py]"]
  node_damage["Asset damage<br/>[damage.py]"]
  node_access["Settlement access<br/>[access.py]"]
  node_flowpath["Flood path<br/>[flowpath.py]"]
  node_waterrise["Water-rise preview<br/>[waterrise.py]"]
end

subgraph group_outputs["Access and reporting"]
  node_map["Maps<br/>[mapplot.py]"]
  node_sitrep["Bilingual situation report<br/>[sitrep.py]"]
  node_outputsdata["Run output files"]
end

node_user(("Rescue coordinator"))
node_satellite(("Sentinel imagery"))
node_demsource(("Copernicus DEM"))
node_osmservice(("OSM providers"))

node_user -->|"sets area/date"| node_cli
node_user -->|"selects analysis"| node_dashboard
node_cli -->|"loads preset"| node_presets
node_cli -->|"starts run"| node_pipeline
node_dashboard -->|"triggers run"| node_pipeline
node_dashboard -->|"reads results"| node_outputsdata
node_pipeline -->|"uses parameters"| node_config
node_pipeline -->|"loads pairs"| node_radar
node_pipeline -->|"loads evidence"| node_optical
node_pipeline -->|"loads terrain"| node_elevation
node_pipeline -->|"loads snapshot"| node_osm
node_pipeline -->|"uses grid"| node_grid
node_radar -->|"queries imagery"| node_satellite
node_optical -->|"queries imagery"| node_satellite
node_elevation -->|"loads elevation"| node_demsource
node_osm -->|"queries history"| node_osmservice
node_pipeline -->|"detects impact"| node_detector
node_pipeline -->|"runs inference"| node_model
node_model -->|"supplies probabilities"| node_detector
node_pipeline -->|"assesses assets"| node_damage
node_pipeline -->|"assesses connectivity"| node_access
node_pipeline -->|"traces route"| node_flowpath
node_pipeline -->|"builds preview"| node_waterrise
node_pipeline -->|"renders maps"| node_map
node_pipeline -->|"builds report"| node_sitrep
node_pipeline -->|"writes results"| node_outputsdata
node_dashboard -->|"displays report"| node_sitrep

click node_cli "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/cli.py"
click node_dashboard "https://github.com/sahinurrahman-debug/beaconspace/blob/main/app/dashboard.py"
click node_pipeline "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/pipeline.py"
click node_presets "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/presets.py"
click node_config "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/config.py"
click node_radar "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/s1.py"
click node_optical "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/s2.py"
click node_elevation "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/dem.py"
click node_osm "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/osm.py"
click node_grid "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/grid.py"
click node_detector "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/flood/detect.py"
click node_model "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/flood/model.py"
click node_damage "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/analysis/damage.py"
click node_access "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/analysis/access.py"
click node_flowpath "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/analysis/flowpath.py"
click node_waterrise "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/analysis/waterrise.py"
click node_map "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/report/mapplot.py"
click node_sitrep "https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/report/sitrep.py"

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_cli,node_dashboard,node_pipeline,node_presets,node_config toneBlue
class node_radar,node_optical,node_elevation,node_osm,node_grid toneAmber
class node_detector,node_model,node_damage,node_access,node_flowpath,node_waterrise toneMint
class node_map,node_sitrep,node_outputsdata toneRose
class node_user,node_satellite,node_demsource,node_osmservice toneIndigo
```

## Components

### User entry points

- [CLI](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/cli.py): `floodsys/cli.py`
- [Dashboard](https://github.com/sahinurrahman-debug/beaconspace/blob/main/app/dashboard.py): `app/dashboard.py`
- [Run pipeline](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/pipeline.py): `floodsys/pipeline.py`
- [Area presets](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/presets.py): `floodsys/presets.py`
- [Run parameters](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/config.py): `floodsys/config.py`

### Data and preparation

- [Sentinel-1 pairs](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/s1.py): `floodsys/data/s1.py`
- [Sentinel-2 evidence](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/s2.py): `floodsys/data/s2.py`
- [DEM hydrology](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/dem.py): `floodsys/data/dem.py`
- [Pre-event OSM](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/osm.py): `floodsys/data/osm.py`
- [Raster grid](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/data/grid.py): `floodsys/data/grid.py`

### Flood impact analysis

- [Flood and debris detection](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/flood/detect.py): `floodsys/flood/detect.py`
- [U-Net inference](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/flood/model.py): `floodsys/flood/model.py`
- [Asset damage](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/analysis/damage.py): `floodsys/analysis/damage.py`
- [Settlement access](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/analysis/access.py): `floodsys/analysis/access.py`
- [Flood path](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/analysis/flowpath.py): `floodsys/analysis/flowpath.py`
- [Water-rise preview](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/analysis/waterrise.py): `floodsys/analysis/waterrise.py`

### Access and reporting

- [Maps](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/report/mapplot.py): `floodsys/report/mapplot.py`
- [Bilingual situation report](https://github.com/sahinurrahman-debug/beaconspace/blob/main/floodsys/report/sitrep.py): `floodsys/report/sitrep.py`
- **Run output files**

### Other components

- **Rescue coordinator**
- **Sentinel imagery**
- **Copernicus DEM**
- **OSM providers**

## Connections

- Rescue coordinator → CLI: sets area/date (evidence: `README.md`)
- Rescue coordinator → Dashboard: selects analysis (evidence: `README.md`)
- CLI → Area presets: loads preset (evidence: `floodsys/cli.py`)
- CLI → Run pipeline: starts run (evidence: `floodsys/cli.py`)
- Dashboard → Run pipeline: triggers run (evidence: `README.md`)
- Dashboard → Run output files: reads results (evidence: `README.md`)
- Run pipeline → Run parameters: uses parameters (evidence: `floodsys/pipeline.py`)
- Run pipeline → Sentinel-1 pairs: loads pairs (evidence: `floodsys/pipeline.py`)
- Run pipeline → Sentinel-2 evidence: loads evidence (evidence: `floodsys/pipeline.py`)
- Run pipeline → DEM hydrology: loads terrain (evidence: `floodsys/pipeline.py`)
- Run pipeline → Pre-event OSM: loads snapshot (evidence: `floodsys/pipeline.py`)
- Run pipeline → Raster grid: uses grid (evidence: `floodsys/pipeline.py`)
- Sentinel-1 pairs → Sentinel imagery: queries imagery (evidence: `README.md`)
- Sentinel-2 evidence → Sentinel imagery: queries imagery (evidence: `README.md`)
- DEM hydrology → Copernicus DEM: loads elevation (evidence: `README.md`)
- Pre-event OSM → OSM providers: queries history (evidence: `floodsys/data/osm.py`)
- Run pipeline → Flood and debris detection: detects impact (evidence: `floodsys/pipeline.py`)
- Run pipeline → U-Net inference: runs inference (evidence: `floodsys/pipeline.py`)
- U-Net inference → Flood and debris detection: supplies probabilities (evidence: `floodsys/flood/model.py`)
- Run pipeline → Asset damage: assesses assets (evidence: `floodsys/pipeline.py`)
- Run pipeline → Settlement access: assesses connectivity (evidence: `floodsys/pipeline.py`)
- Run pipeline → Flood path: traces route (evidence: `floodsys/pipeline.py`)
- Run pipeline → Water-rise preview: builds preview (evidence: `floodsys/pipeline.py`)
- Run pipeline → Maps: renders maps (evidence: `floodsys/pipeline.py`)
- Run pipeline → Bilingual situation report: builds report (evidence: `floodsys/pipeline.py`)
- Run pipeline → Run output files: writes results (evidence: `README.md`)
- Dashboard → Bilingual situation report: displays report (evidence: `app/dashboard.py`)
