# samriddhi2252/resqlink_final architecture

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

- Interactive diagram: https://gitdiagram.com/samriddhi2252/resqlink_final
- Repository: https://github.com/samriddhi2252/resqlink_final

## Overview

ResQLink is a disaster-response web app whose central workflow brings users into an emergency interface, where they can request or offer help, find shelters and resources, and coordinate rescue assignments. Triage adds structured incident details and resource matching; map, shelter, and live-feed views support situational awareness. NGO and volunteer workflows manage task assignment through completion. The graph combines excerpted calls and imports with documented capabilities; several component-to-App wiring details and backend route implementations were not shown, so uncertain links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/samriddhi2252/resqlink_final/blob/main/src/App.tsx) (App shell), [`src/components/ngo-dashboard.tsx`](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/ngo-dashboard.tsx) (NGO dashboard), [`src/components/triage-panel.tsx`](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/triage-panel.tsx) (Emergency triage), [`src/components/map-view.tsx`](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/map-view.tsx) (Interactive map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Emergency experience"]
  node_app["App shell<br/>[App.tsx]"]
end

subgraph group_response["Incident response"]
  node_sos["SOS alert<br/>[sos-drawer.tsx]"]
  node_triage["Emergency triage<br/>[triage-panel.tsx]"]
  node_triageparse["Triage fallback<br/>[triage-fallback.ts]"]
  node_resource_match["Resource matching"]
  node_find_help["Find help"]
  node_offer_help["Offer help"]
  node_voice["Voice input<br/>[use-voice-input.ts]"]
end

subgraph group_awareness["Maps and updates"]
  node_map["Interactive map<br/>[map-view.tsx]"]
  node_mapdata["Regional hazard data"]
  node_regional_data["Delhi NCR map data"]
  node_shelter["Shelter finder<br/>[shelter-widget.tsx]"]
  node_feed["Live feed<br/>[live-feed.tsx]"]
end

subgraph group_coordination["Rescue coordination"]
  node_vol_reg["Volunteer registration"]
  node_volunteers["Volunteer records<br/>[use-volunteers.ts]"]
  node_offers["Volunteer offers"]
  node_ngo_login["NGO login"]
  node_ngo_dash["NGO dashboard<br/>[ngo-dashboard.tsx]"]
  node_vol_dash["Volunteer dashboard"]
  node_tasks["Rescue task lifecycle"]
end

subgraph group_services["Data and services"]
  node_auth["Role sessions<br/>[ngo-auth.ts]"]
  node_ngo_data["NGO data<br/>[use-ngo-data.ts]"]
  node_backend["ResQLink API<br/>[index.ts]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
end

node_people(("People"))

node_people -->|"use"| node_app
node_app -->|"opens"| node_sos
node_app -->|"renders"| node_map
node_app -->|"renders"| node_feed
node_app -->|"renders"| node_shelter
node_app -->|"renders"| node_find_help
node_app -->|"renders"| node_offer_help
node_app -->|"opens"| node_vol_reg
node_app -.->|"opens"| node_ngo_login
node_app -.->|"opens"| node_ngo_dash
node_app -.->|"opens"| node_vol_dash
node_app -->|"reads sessions"| node_auth
node_triage -->|"uses fallback"| node_triageparse
node_triage -->|"matches resources"| node_resource_match
node_triage -->|"uses voice"| node_voice
node_find_help -->|"uses voice"| node_voice
node_offer_help -->|"uses voice"| node_voice
node_map -->|"loads map data"| node_mapdata
node_map -->|"loads map data"| node_regional_data
node_vol_reg -->|"registers"| node_volunteers
node_volunteers -->|"uses client"| node_supabase
node_offers -->|"uses client"| node_supabase
node_ngo_dash -->|"loads data"| node_ngo_data
node_ngo_dash -->|"uses sessions"| node_auth
node_ngo_dash -.->|"shows tasks"| node_tasks
node_vol_dash -->|"manages tasks"| node_tasks
node_vol_dash -->|"uses sessions"| node_auth
node_tasks -.->|"calls API"| node_backend

click node_app "https://github.com/samriddhi2252/resqlink_final/blob/main/src/App.tsx"
click node_sos "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/sos-drawer.tsx"
click node_triage "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/triage-panel.tsx"
click node_triageparse "https://github.com/samriddhi2252/resqlink_final/blob/main/src/lib/triage-fallback.ts"
click node_resource_match "https://github.com/samriddhi2252/resqlink_final/blob/main/src/lib/triage-resource-match.ts"
click node_find_help "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/find-help-panel.tsx"
click node_offer_help "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/offer-help-panel.tsx"
click node_voice "https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-voice-input.ts"
click node_map "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/map-view.tsx"
click node_mapdata "https://github.com/samriddhi2252/resqlink_final/blob/main/src/data/joshimath-map-data.ts"
click node_regional_data "https://github.com/samriddhi2252/resqlink_final/blob/main/src/data/delhi-ncr-map-data.ts"
click node_shelter "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/shelter-widget.tsx"
click node_feed "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/live-feed.tsx"
click node_vol_reg "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/volunteer-registration-modal.tsx"
click node_volunteers "https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-volunteers.ts"
click node_offers "https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-volunteer-offers.ts"
click node_ngo_login "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/ngo-login-modal.tsx"
click node_ngo_dash "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/ngo-dashboard.tsx"
click node_vol_dash "https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/volunteer-rescue-dashboard.tsx"
click node_tasks "https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-rescue-tasks.ts"
click node_auth "https://github.com/samriddhi2252/resqlink_final/blob/main/src/lib/ngo-auth.ts"
click node_ngo_data "https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-ngo-data.ts"
click node_backend "https://github.com/samriddhi2252/resqlink_final/blob/main/server/index.ts"
click node_supabase "https://github.com/samriddhi2252/resqlink_final/blob/main/src/lib/supabase.ts"

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 toneBlue
class node_sos,node_triage,node_triageparse,node_resource_match,node_find_help,node_offer_help,node_voice toneAmber
class node_map,node_mapdata,node_regional_data,node_shelter,node_feed toneMint
class node_vol_reg,node_volunteers,node_offers,node_ngo_login,node_ngo_dash,node_vol_dash,node_tasks toneRose
class node_auth,node_ngo_data,node_backend,node_supabase,node_people toneIndigo
```

## Components

### Emergency experience

- [App shell](https://github.com/samriddhi2252/resqlink_final/blob/main/src/App.tsx): `src/App.tsx`

### Incident response

- [SOS alert](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/sos-drawer.tsx): `src/components/sos-drawer.tsx`
- [Emergency triage](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/triage-panel.tsx): `src/components/triage-panel.tsx`
- [Triage fallback](https://github.com/samriddhi2252/resqlink_final/blob/main/src/lib/triage-fallback.ts): `src/lib/triage-fallback.ts`
- [Resource matching](https://github.com/samriddhi2252/resqlink_final/blob/main/src/lib/triage-resource-match.ts): `src/lib/triage-resource-match.ts`
- [Find help](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/find-help-panel.tsx): `src/components/find-help-panel.tsx`
- [Offer help](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/offer-help-panel.tsx): `src/components/offer-help-panel.tsx`
- [Voice input](https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-voice-input.ts): `src/hooks/use-voice-input.ts`

### Maps and updates

- [Interactive map](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/map-view.tsx): `src/components/map-view.tsx`
- [Regional hazard data](https://github.com/samriddhi2252/resqlink_final/blob/main/src/data/joshimath-map-data.ts): `src/data/joshimath-map-data.ts`
- [Delhi NCR map data](https://github.com/samriddhi2252/resqlink_final/blob/main/src/data/delhi-ncr-map-data.ts): `src/data/delhi-ncr-map-data.ts`
- [Shelter finder](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/shelter-widget.tsx): `src/components/shelter-widget.tsx`
- [Live feed](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/live-feed.tsx): `src/components/live-feed.tsx`

### Rescue coordination

- [Volunteer registration](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/volunteer-registration-modal.tsx): `src/components/volunteer-registration-modal.tsx`
- [Volunteer records](https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-volunteers.ts): `src/hooks/use-volunteers.ts`
- [Volunteer offers](https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-volunteer-offers.ts): `src/hooks/use-volunteer-offers.ts`
- [NGO login](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/ngo-login-modal.tsx): `src/components/ngo-login-modal.tsx`
- [NGO dashboard](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/ngo-dashboard.tsx): `src/components/ngo-dashboard.tsx`
- [Volunteer dashboard](https://github.com/samriddhi2252/resqlink_final/blob/main/src/components/volunteer-rescue-dashboard.tsx): `src/components/volunteer-rescue-dashboard.tsx`
- [Rescue task lifecycle](https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-rescue-tasks.ts): `src/hooks/use-rescue-tasks.ts`

### Data and services

- [Role sessions](https://github.com/samriddhi2252/resqlink_final/blob/main/src/lib/ngo-auth.ts): `src/lib/ngo-auth.ts`
- [NGO data](https://github.com/samriddhi2252/resqlink_final/blob/main/src/hooks/use-ngo-data.ts): `src/hooks/use-ngo-data.ts`
- [ResQLink API](https://github.com/samriddhi2252/resqlink_final/blob/main/server/index.ts): `server/index.ts`
- [Supabase client](https://github.com/samriddhi2252/resqlink_final/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Other components

- **People**

## Connections

- People → App shell: use (evidence: `README.md`)
- App shell → SOS alert: opens (evidence: `src/App.tsx`)
- App shell → Interactive map: renders (evidence: `src/App.tsx`)
- App shell → Live feed: renders (evidence: `src/App.tsx`)
- App shell → Shelter finder: renders (evidence: `src/App.tsx`)
- App shell → Find help: renders (evidence: `src/App.tsx`)
- App shell → Offer help: renders (evidence: `src/App.tsx`)
- App shell → Volunteer registration: opens (evidence: `src/App.tsx`)
- App shell → NGO login: opens (evidence: `src/App.tsx`)
- App shell → NGO dashboard: opens (evidence: `src/App.tsx`)
- App shell → Volunteer dashboard: opens (evidence: `src/App.tsx`)
- App shell → Role sessions: reads sessions (evidence: `src/App.tsx`)
- Emergency triage → Triage fallback: uses fallback (evidence: `src/components/triage-panel.tsx`)
- Emergency triage → Resource matching: matches resources (evidence: `src/components/triage-panel.tsx`)
- Emergency triage → Voice input: uses voice (evidence: `src/components/triage-panel.tsx`)
- Find help → Voice input: uses voice (evidence: `src/components/find-help-panel.tsx`)
- Offer help → Voice input: uses voice (evidence: `src/components/offer-help-panel.tsx`)
- Interactive map → Regional hazard data: loads map data (evidence: `src/components/map-view.tsx`)
- Interactive map → Delhi NCR map data: loads map data (evidence: `src/components/map-view.tsx`)
- Volunteer registration → Volunteer records: registers (evidence: `src/components/volunteer-registration-modal.tsx`)
- Volunteer records → Supabase client: uses client (evidence: `src/hooks/use-volunteers.ts`)
- Volunteer offers → Supabase client: uses client (evidence: `src/hooks/use-volunteer-offers.ts`)
- NGO dashboard → NGO data: loads data (evidence: `src/components/ngo-dashboard.tsx`)
- NGO dashboard → Role sessions: uses sessions (evidence: `src/components/ngo-dashboard.tsx`)
- NGO dashboard → Rescue task lifecycle: shows tasks
- Volunteer dashboard → Rescue task lifecycle: manages tasks (evidence: `src/components/volunteer-rescue-dashboard.tsx`)
- Volunteer dashboard → Role sessions: uses sessions (evidence: `src/components/volunteer-rescue-dashboard.tsx`)
- Rescue task lifecycle → ResQLink API: calls API
