How subham-khandual/suraksha-setu works
Suraksha Setu is a tourist-safety and emergency-response platform with a React tourist/admin interface and an Express/MongoDB backend. The main user journey runs from account access through safety features such as digital-ID verification, location monitoring, SOS and incident reporting, then into authority monitoring and response. The README also documents ambulance, accommodation/payment, and real-time communication capabilities. Frontend routing and several backend relationships are evidenced in excerpts or the source index; unsampled screen-to-API wiring is not asserted.
Main entry points: App.tsx Application Router · server.js Express API Server · incidents.js Incident Management · auth.js Authentication Routes
Components 27
Tourist and Admin UI
- Application Router
frontend/tourist/src/App.tsx - Safety Dashboard
frontend/tourist/src/screens/DashboardScreen.tsx - Admin Command Center
frontend/tourist/src/screens/AdminDashboardScreen.tsx - Live Tracking Map
frontend/tourist/src/screens/MapScreen.tsx - Emergency Alert UI
frontend/tourist/src/screens/EmergencyAlertScreen.tsx - Incident Reporting UI
frontend/tourist/src/screens/ReportIncidentScreen.tsx - Sign In and Registration
frontend/tourist/src/screens/LoginScreen.tsx - Digital ID Screens
frontend/tourist/src/screens/admin/AdminQRScannerScreen.tsx
Identity and Access
- ID Verification
backend/services/verificationService.js - Authentication Routes
backend/routes/auth.js - JWT Access Control
backend/middleware/auth.js - Tourist Accounts
backend/models/User.js
Safety Response
- Incident Management
backend/routes/incidents.js - Incident Records
backend/models/IncidentReport.js - Emergency Alerts
backend/models/Alert.js - Activity Logging
backend/services/activityService.js
Travel and Communication
- Ambulance Booking
backend/routes/ambulance.js - Hotels and Payments
frontend/tourist/src/screens/HotelListingScreen.tsx - Payment Routes
backend/routes/payment.js - Community Chat
frontend/tourist/src/screens/CommunityChatScreen.tsx - Community Chat API
backend/routes/communityChat.js - Live Socket Events
backend/socket/socketHandler.js - Community Messages
backend/models/CommunityMessage.js
Backend Platform
- Express API Server
backend/server.js - MongoDB
Other components
- Tourist
- Admin and Authorities
Connections 37
- Tourist → Application Router: uses
README.md - Admin and Authorities → Application Router: uses
README.md - Application Router → Sign In and Registration: routes to
frontend/tourist/src/App.tsx - Application Router → Safety Dashboard: routes to
frontend/tourist/src/App.tsx - Application Router → Admin Command Center: routes to
frontend/tourist/src/App.tsx - Application Router → Live Tracking Map: routes to
frontend/tourist/src/App.tsx - Application Router → Emergency Alert UI: routes to
frontend/tourist/src/App.tsx - Application Router → Incident Reporting UI: routes to
frontend/tourist/src/App.tsx - Application Router → Digital ID Screens: routes to
frontend/tourist/src/App.tsx - Application Router → Hotels and Payments: routes to
frontend/tourist/src/App.tsx - Application Router → Community Chat: routes to
frontend/tourist/src/App.tsx - Express API Server → Authentication Routes: mounts
backend/server.js - Express API Server → Incident Management: mounts
backend/server.js - Express API Server → Ambulance Booking: mounts
backend/server.js - Express API Server → Payment Routes: mounts
backend/server.js - Express API Server → Community Chat API: mounts
backend/server.js - Express API Server → Live Socket Events: initializes
backend/server.js - Express API Server → MongoDB: connects
- Authentication Routes → Tourist Accounts: reads and writes
backend/routes/auth.js - JWT Access Control → Tourist Accounts: loads account
backend/middleware/auth.js - Authentication Routes → JWT Access Control: uses access control
backend/routes/auth.js - Authentication Routes → ID Verification: uses verification
backend/routes/auth.js - ID Verification → Tourist Accounts: looks up
backend/services/verificationService.js - ID Verification → Emergency Alerts: checks active alerts
backend/services/verificationService.js - Incident Management → Incident Records: reads and writes
backend/routes/incidents.js - Incident Management → Emergency Alerts: uses alerts
backend/routes/incidents.js - Incident Management → Activity Logging: logs activity
backend/routes/incidents.js - Activity Logging → MongoDB: persists activity
- Live Socket Events → Community Messages: saves messages
backend/socket/socketHandler.js - Live Socket Events → Tourist Accounts: authenticates users
backend/socket/socketHandler.js - Community Chat API → JWT Access Control: uses access control
- Ambulance Booking → MongoDB: persists bookings
- Payment Routes → MongoDB: uses persistence
- Community Chat → Live Socket Events: exchanges live messages
- Emergency Alert UI → Express API Server: submits SOS
- Incident Reporting UI → Incident Management: submits reports
- Digital ID Screens → ID Verification: requests ID checks