How rhithor/resq works
ResQ Radar is a disaster-response dashboard for turning victim distress reports into volunteer action. Its documented workflow is SOS reporting, incident persistence and live alerting, volunteer map-based triage, claiming a victim, and resolution. The backend source confirms the API, spatial database queries, status changes, and Socket.IO broadcasts; the README describes the dashboard capabilities. Frontend wiring beyond the sampled NextAuth route is therefore represented only where documented, not as inferred API calls.
Main entry points: server.js Express and Socket.IO · page.js Tactical Dashboard · db.js Prisma Client · victimRoutes.js Victim Routes
Components 20
Volunteer and Victim UI
- Tactical Dashboard
frontend/src/app/dashboard/page.js - Location Map
frontend/src/app/dashboard/components/MapModal.jsx - Audio Alerts
frontend/src/app/dashboard/sounds/alert.mp3 - SOS Screen
frontend/src/app/sos/page.js - Login Screen
frontend/src/app/login/page.js
Backend API
- Express and Socket.IO
backend/src/server.js - Victim Routes
backend/src/routes/victimRoutes.js - Volunteer Routes
backend/src/routes/volunteerRoutes.js - Disaster Routes
backend/src/routes/disasterRoutes.js - Auth Routes
backend/src/routes/authRoutes.js
Rescue Operations
- Victim Controller
backend/src/controllers/victimController.js - Volunteer Controller
backend/src/controllers/volunteerController.js - Disaster Controller
backend/src/controllers/disasterController.js
Identity and Persistence
- Google OAuth
frontend/src/app/api/auth/[...nextauth]/route.js - Auth Controller
backend/src/controllers/authController.js - Access Control
backend/src/middleware/authMiddleware.js - Prisma Client
backend/src/config/db.js - PostgreSQL + PostGIS
backend/prisma/schema.prisma
Other components
- Victim
- Volunteer
Connections 27
- Victim → SOS Screen: reports SOS
- Volunteer → Tactical Dashboard: monitors incidents
- Tactical Dashboard → Location Map: views location
- Tactical Dashboard → Audio Alerts: plays cue
- Volunteer → Login Screen: signs in
- Login Screen → Google OAuth: starts sign-in
- Google OAuth → Express and Socket.IO: Google identity
- Express and Socket.IO → Victim Routes: mounts routes
- Express and Socket.IO → Volunteer Routes: mounts routes
- Express and Socket.IO → Disaster Routes: mounts routes
- Express and Socket.IO → Auth Routes: mounts routes
- Victim Routes → Victim Controller: dispatches
- Volunteer Routes → Volunteer Controller: dispatches
- Disaster Routes → Disaster Controller: dispatches
- Auth Routes → Auth Controller: dispatches
- Victim Routes → Access Control: guards status
- Volunteer Routes → Access Control: guards access
- Disaster Routes → Access Control: guards access
- Victim Controller → Prisma Client: queries and updates
- Volunteer Controller → Prisma Client: queries and updates
- Disaster Controller → Prisma Client: queries and updates
- Auth Controller → Prisma Client: reads and writes
- Prisma Client → PostgreSQL + PostGIS: queries
- Victim Controller → Express and Socket.IO: emits incident events
- Disaster Controller → Express and Socket.IO: emits incident event
- Express and Socket.IO → Tactical Dashboard: broadcasts live alerts
- Tactical Dashboard → Location Map: pinpoints victims