# sakshamnagar2805/reliefhub architecture

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

- Interactive diagram: https://gitdiagram.com/sakshamnagar2805/reliefhub
- Repository: https://github.com/sakshamnagar2805/reliefhub

## Overview

ReliefHub is a client-side disaster-relief coordination app for capturing citizen needs, registering supplies, recommending matches, and tracking dispatches. The main workflow runs through App.jsx, which manages request/resource state, persists it locally, computes recommendations, and renders operational views. The broader interface also includes shelter capacity, volunteer inventory, gap intelligence, scenario simulation, a tactical map, and a citizen-facing emergency chatbot. Edges reflect the sampled App, storage, matching, and view excerpts; unsampled component wiring is left unasserted.

Main entry points: [`reliefhub/src/App.jsx`](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/App.jsx) (Application state and views), [`reliefhub/src/main.jsx`](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/main.jsx) (React entry), [`reliefhub/src/utils/storage.js`](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/utils/storage.js) (Local data persistence), [`reliefhub/src/views/CitizenView.jsx`](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/CitizenView.jsx) (Citizen requests and tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["App Coordination"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["Application state and views<br/>[App.jsx]"]
  node_storage[("Local data persistence<br/>[storage.js]")]
  node_header["Header<br/>[Header.jsx]"]
  node_sidebar["Navigation sidebar<br/>[Sidebar.jsx]"]
  node_login["Identity portal<br/>[LoginModal.jsx]"]
  node_seed["Initial request and resource data<br/>[seedData.js]"]
end

subgraph group_intake["Relief Intake"]
  node_citizen["Citizen requests and tracking<br/>[CitizenView.jsx]"]
  node_requestform["Emergency request form<br/>[RequestForm.jsx]"]
  node_chatbot["Emergency field relay"]
  node_requestlist["Request queue<br/>[RequestList.jsx]"]
  node_resources["Volunteer resource registry<br/>[VolunteerView.jsx]"]
  node_resourceform["Resource registration form<br/>[ResourceForm.jsx]"]
  node_resourcelist["Resource inventory list<br/>[ResourceList.jsx]"]
end

subgraph group_matching["Matching Intelligence"]
  node_matcher["Relief matching engine<br/>[matching.js]"]
  node_matchpanel["Match recommendations<br/>[MatchPanel.jsx]"]
  node_metrics["Operational metrics<br/>[MetricCards.jsx]"]
  node_gaps["Needs gap radar<br/>[GapRadar.jsx]"]
  node_simulator["Scenario simulator"]
  node_map["Tactical sector map<br/>[TacticalMap.jsx]"]
  node_pulse["Relief pulse intelligence"]
end

subgraph group_operations["Field Operations"]
  node_assignments["Assignments and delivery tracking"]
  node_shelters["Shelter capacity directory<br/>[SheltersView.jsx]"]
  node_status["Status and urgency badges<br/>[StatusBadge.jsx]"]
end

node_user(("ReliefHub user"))

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"loads and saves"| node_storage
node_storage -->|"loads fallback data"| node_seed
node_app -->|"computes recommendations"| node_matcher
node_app -->|"renders"| node_metrics
node_app -->|"renders"| node_map
node_app -->|"renders"| node_gaps
node_app -->|"renders"| node_requestform
node_app -->|"renders"| node_resourceform
node_app -->|"renders"| node_requestlist
node_app -->|"renders"| node_resourcelist
node_app -->|"renders"| node_matchpanel
node_app -->|"renders"| node_citizen
node_app -->|"renders"| node_resources
node_app -->|"renders"| node_pulse
node_app -->|"renders"| node_shelters
node_app -->|"renders"| node_assignments
node_app -->|"renders"| node_simulator
node_app -->|"renders"| node_header
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_login
node_citizen -->|"renders badges"| node_status
node_assignments -->|"renders badges"| node_status

click node_entry "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/main.jsx"
click node_app "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/App.jsx"
click node_storage "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/utils/storage.js"
click node_header "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/Header.jsx"
click node_sidebar "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/Sidebar.jsx"
click node_login "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/LoginModal.jsx"
click node_citizen "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/CitizenView.jsx"
click node_requestform "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/RequestForm.jsx"
click node_chatbot "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/EmergencyChatbot.jsx"
click node_requestlist "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/RequestList.jsx"
click node_resources "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/VolunteerView.jsx"
click node_resourceform "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/ResourceForm.jsx"
click node_resourcelist "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/ResourceList.jsx"
click node_seed "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/data/seedData.js"
click node_matcher "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/utils/matching.js"
click node_matchpanel "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/MatchPanel.jsx"
click node_metrics "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/MetricCards.jsx"
click node_gaps "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/GapRadar.jsx"
click node_simulator "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/ScenarioSimulator.jsx"
click node_map "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/TacticalMap.jsx"
click node_pulse "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/ReliefPulseView.jsx"
click node_assignments "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/AssignmentsView.jsx"
click node_shelters "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/SheltersView.jsx"
click node_status "https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/StatusBadge.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_entry,node_app,node_storage,node_header,node_sidebar,node_login,node_seed,node_user toneBlue
class node_citizen,node_requestform,node_chatbot,node_requestlist,node_resources,node_resourceform,node_resourcelist toneAmber
class node_matcher,node_matchpanel,node_metrics,node_gaps,node_simulator,node_map,node_pulse toneMint
class node_assignments,node_shelters,node_status toneRose
```

## Components

### App Coordination

- [React entry](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/main.jsx): `reliefhub/src/main.jsx`
- [Application state and views](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/App.jsx): `reliefhub/src/App.jsx`
- [Local data persistence](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/utils/storage.js): `reliefhub/src/utils/storage.js`
- [Header](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/Header.jsx): `reliefhub/src/components/Header.jsx`
- [Navigation sidebar](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/Sidebar.jsx): `reliefhub/src/components/Sidebar.jsx`
- [Identity portal](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/LoginModal.jsx): `reliefhub/src/components/LoginModal.jsx`
- [Initial request and resource data](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/data/seedData.js): `reliefhub/src/data/seedData.js`

### Relief Intake

- [Citizen requests and tracking](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/CitizenView.jsx): `reliefhub/src/views/CitizenView.jsx`
- [Emergency request form](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/RequestForm.jsx): `reliefhub/src/components/RequestForm.jsx`
- [Emergency field relay](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/EmergencyChatbot.jsx): `reliefhub/src/components/EmergencyChatbot.jsx`
- [Request queue](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/RequestList.jsx): `reliefhub/src/components/RequestList.jsx`
- [Volunteer resource registry](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/VolunteerView.jsx): `reliefhub/src/views/VolunteerView.jsx`
- [Resource registration form](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/ResourceForm.jsx): `reliefhub/src/components/ResourceForm.jsx`
- [Resource inventory list](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/ResourceList.jsx): `reliefhub/src/components/ResourceList.jsx`

### Matching Intelligence

- [Relief matching engine](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/utils/matching.js): `reliefhub/src/utils/matching.js`
- [Match recommendations](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/MatchPanel.jsx): `reliefhub/src/components/MatchPanel.jsx`
- [Operational metrics](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/MetricCards.jsx): `reliefhub/src/components/MetricCards.jsx`
- [Needs gap radar](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/GapRadar.jsx): `reliefhub/src/components/GapRadar.jsx`
- [Scenario simulator](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/ScenarioSimulator.jsx): `reliefhub/src/components/ScenarioSimulator.jsx`
- [Tactical sector map](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/TacticalMap.jsx): `reliefhub/src/components/TacticalMap.jsx`
- [Relief pulse intelligence](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/ReliefPulseView.jsx): `reliefhub/src/views/ReliefPulseView.jsx`

### Field Operations

- [Assignments and delivery tracking](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/AssignmentsView.jsx): `reliefhub/src/views/AssignmentsView.jsx`
- [Shelter capacity directory](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/views/SheltersView.jsx): `reliefhub/src/views/SheltersView.jsx`
- [Status and urgency badges](https://github.com/sakshamnagar2805/reliefhub/blob/main/reliefhub/src/components/StatusBadge.jsx): `reliefhub/src/components/StatusBadge.jsx`

### Other components

- **ReliefHub user**

## Connections

- ReliefHub user → React entry: opens app (evidence: `reliefhub/src/main.jsx`)
- React entry → Application state and views: renders (evidence: `reliefhub/src/main.jsx`)
- Application state and views → Local data persistence: loads and saves (evidence: `reliefhub/src/App.jsx`)
- Local data persistence → Initial request and resource data: loads fallback data (evidence: `reliefhub/src/utils/storage.js`)
- Application state and views → Relief matching engine: computes recommendations (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Operational metrics: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Tactical sector map: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Needs gap radar: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Emergency request form: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Resource registration form: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Request queue: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Resource inventory list: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Match recommendations: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Citizen requests and tracking: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Volunteer resource registry: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Relief pulse intelligence: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Shelter capacity directory: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Assignments and delivery tracking: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Scenario simulator: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Header: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Navigation sidebar: renders (evidence: `reliefhub/src/App.jsx`)
- Application state and views → Identity portal: renders (evidence: `reliefhub/src/App.jsx`)
- Citizen requests and tracking → Status and urgency badges: renders badges (evidence: `reliefhub/src/views/CitizenView.jsx`)
- Assignments and delivery tracking → Status and urgency badges: renders badges (evidence: `reliefhub/src/views/AssignmentsView.jsx`)
