How umershk2003/smart-surveillance-system works
A smart CCTV surveillance product: camera feeds are captured and analyzed for weapons, restricted objects, people, faces, and zone intrusions; resulting identities and events are persisted and surfaced in live streams, dashboards, and alerts. The React application provides role-based workspaces for reviewing events, managing known and unknown people, editing zones, and monitoring health. The graph follows documented capabilities and visible references; some backend routes and integrations are represented at subsystem level where implementation excerpts were unavailable.
Main entry points: camera_worker.py Camera worker · main.py FastAPI application · api.js API client · face_engine.py Face recognition
Components 27
Dashboard and access
- Application routes
frontend/src/App.jsx - Auth context
frontend/src/hooks/useAuth.jsx - API client
frontend/src/api.js - Review dashboards
frontend/src/pages/UnknownReviewPage.jsx - Zone editor
frontend/src/pages/ZoneEditorPage.jsx - Health dashboard
frontend/src/pages/HealthPage.jsx
API and management
- FastAPI application
backend/app/main.py - JWT authorization
backend/app/auth.py - Camera controls
backend/app/routers/camera.py - Events and alerts
backend/app/routers/alerts.py - Face management
backend/app/routers/faces.py - Unknown review
backend/app/routers/unknown_persons.py
Camera analytics
- Camera feeds
- Camera worker
backend/app/camera_worker.py - Weapon detection
backend/app/weapon_engine.py - Object detection
backend/app/object_engine.py
Identity and records
- Face recognition
backend/app/face_engine.py - Face quality checks
backend/app/face_quality.py - Unknown identity service
backend/app/unknown_person_service.py
Stores and notifications
- Surveillance records
backend/app/models.py - PostgreSQL and pgvector
- Redis event stream
backend/app/redis_stream.py - Live video stream
backend/app/stream_manager.py - Alert dispatcher
backend/app/alert_dispatcher.py - WhatsApp delivery
backend/app/whatsapp.py - Telegram delivery
backend/app/telegram.py
Other components
- Operator
Connections 29
- Operator → Application routes: uses workspace
frontend/src/App.jsx - Application routes → Auth context: provides auth
frontend/src/App.jsx - Auth context → API client: checks identity
frontend/src/hooks/useAuth.jsx - Review dashboards → API client: loads review data
frontend/src/pages/UnknownReviewPage.jsx - Zone editor → API client: saves zones
frontend/src/api.js - Health dashboard → API client: loads health
frontend/src/pages/HealthPage.jsx - API client → FastAPI application: requests API
frontend/src/api.js - FastAPI application → JWT authorization: uses authorization
backend/app/main.py - FastAPI application → Camera controls: registers routes
backend/app/main.py - FastAPI application → Events and alerts: registers routes
backend/app/main.py - FastAPI application → Face management: registers routes
backend/app/main.py - FastAPI application → Unknown review: registers routes
backend/app/main.py - Camera feeds → Camera worker: supplies frames
README.md - Camera worker → Weapon detection: detects threats
backend/app/camera_worker.py - Camera worker → Object detection: detects objects
backend/app/camera_worker.py - Camera worker → Face recognition: analyzes faces
backend/app/camera_worker.py - Face recognition → Face quality checks: filters faces
backend/app/face_engine.py - Face recognition → Surveillance records: matches embeddings
backend/app/face_engine.py - Camera worker → Surveillance records: records events
README.md - Camera worker → Unknown identity service: tracks unknowns
backend/app/camera_worker.py - Unknown review → Unknown identity service: manages identities
backend/app/routers/unknown_persons.py - Face management → Face recognition: registers faces
backend/app/routers/faces.py - Surveillance records → PostgreSQL and pgvector: persists records
- Camera worker → Redis event stream: publishes events
README.md - Camera worker → Live video stream: publishes live frames
README.md - Camera worker → Alert dispatcher: triggers alerts
backend/app/camera_worker.py - Alert dispatcher → WhatsApp delivery: dispatches notifications
backend/app/alert_dispatcher.py - Alert dispatcher → Telegram delivery: dispatches notifications
backend/app/alert_dispatcher.py - Redis event stream → WhatsApp delivery: feeds alert worker
README.md