How bragee7/cmfinal works
Women Safety Guardian is an emergency-response product spanning web and Android clients, a Node/Express API, and case-management dashboards. The main flow is a user-triggered SOS with location and media, followed by case storage and police review, status updates, and audit history. The README documents additional voice triggers, contacts, preferences, maps, sharing, and analytics. Some client pages, Android components, and server modules were not sampled; those are included where the tree or README establishes their role, while uncertain connections are omitted.
Main entry points: index.js HTTP server · sos.js SOS case workflow · api.js API client · db.js Postgres data store
Components 24
User clients
- Web app routing
client/src/App.jsx - Web authentication
client/src/context/AuthContext.jsx - Web SOS trigger
client/src/components/FloatingSosButton.jsx - Case details
client/src/pages/CaseDetails.jsx - Background voice guard
mobile/android/app/src/main/kotlin/com/zelda/zelda_guardian/PowerGuardService.kt - Mobile SOS recording
mobile/android/app/src/main/kotlin/com/zelda/zelda_guardian/SosRecordingService.kt - API client
client/src/services/api.js
Police and admin
- Police case dashboard
client/src/pages/PoliceDashboard.jsx - Admin analytics
client/src/pages/AdminDashboard.jsx - Admin data panels
client/src/pages/admin
API services
- HTTP server
server/index.js - Account and profile
server/routes/auth.js - SOS case workflow
server/routes/sos.js - Emergency contacts
server/routes/contacts.js - Voice preferences
server/routes/preferences.js - Admin statistics
server/routes/admin.js - JWT authorization
server/middleware/auth.js - Live case updates
server/socket.js
Case data
- Postgres data store
server/db.js
External services
- Alert email
server/services/email.js - Nearby police lookup
server/services/policeStationService.js
Other components
- Safety user
- Police responder
- OpenStreetMap Overpass
Connections 32
- Safety user → Web app routing: uses
README.md - Web app routing → Web authentication: provides auth
client/src/App.jsx - Web app routing → Police case dashboard: routes to
client/src/App.jsx - Web app routing → Admin analytics: routes to
client/src/App.jsx - Safety user → Web SOS trigger: triggers SOS
README.md - Web SOS trigger → API client: submits alert
client/src/components/FloatingSosButton.jsx - Safety user → Background voice guard: speaks trigger
README.md - Background voice guard → Mobile SOS recording: starts recording
mobile/android/app/src/main/kotlin/com/zelda/zelda_guardian/PowerGuardService.kt - API client → HTTP server: calls API
client/src/services/api.js - HTTP server → Account and profile: mounts routes
server/index.js - HTTP server → SOS case workflow: mounts routes
server/index.js - HTTP server → Emergency contacts: mounts routes
server/index.js - HTTP server → Voice preferences: mounts routes
server/index.js - HTTP server → Admin statistics: mounts routes
server/index.js - Account and profile → Postgres data store: queries users
server/routes/auth.js - SOS case workflow → JWT authorization: checks access
server/routes/sos.js - Account and profile → JWT authorization: checks access
server/routes/auth.js - SOS case workflow → Postgres data store: reads and writes
server/routes/sos.js - Emergency contacts → Postgres data store: reads and writes
server/routes/contacts.js - Voice preferences → Postgres data store: reads and writes
server/routes/preferences.js - Admin statistics → Postgres data store: queries statistics
server/routes/admin.js - SOS case workflow → Alert email: sends alerts
server/routes/sos.js - SOS case workflow → Live case updates: publishes updates
server/routes/sos.js - SOS case workflow → Nearby police lookup: looks up station
server/routes/sos.js - Nearby police lookup → OpenStreetMap Overpass: queries nearby
server/services/policeStationService.js - Police case dashboard → API client: fetches cases
- Admin analytics → API client: fetches metrics
client/src/pages/AdminDashboard.jsx - Admin analytics → Admin data panels: renders panels
client/src/pages/AdminDashboard.jsx - Police responder → Police case dashboard: reviews cases
README.md - Police responder → Admin analytics: reviews analytics
README.md - Police case dashboard → Case details: opens case
- Case details → API client: loads case
client/src/pages/CaseDetails.jsx