# jatiniitonly-ux/dislens architecture

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

- Interactive diagram: https://gitdiagram.com/jatiniitonly-ux/dislens
- Repository: https://github.com/jatiniitonly-ux/dislens

## Overview

DisasterLens AI is a browser-based flood-response decision-support dashboard, using a seeded synthetic event rather than live satellite data. Analysts inspect pre/post imagery metadata, validate uploads, run the staged analysis, review ranked zones and uncertainty on a map, and export JSON or PDF reports. Administrators can adjust priority weights. The map, charts, demo data, analysis engine and report generator are represented as distinct product components. The README documents the workflow; sampled source shows the main UI orchestration and module calls, but not every capability’s implementation details.

Main entry points: [`src/app/App.tsx`](https://github.com/jatiniitonly-ux/dislens/blob/main/src/app/App.tsx) (Dashboard workflow), [`src/components/MapView.tsx`](https://github.com/jatiniitonly-ux/dislens/blob/main/src/components/MapView.tsx) (Layered flood map), [`src/engine/analysis.ts`](https://github.com/jatiniitonly-ux/dislens/blob/main/src/engine/analysis.ts) (Detection and scoring), [`src/data/demo.ts`](https://github.com/jatiniitonly-ux/dislens/blob/main/src/data/demo.ts) (Synthetic event data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Analyst experience"]
  node_app["Dashboard workflow<br/>[App.tsx]"]
  node_map["Layered flood map<br/>[MapView.tsx]"]
  node_charts["Comparison charts<br/>[Charts.tsx]"]
  node_entry["Application entry<br/>[main.tsx]"]
end

subgraph group_analysis["Analysis and scoring"]
  node_engine["Detection and scoring<br/>[analysis.ts]"]
end

subgraph group_evidence["Evidence and reporting"]
  node_demo["Synthetic event data<br/>[demo.ts]"]
  node_reports["Incident reports<br/>[reports.ts]"]
end

subgraph group_contracts["Shared contracts"]
  node_types["Domain data contracts<br/>[types.ts]"]
end

node_analyst(("Response analyst"))

node_analyst -->|"uses"| node_app
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_map
node_app -->|"renders"| node_charts
node_app -->|"loads event"| node_demo
node_app -->|"runs analysis"| node_engine
node_engine -->|"uses regions"| node_demo
node_app -->|"downloads reports"| node_reports
node_map -->|"selects zone"| node_app

click node_app "https://github.com/jatiniitonly-ux/dislens/blob/main/src/app/App.tsx"
click node_map "https://github.com/jatiniitonly-ux/dislens/blob/main/src/components/MapView.tsx"
click node_charts "https://github.com/jatiniitonly-ux/dislens/blob/main/src/components/Charts.tsx"
click node_demo "https://github.com/jatiniitonly-ux/dislens/blob/main/src/data/demo.ts"
click node_engine "https://github.com/jatiniitonly-ux/dislens/blob/main/src/engine/analysis.ts"
click node_reports "https://github.com/jatiniitonly-ux/dislens/blob/main/src/export/reports.ts"
click node_types "https://github.com/jatiniitonly-ux/dislens/blob/main/src/domain/types.ts"
click node_entry "https://github.com/jatiniitonly-ux/dislens/blob/main/src/main.tsx"

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_app,node_map,node_charts,node_entry toneBlue
class node_engine toneAmber
class node_demo,node_reports toneMint
class node_types toneRose
class node_analyst toneIndigo
```

## Components

### Analyst experience

- [Dashboard workflow](https://github.com/jatiniitonly-ux/dislens/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Layered flood map](https://github.com/jatiniitonly-ux/dislens/blob/main/src/components/MapView.tsx): `src/components/MapView.tsx`
- [Comparison charts](https://github.com/jatiniitonly-ux/dislens/blob/main/src/components/Charts.tsx): `src/components/Charts.tsx`
- [Application entry](https://github.com/jatiniitonly-ux/dislens/blob/main/src/main.tsx): `src/main.tsx`

### Analysis and scoring

- [Detection and scoring](https://github.com/jatiniitonly-ux/dislens/blob/main/src/engine/analysis.ts): `src/engine/analysis.ts`

### Evidence and reporting

- [Synthetic event data](https://github.com/jatiniitonly-ux/dislens/blob/main/src/data/demo.ts): `src/data/demo.ts`
- [Incident reports](https://github.com/jatiniitonly-ux/dislens/blob/main/src/export/reports.ts): `src/export/reports.ts`

### Shared contracts

- [Domain data contracts](https://github.com/jatiniitonly-ux/dislens/blob/main/src/domain/types.ts): `src/domain/types.ts`

### Other components

- **Response analyst**

## Connections

- Response analyst → Dashboard workflow: uses (evidence: `README.md`)
- Application entry → Dashboard workflow: renders (evidence: `src/main.tsx`)
- Dashboard workflow → Layered flood map: renders (evidence: `src/app/App.tsx`)
- Dashboard workflow → Comparison charts: renders (evidence: `src/app/App.tsx`)
- Dashboard workflow → Synthetic event data: loads event (evidence: `src/app/App.tsx`)
- Dashboard workflow → Detection and scoring: runs analysis (evidence: `src/app/App.tsx`)
- Detection and scoring → Synthetic event data: uses regions (evidence: `src/engine/analysis.ts`)
- Dashboard workflow → Incident reports: downloads reports (evidence: `src/app/App.tsx`)
- Layered flood map → Dashboard workflow: selects zone (evidence: `src/components/MapView.tsx`)
