How khushbu677/disaster_management works
ResQNet coordinates victim registration and rescue-status tracking with incident reporting, prioritization, volunteer task handling, NGO aid offers, and administration. The React application routes users to role-specific screens, whose API services communicate with an Express backend; backend routes enforce access rules and operate on MongoDB models. The README also documents maps, priority-sorted dashboards, and live updates. Some frontend integrations and role workflows are unsampled, so their links are omitted where source evidence is unavailable.
Main entry points: server.js Express and Socket server · App.js App routes · api.js Axios API client · Admin.jsx Admin operations
Components 33
React application
- App routes
Disaster/src/App.js - Victim registration and status
Disaster/src/pages/SOS.jsx - Status tracker
Disaster/src/pages/VictimStatus.jsx - Volunteer portal
Disaster/src/pages/Volunteer.jsx - NGO portal
Disaster/src/pages/NGO.jsx - Admin operations
Disaster/src/pages/Admin.jsx - Incident dashboard
Disaster/src/pages/Dashboard.jsx - Incident reports
Disaster/src/pages/Reports.jsx - Incident map
Disaster/src/components/MapView.jsx - Incident report form
Disaster/src/components/ReportForm.jsx - Priority scoring
Disaster/src/utils/priority.js
API client
- Victim API service
Disaster/src/api/victimService.js - Volunteer API service
Disaster/src/api/volunteerService.js - NGO API service
Disaster/src/api/ngoService.js - Admin API service
Disaster/src/api/adminService.js - Dashboard API service
Disaster/src/api/dashboardService.js - Axios API client
Disaster/src/api/api.js
Backend services
- Express and Socket server
backend/server.js - Victim routes
backend/routes/victims.js - Volunteer routes
backend/routes/volunteers.js - NGO routes
backend/routes/ngos.js - Incident routes
backend/routes/incidents.js - Dashboard incident routes
backend/routes/dashboardIncidents.js - Admin routes
backend/routes/admin.js - JWT and role checks
backend/middleware/auth.js - Priority calculations
backend/middleware/priority.js - Database connection
backend/config/db.js
Rescue domain and data
- Victim records
backend/models/Victim.js - Volunteer records
backend/models/Volunteer.js - NGO records
backend/models/NGO.js - Incident records
backend/models/Incident.js
Other components
- Victim, responders, admin
- MongoDB
Connections 48
- Victim, responders, admin → App routes: uses
Disaster/src/App.js - App routes → Incident dashboard: routes to
Disaster/src/App.js - App routes → Victim registration and status: routes to
Disaster/src/App.js - App routes → Status tracker: routes to
Disaster/src/App.js - App routes → Volunteer portal: routes to
Disaster/src/App.js - App routes → NGO portal: routes to
Disaster/src/App.js - App routes → Admin operations: routes to
Disaster/src/App.js - App routes → Incident reports: routes to
Disaster/src/App.js - Victim registration and status → Victim API service: submits registration
Disaster/src/api/victimService.js - Status tracker → Victim API service: checks status
Disaster/src/api/victimService.js - Volunteer portal → Volunteer API service: requests tasks
Disaster/src/api/volunteerService.js - NGO portal → NGO API service: uses
Disaster/src/pages/NGO.jsx - Admin operations → Admin API service: uses
Disaster/src/pages/Admin.jsx - Admin operations → Victim API service: assigns responders
Disaster/src/pages/Admin.jsx - Admin operations → Dashboard API service: loads dashboard
Disaster/src/pages/Admin.jsx - Incident dashboard → Dashboard API service: loads incidents
Disaster/src/pages/Dashboard.jsx - Incident reports → Dashboard API service: loads incidents
Disaster/src/pages/Reports.jsx - Incident dashboard → Incident map: renders
- Incident dashboard → Incident report form: offers reporting
- Victim API service → Axios API client: sends requests
Disaster/src/api/victimService.js - Volunteer API service → Axios API client: sends requests
Disaster/src/api/volunteerService.js - NGO API service → Axios API client: sends requests
Disaster/src/api/ngoService.js - Admin API service → Axios API client: sends requests
Disaster/src/api/adminService.js - Dashboard API service → Axios API client: sends requests
Disaster/src/api/dashboardService.js - Axios API client → Express and Socket server: calls REST API
- Express and Socket server → Database connection: connects through
backend/server.js - Database connection → MongoDB: connects
backend/config/db.js - Express and Socket server → Victim routes: mounts
backend/server.js - Express and Socket server → Volunteer routes: mounts
backend/server.js - Express and Socket server → NGO routes: mounts
backend/server.js - Express and Socket server → Incident routes: mounts
backend/server.js - Express and Socket server → Dashboard incident routes: mounts
backend/server.js - Express and Socket server → Admin routes: mounts
backend/server.js - Express and Socket server → Incident records: queries reports
backend/server.js - Victim routes → Victim records: reads and writes
backend/routes/victims.js - Victim routes → Priority calculations: calculates score
backend/routes/victims.js - Victim routes → JWT and role checks: protects routes
backend/routes/victims.js - Volunteer routes → Volunteer records: uses records
backend/routes/volunteers.js - Volunteer routes → Victim records: uses records
backend/routes/volunteers.js - Volunteer routes → JWT and role checks: protects routes
backend/routes/volunteers.js - NGO routes → NGO records: uses records
backend/routes/ngos.js - NGO routes → JWT and role checks: protects routes
backend/routes/ngos.js - Incident routes → Incident records: uses records
backend/routes/incidents.js - Incident routes → Priority calculations: calculates score
backend/routes/incidents.js - Incident routes → JWT and role checks: protects routes
backend/routes/incidents.js - Dashboard incident routes → Incident records: queries incidents
backend/routes/dashboardIncidents.js - Dashboard incident routes → Priority calculations: uses scoring
backend/routes/dashboardIncidents.js - Admin routes → Victim records: uses records
backend/routes/admin.js