How nithish-alt/superman works
This is a React-based school emergency-preparedness and response dashboard. Users navigate role-aware views to monitor disasters, manage campus evacuation plans, track students and staff, issue SOS requests and alerts, and coordinate through messaging. The app routes these views through shared in-memory context state populated with demo data; map configuration supports campus exits, assembly points, and unsafe zones. The sampled code confirms app routing and map/context behavior, but most page implementations and external-service integrations were not inspected, so their internal connections are omitted.
Main entry points: App.tsx App router · AppContext.tsx Shared emergency state · SchoolMapPage.tsx Campus map management · InteractiveCampusMap.tsx Interactive campus map
Components 23
Application shell
- App router
src/App.tsx - Top navigation
src/components/layout/TopNavigation.tsx - Sidebar navigation
src/components/layout/Sidebar.tsx
Campus response
- Dashboard
src/pages/DashboardPage.tsx - Campus map management
src/pages/SchoolMapPage.tsx - Interactive campus map
src/components/map/InteractiveCampusMap.tsx - Evacuation planning
src/pages/EvacuationPage.tsx - Evacuation reporting
src/components/evacuation/EvacuationReportModal.tsx - SOS requests
src/pages/SosPage.tsx - Student tracking
src/pages/StudentTrackingPage.tsx - Teacher tracking
src/pages/TeacherTrackingPage.tsx - Alert management
src/pages/AlertManagementPage.tsx
Disaster monitoring
- Disaster monitoring
src/pages/DisasterMonitoringPage.tsx - India disaster information
src/pages/IndiaDisasterInfoPage.tsx - Disaster news
src/pages/DisasterNewsPage.tsx - Safety guides
src/pages/DisasterSafetyGuidesPage.tsx
Communications and settings
- Emergency messaging
src/pages/MessagingPage.tsx - Settings
src/pages/SettingsPage.tsx - User profile
src/pages/ProfilePage.tsx - Role switcher
src/components/common/RoleSwitcherModal.tsx
Shared state and data
- Shared emergency state
src/context/AppContext.tsx - Demo records
src/data/mockData.ts - Domain types
src/types/index.ts
Connections 24
- App router → Shared emergency state: provides state
src/App.tsx - App router → Top navigation: renders
src/App.tsx - App router → Sidebar navigation: renders
src/App.tsx - App router → Dashboard: routes to
src/App.tsx - App router → Campus map management: routes to
src/App.tsx - App router → Evacuation planning: routes to
src/App.tsx - App router → SOS requests: routes to
src/App.tsx - App router → Alert management: routes to
src/App.tsx - App router → Student tracking: routes to
src/App.tsx - App router → Teacher tracking: routes to
src/App.tsx - App router → Disaster monitoring: routes to
src/App.tsx - App router → India disaster information: routes to
src/App.tsx - App router → Disaster news: routes to
src/App.tsx - App router → Emergency messaging: routes to
src/App.tsx - App router → Safety guides: routes to
src/App.tsx - App router → Settings: routes to
src/App.tsx - App router → User profile: routes to
src/App.tsx - Campus map management → Interactive campus map: renders
src/pages/SchoolMapPage.tsx - Campus map management → Shared emergency state: updates map state
src/pages/SchoolMapPage.tsx - Campus map management → Demo records: reads default image
src/pages/SchoolMapPage.tsx - Interactive campus map → Shared emergency state: uses shared actions
src/components/map/InteractiveCampusMap.tsx - Shared emergency state → Demo records: loads initial records
src/context/AppContext.tsx - Shared emergency state → Domain types: uses types
src/context/AppContext.tsx - Interactive campus map → Domain types: uses types
src/components/map/InteractiveCampusMap.tsx