How manideep230/smart-city works
CriminalWatch is a police surveillance and identity-management application, with a separate cloak-room/pod workflow. Officers register people and biometric data, monitor camera feeds, review sightings and receive alerts; maintainers enroll and verify customers before locker or pod retrieval. The graph separates browser workflows, Flask API handling, recognition/alert services and persistent state. The README documents the main surveillance endpoints and real-time/email alerts; sampled source confirms several implementation details, but unsampled route-to-service wiring is not shown where uncertain.
Main entry points: app.py Flask application · models Surveillance records · App.jsx Route and role UI · face_engine.py Live recognition
Components 24
Web application
- Route and role UI
frontend/src/App.jsx - Surveillance screens
frontend/src/pages - Cloak workflows
frontend/src/pages/cloak - Face capture
frontend/src/components/FaceCapture.jsx - HTTP API client
frontend/src/services/api.js - Realtime client
frontend/src/services/socket.js
Backend API
- Flask application
backend/app.py - Authentication
backend/routes/auth.py - People and status API
backend/routes/criminals.py - Camera API
backend/routes/cameras.py - Sightings API
backend/routes/sightings.py - Cloak and pod API
backend/routes/cloak_room.py - Database administration
backend/routes/db_admin.py
Recognition and alerts
- Live recognition
backend/services/face_engine.py - Cloak biometrics
backend/services/cloak_face_service.py - Alert delivery
backend/services/alert_service.py
Domain state
- Surveillance records
backend/models - Locker and session records
backend/models/cloak_room.py - MongoDB
Other components
- Police staff
- Cloak/pod maintainer
- Camera feed
- SMTP email
- Dashboard clients
Connections 29
- Police staff → Route and role UI: uses
- Cloak/pod maintainer → Route and role UI: uses
- Route and role UI → Surveillance screens: routes to
- Route and role UI → Cloak workflows: routes to
- Surveillance screens → HTTP API client: requests data
- Cloak workflows → HTTP API client: calls endpoints
- Cloak workflows → Face capture: captures frames
- Face capture → HTTP API client: submits frames
- HTTP API client → Flask application: HTTP requests
- Realtime client → Flask application: realtime connection
- Flask application → Authentication: dispatches
- Flask application → People and status API: dispatches
- Flask application → Camera API: dispatches
- Flask application → Sightings API: dispatches
- Flask application → Cloak and pod API: dispatches
- Flask application → Database administration: dispatches
- Authentication → Surveillance records: reads/writes users
- People and status API → Surveillance records: reads/writes people
- Sightings API → Surveillance records: reads sightings
- Camera API → Live recognition: starts monitoring
- Camera feed → Live recognition: provides video
- Live recognition → Surveillance records: matches and records
- Live recognition → Alert delivery: sends match alert
- Alert delivery → Dashboard clients: emits alerts
- Alert delivery → SMTP email: sends email
- Cloak and pod API → Locker and session records: reads/writes sessions
- Database administration → MongoDB: exports/restores data
- Locker and session records → MongoDB: persists sessions
- Surveillance records → MongoDB: persists records