# anuragkoirala51-crypto/idcs--integrated-disaster-cordination architecture

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

- Interactive diagram: https://gitdiagram.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination
- Repository: https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination

## Overview

IDCS is an offline-first disaster coordination dashboard for responders, volunteers, and command agencies. Its main workflow is to gather incident and environmental information, present it on command maps, prioritize and route emergency communications, and coordinate relief resources. The README documents the tactical mesh, drone-relay simulation, offline queues, and agency dispatch; the source index confirms selected page-to-component and data-layer dependencies. Several implementation details are unsampled, so those documented capabilities are shown without asserting unverified internal calls.

Main entry points: [`src/app/chat/page.tsx`](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/chat/page.tsx) (Agency Dispatch), [`src/app/command/page.tsx`](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/command/page.tsx) (Command Dashboard), [`src/app/government/page.tsx`](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/government/page.tsx) (Government Resource HQ), [`src/components/Map/MapClient.tsx`](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Map/MapClient.tsx) (Map and Incident Layers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operations["Command Operations"]
  node_command["Command Dashboard<br/>[page.tsx]"]
  node_network["Network Topology"]
  node_relays["Drone Relay Simulation<br/>[DroneRelay.tsx]"]
end

subgraph group_situational["Situational Awareness"]
  node_map["Tactical GIS Map<br/>[ReliefMap.tsx]"]
  node_mapclient["Map and Incident Layers<br/>[MapClient.tsx]"]
  node_globe["Disaster Globe<br/>[GlobeClient.tsx]"]
  node_disasterapi["Disaster and Weather Data<br/>[disasterApi.ts]"]
end

subgraph group_communications["Communications"]
  node_chat["Agency Dispatch<br/>[page.tsx]"]
  node_medium["Bearer Selection<br/>[MediumSelector.tsx]"]
  node_messagefeed["Message Feed<br/>[MessageFeed.tsx]"]
  node_protocols["Emergency Protocols<br/>[commProtocols.ts]"]
  node_offlinechat["Offline Message Queue<br/>[offlineChat.ts]"]
  node_nostr["Nostr Messaging<br/>[nostr.ts]"]
  node_priority["Priority Engine<br/>[priorityEngine.ts]"]
end

subgraph group_coordination["Relief Coordination"]
  node_volunteers["Volunteer Coordination<br/>[page.tsx]"]
  node_government["Government Resource HQ<br/>[page.tsx]"]
end

subgraph group_platform["Application Data"]
  node_fetchdata["Relief Data Actions<br/>[fetchData.ts]"]
  node_mongodb["MongoDB Connection<br/>[mongodb.ts]"]
  node_reliefmodels[("Relief Records<br/>[Camp.ts]")]
  node_store["Shared App State<br/>[useAppStore.ts]"]
end

node_responders(("Field Responders"))

node_responders -->|"send dispatches"| node_chat
node_chat -->|"selects bearer"| node_medium
node_chat -->|"renders messages"| node_messagefeed
node_chat -->|"parses codes"| node_protocols
node_chat -->|"queues messages"| node_offlinechat
node_chat -->|"publishes messages"| node_nostr
node_chat -.->|"prioritizes traffic"| node_priority
node_responders -->|"monitor incidents"| node_command
node_command -->|"renders map"| node_map
node_command -->|"shows topology"| node_network
node_command -->|"loads disaster news"| node_disasterapi
node_command -->|"simulates deployment"| node_relays
node_map -.->|"renders map client"| node_mapclient
node_mapclient -->|"renders relays"| node_relays
node_mapclient -->|"loads location data"| node_disasterapi
node_globe -->|"fetches live events"| node_disasterapi
node_responders -->|"inspect disaster conditions"| node_globe
node_government -->|"renders relief map"| node_map
node_government -->|"reads shared state"| node_store
node_volunteers -->|"matches field tasks"| node_store
node_volunteers -->|"coordinates volunteers"| node_responders
node_fetchdata -->|"connects database"| node_mongodb
node_fetchdata -->|"queries relief records"| node_reliefmodels
node_government -.->|"loads relief data"| node_fetchdata

click node_command "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/command/page.tsx"
click node_network "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Network/NetworkTopology.tsx"
click node_relays "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Map/DroneRelay.tsx"
click node_chat "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/chat/page.tsx"
click node_medium "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Chat/MediumSelector.tsx"
click node_messagefeed "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Chat/MessageFeed.tsx"
click node_protocols "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/commProtocols.ts"
click node_offlinechat "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/offlineChat.ts"
click node_nostr "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/nostr.ts"
click node_map "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Map/ReliefMap.tsx"
click node_mapclient "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Map/MapClient.tsx"
click node_globe "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Globe/GlobeClient.tsx"
click node_disasterapi "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/disasterApi.ts"
click node_priority "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/priorityEngine.ts"
click node_volunteers "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/volunteers/page.tsx"
click node_government "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/government/page.tsx"
click node_fetchdata "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/actions/fetchData.ts"
click node_mongodb "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/mongodb.ts"
click node_reliefmodels "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/models/Camp.ts"
click node_store "https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/store/useAppStore.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_command,node_network,node_relays toneBlue
class node_map,node_mapclient,node_globe,node_disasterapi toneAmber
class node_chat,node_medium,node_messagefeed,node_protocols,node_offlinechat,node_nostr,node_priority toneMint
class node_volunteers,node_government toneRose
class node_fetchdata,node_mongodb,node_reliefmodels,node_store,node_responders toneIndigo
```

## Components

### Command Operations

- [Command Dashboard](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/command/page.tsx): `src/app/command/page.tsx`
- [Network Topology](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Network/NetworkTopology.tsx): `src/components/Network/NetworkTopology.tsx`
- [Drone Relay Simulation](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Map/DroneRelay.tsx): `src/components/Map/DroneRelay.tsx`

### Situational Awareness

- [Tactical GIS Map](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Map/ReliefMap.tsx): `src/components/Map/ReliefMap.tsx`
- [Map and Incident Layers](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Map/MapClient.tsx): `src/components/Map/MapClient.tsx`
- [Disaster Globe](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Globe/GlobeClient.tsx): `src/components/Globe/GlobeClient.tsx`
- [Disaster and Weather Data](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/disasterApi.ts): `src/lib/disasterApi.ts`

### Communications

- [Agency Dispatch](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/chat/page.tsx): `src/app/chat/page.tsx`
- [Bearer Selection](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Chat/MediumSelector.tsx): `src/components/Chat/MediumSelector.tsx`
- [Message Feed](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/components/Chat/MessageFeed.tsx): `src/components/Chat/MessageFeed.tsx`
- [Emergency Protocols](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/commProtocols.ts): `src/lib/commProtocols.ts`
- [Offline Message Queue](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/offlineChat.ts): `src/lib/offlineChat.ts`
- [Nostr Messaging](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/nostr.ts): `src/lib/nostr.ts`
- [Priority Engine](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/priorityEngine.ts): `src/lib/priorityEngine.ts`

### Relief Coordination

- [Volunteer Coordination](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/volunteers/page.tsx): `src/app/volunteers/page.tsx`
- [Government Resource HQ](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/app/government/page.tsx): `src/app/government/page.tsx`

### Application Data

- [Relief Data Actions](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/actions/fetchData.ts): `src/actions/fetchData.ts`
- [MongoDB Connection](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/lib/mongodb.ts): `src/lib/mongodb.ts`
- [Relief Records](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/models/Camp.ts): `src/models/Camp.ts`
- [Shared App State](https://github.com/anuragkoirala51-crypto/idcs--integrated-disaster-cordination/blob/main/src/store/useAppStore.ts): `src/store/useAppStore.ts`

### Other components

- **Field Responders**

## Connections

- Field Responders → Agency Dispatch: send dispatches
- Agency Dispatch → Bearer Selection: selects bearer (evidence: `src/app/chat/page.tsx`)
- Agency Dispatch → Message Feed: renders messages (evidence: `src/app/chat/page.tsx`)
- Agency Dispatch → Emergency Protocols: parses codes (evidence: `src/app/chat/page.tsx`)
- Agency Dispatch → Offline Message Queue: queues messages (evidence: `src/app/chat/page.tsx`)
- Agency Dispatch → Nostr Messaging: publishes messages (evidence: `src/app/chat/page.tsx`)
- Agency Dispatch → Priority Engine: prioritizes traffic
- Field Responders → Command Dashboard: monitor incidents
- Command Dashboard → Tactical GIS Map: renders map (evidence: `src/app/command/page.tsx`)
- Command Dashboard → Network Topology: shows topology (evidence: `src/app/command/page.tsx`)
- Command Dashboard → Disaster and Weather Data: loads disaster news (evidence: `src/app/command/page.tsx`)
- Command Dashboard → Drone Relay Simulation: simulates deployment
- Tactical GIS Map → Map and Incident Layers: renders map client
- Map and Incident Layers → Drone Relay Simulation: renders relays (evidence: `src/components/Map/MapClient.tsx`)
- Map and Incident Layers → Disaster and Weather Data: loads location data (evidence: `src/components/Map/MapClient.tsx`)
- Disaster Globe → Disaster and Weather Data: fetches live events (evidence: `src/components/Globe/GlobeClient.tsx`)
- Field Responders → Disaster Globe: inspect disaster conditions
- Government Resource HQ → Tactical GIS Map: renders relief map (evidence: `src/app/government/page.tsx`)
- Government Resource HQ → Shared App State: reads shared state (evidence: `src/app/government/page.tsx`)
- Volunteer Coordination → Shared App State: matches field tasks (evidence: `src/app/volunteers/page.tsx`)
- Volunteer Coordination → Field Responders: coordinates volunteers
- Relief Data Actions → MongoDB Connection: connects database (evidence: `src/actions/fetchData.ts`)
- Relief Data Actions → Relief Records: queries relief records (evidence: `src/actions/fetchData.ts`)
- Government Resource HQ → Relief Data Actions: loads relief data
