# yuvanshankar9080-alt/superman architecture

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

- Interactive diagram: https://gitdiagram.com/yuvanshankar9080-alt/superman
- Repository: https://github.com/yuvanshankar9080-alt/superman

## Overview

Suraksha Campus is a role-aware school emergency-management dashboard. Users navigate to a response area, configure campus exits and assembly points, coordinate evacuation and track staff and students, or manage alerts and SOS requests. Its broader dashboard also provides disaster monitoring, India disaster information and news, safety guides, messaging, profiles and settings. The shared React context holds app and emergency state; the supplied excerpts show in-app state and mock data, not a backend or live external dispatch integration.

Main entry points: [`src/App.tsx`](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/App.tsx) (Page dispatcher), [`src/context/AppContext.tsx`](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/context/AppContext.tsx) (Shared app state), [`src/components/map/InteractiveCampusMap.tsx`](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/map/InteractiveCampusMap.tsx) (Interactive campus map), [`src/data/mockData.ts`](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/data/mockData.ts) (Mock data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_entry["App entry<br/>[main.tsx]"]
  node_router["Page dispatcher<br/>[App.tsx]"]
  node_navigation["Role navigation<br/>[Sidebar.tsx]"]
  node_topbar["Emergency controls<br/>[TopNavigation.tsx]"]
  node_roles["Role switching"]
  node_state["Shared app state<br/>[AppContext.tsx]"]
  node_profile["User profile<br/>[ProfilePage.tsx]"]
  node_settings["App settings<br/>[SettingsPage.tsx]"]
end

subgraph group_command["Campus response"]
  node_dashboard["Emergency dashboard<br/>[DashboardPage.tsx]"]
  node_schoolmap["Campus map setup<br/>[SchoolMapPage.tsx]"]
  node_map["Interactive campus map"]
  node_evacuation["Evacuation management<br/>[EvacuationPage.tsx]"]
  node_report["Evacuation report"]
  node_sos["SOS response<br/>[SosPage.tsx]"]
  node_alerts["Alert management"]
end

subgraph group_coordination["People and communication"]
  node_students["Student tracking"]
  node_teachers["Teacher tracking"]
  node_messaging["Campus messaging<br/>[MessagingPage.tsx]"]
end

subgraph group_intelligence["Disaster information"]
  node_monitoring["Disaster monitoring"]
  node_india["India disaster info"]
  node_news["Disaster news"]
  node_guides["Safety guides"]
  node_data["Mock data<br/>[mockData.ts]"]
end

node_user(("Campus user"))

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_router
node_router -->|"provides state"| node_state
node_router -->|"renders"| node_navigation
node_router -->|"renders"| node_topbar
node_router -->|"dispatches page"| node_dashboard
node_router -->|"dispatches page"| node_schoolmap
node_router -->|"dispatches page"| node_evacuation
node_router -->|"dispatches page"| node_sos
node_router -->|"dispatches page"| node_alerts
node_router -->|"dispatches page"| node_students
node_router -->|"dispatches page"| node_teachers
node_router -->|"dispatches page"| node_monitoring
node_router -->|"dispatches page"| node_india
node_router -->|"dispatches page"| node_news
node_router -->|"dispatches page"| node_messaging
node_router -->|"dispatches page"| node_guides
node_router -->|"dispatches page"| node_profile
node_router -->|"dispatches page"| node_settings
node_topbar -->|"opens"| node_roles
node_navigation -->|"reads state"| node_state
node_roles -->|"updates role"| node_state
node_topbar -.->|"controls"| node_state
node_dashboard -->|"reads state"| node_state
node_dashboard -->|"renders map"| node_map
node_schoolmap -->|"updates map state"| node_state
node_schoolmap -->|"renders map"| node_map
node_schoolmap -->|"reads default map"| node_data
node_evacuation -->|"reads and updates"| node_state
node_evacuation -->|"renders map"| node_map
node_evacuation -->|"opens report"| node_report
node_sos -.->|"submits request"| node_state
node_alerts -->|"reads and updates"| node_state
node_students -->|"reads tracking state"| node_state
node_students -->|"renders map"| node_map
node_teachers -->|"reads tracking state"| node_state
node_teachers -->|"renders map"| node_map
node_messaging -->|"reads and updates"| node_state
node_india -->|"reads information"| node_data
node_state -->|"initializes from"| node_data
node_monitoring -.->|"uses disaster data"| node_data
node_news -.->|"uses news data"| node_data

click node_entry "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/main.tsx"
click node_router "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/App.tsx"
click node_navigation "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/layout/Sidebar.tsx"
click node_topbar "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/layout/TopNavigation.tsx"
click node_roles "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/common/RoleSwitcherModal.tsx"
click node_state "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/context/AppContext.tsx"
click node_dashboard "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/DashboardPage.tsx"
click node_schoolmap "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/SchoolMapPage.tsx"
click node_map "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/map/InteractiveCampusMap.tsx"
click node_evacuation "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/EvacuationPage.tsx"
click node_report "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/evacuation/EvacuationReportModal.tsx"
click node_sos "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/SosPage.tsx"
click node_alerts "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/AlertManagementPage.tsx"
click node_students "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/StudentTrackingPage.tsx"
click node_teachers "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/TeacherTrackingPage.tsx"
click node_messaging "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/MessagingPage.tsx"
click node_monitoring "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/DisasterMonitoringPage.tsx"
click node_india "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/IndiaDisasterInfoPage.tsx"
click node_news "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/DisasterNewsPage.tsx"
click node_guides "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/DisasterSafetyGuidesPage.tsx"
click node_data "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/data/mockData.ts"
click node_profile "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/ProfilePage.tsx"
click node_settings "https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/SettingsPage.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_entry,node_router,node_navigation,node_topbar,node_roles,node_state,node_profile,node_settings,node_user toneBlue
class node_dashboard,node_schoolmap,node_map,node_evacuation,node_report,node_sos,node_alerts toneAmber
class node_students,node_teachers,node_messaging toneMint
class node_monitoring,node_india,node_news,node_guides,node_data toneRose
```

## Components

### Application shell

- [App entry](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/main.tsx): `src/main.tsx`
- [Page dispatcher](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/App.tsx): `src/App.tsx`
- [Role navigation](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/layout/Sidebar.tsx): `src/components/layout/Sidebar.tsx`
- [Emergency controls](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/layout/TopNavigation.tsx): `src/components/layout/TopNavigation.tsx`
- [Role switching](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/common/RoleSwitcherModal.tsx): `src/components/common/RoleSwitcherModal.tsx`
- [Shared app state](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/context/AppContext.tsx): `src/context/AppContext.tsx`
- [User profile](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/ProfilePage.tsx): `src/pages/ProfilePage.tsx`
- [App settings](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/SettingsPage.tsx): `src/pages/SettingsPage.tsx`

### Campus response

- [Emergency dashboard](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/DashboardPage.tsx): `src/pages/DashboardPage.tsx`
- [Campus map setup](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/SchoolMapPage.tsx): `src/pages/SchoolMapPage.tsx`
- [Interactive campus map](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/map/InteractiveCampusMap.tsx): `src/components/map/InteractiveCampusMap.tsx`
- [Evacuation management](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/EvacuationPage.tsx): `src/pages/EvacuationPage.tsx`
- [Evacuation report](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/components/evacuation/EvacuationReportModal.tsx): `src/components/evacuation/EvacuationReportModal.tsx`
- [SOS response](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/SosPage.tsx): `src/pages/SosPage.tsx`
- [Alert management](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/AlertManagementPage.tsx): `src/pages/AlertManagementPage.tsx`

### People and communication

- [Student tracking](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/StudentTrackingPage.tsx): `src/pages/StudentTrackingPage.tsx`
- [Teacher tracking](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/TeacherTrackingPage.tsx): `src/pages/TeacherTrackingPage.tsx`
- [Campus messaging](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/MessagingPage.tsx): `src/pages/MessagingPage.tsx`

### Disaster information

- [Disaster monitoring](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/DisasterMonitoringPage.tsx): `src/pages/DisasterMonitoringPage.tsx`
- [India disaster info](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/IndiaDisasterInfoPage.tsx): `src/pages/IndiaDisasterInfoPage.tsx`
- [Disaster news](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/DisasterNewsPage.tsx): `src/pages/DisasterNewsPage.tsx`
- [Safety guides](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/pages/DisasterSafetyGuidesPage.tsx): `src/pages/DisasterSafetyGuidesPage.tsx`
- [Mock data](https://github.com/yuvanshankar9080-alt/superman/blob/main/src/data/mockData.ts): `src/data/mockData.ts`

### Other components

- **Campus user**

## Connections

- Campus user → App entry: opens app (evidence: `src/main.tsx`)
- App entry → Page dispatcher: renders (evidence: `src/main.tsx`)
- Page dispatcher → Shared app state: provides state (evidence: `src/App.tsx`)
- Page dispatcher → Role navigation: renders (evidence: `src/App.tsx`)
- Page dispatcher → Emergency controls: renders (evidence: `src/App.tsx`)
- Page dispatcher → Emergency dashboard: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Campus map setup: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Evacuation management: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → SOS response: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Alert management: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Student tracking: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Teacher tracking: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Disaster monitoring: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → India disaster info: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Disaster news: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Campus messaging: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → Safety guides: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → User profile: dispatches page (evidence: `src/App.tsx`)
- Page dispatcher → App settings: dispatches page (evidence: `src/App.tsx`)
- Emergency controls → Role switching: opens (evidence: `src/components/layout/TopNavigation.tsx`)
- Role navigation → Shared app state: reads state (evidence: `src/components/layout/Sidebar.tsx`)
- Role switching → Shared app state: updates role (evidence: `src/components/common/RoleSwitcherModal.tsx`)
- Emergency controls → Shared app state: controls (evidence: `src/components/layout/TopNavigation.tsx`)
- Emergency dashboard → Shared app state: reads state (evidence: `src/pages/DashboardPage.tsx`)
- Emergency dashboard → Interactive campus map: renders map (evidence: `src/pages/DashboardPage.tsx`)
- Campus map setup → Shared app state: updates map state (evidence: `src/pages/SchoolMapPage.tsx`)
- Campus map setup → Interactive campus map: renders map (evidence: `src/pages/SchoolMapPage.tsx`)
- Campus map setup → Mock data: reads default map (evidence: `src/pages/SchoolMapPage.tsx`)
- Evacuation management → Shared app state: reads and updates (evidence: `src/pages/EvacuationPage.tsx`)
- Evacuation management → Interactive campus map: renders map (evidence: `src/pages/EvacuationPage.tsx`)
- Evacuation management → Evacuation report: opens report (evidence: `src/pages/EvacuationPage.tsx`)
- SOS response → Shared app state: submits request (evidence: `src/pages/SosPage.tsx`)
- Alert management → Shared app state: reads and updates (evidence: `src/pages/AlertManagementPage.tsx`)
- Student tracking → Shared app state: reads tracking state (evidence: `src/pages/StudentTrackingPage.tsx`)
- Student tracking → Interactive campus map: renders map (evidence: `src/pages/StudentTrackingPage.tsx`)
- Teacher tracking → Shared app state: reads tracking state (evidence: `src/pages/TeacherTrackingPage.tsx`)
- Teacher tracking → Interactive campus map: renders map (evidence: `src/pages/TeacherTrackingPage.tsx`)
- Campus messaging → Shared app state: reads and updates (evidence: `src/pages/MessagingPage.tsx`)
- India disaster info → Mock data: reads information (evidence: `src/pages/IndiaDisasterInfoPage.tsx`)
- Shared app state → Mock data: initializes from (evidence: `src/context/AppContext.tsx`)
- Disaster monitoring → Mock data: uses disaster data
- Disaster news → Mock data: uses news data
