# yogeshwa-g/disaster-vision-web architecture

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

- Interactive diagram: https://gitdiagram.com/yogeshwa-g/disaster-vision-web
- Repository: https://github.com/yogeshwa-g/disaster-vision-web

## Overview

DisasterVision is a local web app for exploring dated glacier satellite imagery and producing an educational image-change forecast. A user selects a location and future year; the browser requests analysis, the web server validates and forwards it to the internal analysis server, and the engine compares historical images with the latest image before returning risk and threshold estimates. The app also discovers dataset locations, serves the latest-image preview, and includes an interactive Earth visualization. Calls and data flow are shown where supported by excerpts; some presentation wiring is not sampled.

Main entry points: [`client.py`](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/client.py) (HTTP web server), [`static/js/app.js`](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/static/js/app.js) (Browser interface), [`analysis_engine.py`](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py) (Dated image catalog), [`Server.py`](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/Server.py) (Analysis dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_ui["Browser interface<br/>[app.js]"]
  node_earth(("Interactive Earth<br/>[app.js]"))
  node_page["Web page<br/>[index.html]"]
  node_assets["Static assets"]
end

subgraph group_services["Server services"]
  node_http["HTTP web server<br/>[client.py]"]
  node_options["Location discovery<br/>[analysis_engine.py]"]
  node_preview["Image preview<br/>[client.py]"]
  node_dispatch["Analysis dispatch<br/>[Server.py]"]
end

subgraph group_analysis["Image analysis"]
  node_catalog["Dated image catalog<br/>[analysis_engine.py]"]
  node_difference["Pixel comparison<br/>[analysis_engine.py]"]
  node_forecast["Risk forecast<br/>[analysis_engine.py]"]
end

subgraph group_data["Satellite data"]
  node_images[("Glacier image folders")]
end

node_user(("User"))

node_user -->|"selects and requests"| node_ui
node_ui -->|"requests options"| node_http
node_ui -->|"requests preview"| node_http
node_ui -->|"submits analysis"| node_http
node_http -->|"serves page"| node_page
node_http -->|"serves files"| node_assets
node_http -->|"reads options"| node_options
node_http -->|"routes preview"| node_preview
node_preview -->|"lists dated images"| node_catalog
node_preview -->|"reads latest image"| node_images
node_http -->|"forwards analysis"| node_dispatch
node_dispatch -->|"validates location"| node_options
node_dispatch -->|"calls analysis"| node_catalog
node_catalog -->|"lists image files"| node_images
node_catalog -->|"compares dated images"| node_difference
node_difference -->|"reads image pixels"| node_images
node_catalog -->|"passes changes"| node_forecast
node_forecast -->|"fits annual rate"| node_difference
node_ui -->|"renders visualization"| node_earth

click node_ui "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/static/js/app.js"
click node_earth "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/static/js/app.js"
click node_page "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/templates/index.html"
click node_assets "https://github.com/yogeshwa-g/disaster-vision-web/tree/main/static"
click node_http "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/client.py"
click node_options "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py"
click node_preview "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/client.py"
click node_dispatch "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/Server.py"
click node_catalog "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py"
click node_difference "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py"
click node_forecast "https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py"
click node_images "https://github.com/yogeshwa-g/disaster-vision-web/tree/main/satellite_data/GLACIER"

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_ui,node_earth,node_page,node_assets,node_user toneBlue
class node_http,node_options,node_preview,node_dispatch toneAmber
class node_catalog,node_difference,node_forecast toneMint
class node_images toneRose
```

## Components

### Web experience

- [Browser interface](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/static/js/app.js): `static/js/app.js`
- [Interactive Earth](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/static/js/app.js): `static/js/app.js`
- [Web page](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/templates/index.html): `templates/index.html`
- [Static assets](https://github.com/yogeshwa-g/disaster-vision-web/tree/main/static): `static`

### Server services

- [HTTP web server](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/client.py): `client.py`
- [Location discovery](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py): `analysis_engine.py`
- [Image preview](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/client.py): `client.py`
- [Analysis dispatch](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/Server.py): `Server.py`

### Image analysis

- [Dated image catalog](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py): `analysis_engine.py`
- [Pixel comparison](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py): `analysis_engine.py`
- [Risk forecast](https://github.com/yogeshwa-g/disaster-vision-web/blob/main/analysis_engine.py): `analysis_engine.py`

### Satellite data

- [Glacier image folders](https://github.com/yogeshwa-g/disaster-vision-web/tree/main/satellite_data/GLACIER): `satellite_data/GLACIER`

### Other components

- **User**

## Connections

- User → Browser interface: selects and requests (evidence: `README.txt`)
- Browser interface → HTTP web server: requests options (evidence: `static/js/app.js`)
- Browser interface → HTTP web server: requests preview (evidence: `static/js/app.js`)
- Browser interface → HTTP web server: submits analysis (evidence: `static/js/app.js`)
- HTTP web server → Web page: serves page (evidence: `client.py`)
- HTTP web server → Static assets: serves files (evidence: `client.py`)
- HTTP web server → Location discovery: reads options (evidence: `client.py`)
- HTTP web server → Image preview: routes preview (evidence: `client.py`)
- Image preview → Dated image catalog: lists dated images (evidence: `client.py`)
- Image preview → Glacier image folders: reads latest image (evidence: `client.py`)
- HTTP web server → Analysis dispatch: forwards analysis (evidence: `client.py`)
- Analysis dispatch → Location discovery: validates location (evidence: `Server.py`)
- Analysis dispatch → Dated image catalog: calls analysis (evidence: `Server.py`)
- Dated image catalog → Glacier image folders: lists image files (evidence: `analysis_engine.py`)
- Dated image catalog → Pixel comparison: compares dated images (evidence: `analysis_engine.py`)
- Pixel comparison → Glacier image folders: reads image pixels (evidence: `analysis_engine.py`)
- Dated image catalog → Risk forecast: passes changes (evidence: `analysis_engine.py`)
- Risk forecast → Pixel comparison: fits annual rate (evidence: `analysis_engine.py`)
- Browser interface → Interactive Earth: renders visualization (evidence: `README.txt`)
