How nikhil-shetty14/safeher-ai--womensafetyintelligencesystem_majorproject works
SafeHer AI is a women’s-safety platform with a mobile app for users, a FastAPI backend, and a web admin dashboard. The main user workflow is to register, trigger an SOS or submit text/voice for danger analysis, then share location and alert trusted contacts and administrators; users can also manage contacts, chat, and report complaints. The backend provides REST and Socket.IO services, while administrators monitor alerts, maps, analytics, and broadcasts. Some subsystem links are supported only by README descriptions because their implementation was not excerpted.
Main entry points: main.py REST API · client.ts Mobile API client · frontend/App.tsx Mobile app shell · src/App.tsx Dashboard routing
Components 26
Mobile safety app
- Mobile app shell
frontend/App.tsx - User authentication
frontend/src/context/AuthContext.tsx - Mobile API client
frontend/src/api/client.ts - SOS experience
frontend/src/screens/SOSScreen.tsx - Safety map
frontend/src/screens/MapScreen.tsx - Live connection
frontend/src/context/SocketContext.tsx - Safety features
frontend/src/screens
Backend services
- REST API
backend/app/main.py - Auth routes
backend/app/api/routes/auth.py - SOS routes
backend/app/api/routes/sos.py - AI analysis routes
backend/app/api/routes/ai.py - Location routes
backend/app/api/routes/location.py - Other product routes
backend/app/api/routes - Danger analysis engine
backend/app/ai/llm_engine.py - Emergency dispatch
backend/app/services/twilio_service.py - Live event server
backend/app/websockets/socket_manager.py
Admin command center
- Dashboard routing
admin-dashboard/src/App.tsx - Admin authentication
admin-dashboard/src/AuthContext.tsx - Dashboard API client
admin-dashboard/src/api.ts - Dashboard live connection
admin-dashboard/src/SocketContext.tsx - Monitoring and management
admin-dashboard/src
Platform infrastructure
- MongoDB access
backend/app/core/database.py
Other components
- Safety app user
- Administrator
- Twilio
- GPT-4 / Whisper AI
Connections 31
- Safety app user → Mobile app shell: uses
README.md - Mobile app shell → User authentication: provides context
frontend/App.tsx - Mobile app shell → Live connection: provides context
frontend/App.tsx - Mobile app shell → Safety features: navigates screens
- User authentication → Mobile API client: calls auth API
frontend/src/context/AuthContext.tsx - SOS experience → Mobile API client: submits SOS
frontend/src/screens/SOSScreen.tsx - Mobile API client → REST API: sends REST requests
frontend/src/api/client.ts - REST API → Auth routes: registers routes
backend/app/main.py - REST API → SOS routes: registers routes
backend/app/main.py - REST API → AI analysis routes: registers routes
backend/app/main.py - REST API → Location routes: registers routes
backend/app/main.py - REST API → Other product routes: registers routes
backend/app/main.py - Mobile API client → SOS routes: posts SOS
frontend/src/api/client.ts - Mobile API client → AI analysis routes: requests analysis
README.md - Mobile API client → Location routes: updates location
README.md - SOS routes → Emergency dispatch: requests emergency dispatch
README.md - Emergency dispatch → Twilio: sends SMS and calls
README.md - AI analysis routes → Danger analysis engine: runs danger analysis
- Danger analysis engine → GPT-4 / Whisper AI: uses AI models
README.md - SOS routes → Live event server: broadcasts alert
README.md - Location routes → Live event server: broadcasts location
README.md - REST API → MongoDB access: connects at startup
backend/app/main.py - Administrator → Dashboard routing: uses
README.md - Dashboard routing → Admin authentication: provides auth context
admin-dashboard/src/App.tsx - Dashboard routing → Dashboard live connection: provides socket context
admin-dashboard/src/App.tsx - Dashboard routing → Monitoring and management: routes to views
admin-dashboard/src/App.tsx - Admin authentication → Dashboard API client: authenticates through
admin-dashboard/src/AuthContext.tsx - Monitoring and management → Dashboard API client: requests dashboard data
admin-dashboard/src/AlertsPage.tsx - Dashboard live connection → Live event server: connects live
README.md - Live event server → Dashboard live connection: delivers alerts
README.md - Safety map → Mobile API client: loads map data