How sreevathsans/speedcamera works
SpeedCamera analyzes camera/video imagery for vehicle tracking, speed violations, plate identification, evidence and challans, then exposes events and media through a FastAPI service. Users sign in to role-specific React dashboards; administrators monitor feeds, statistics, violations and stolen-vehicle alerts, while public users view their vehicle’s challans. The README and excerpts establish these product stages, but do not expose every backend call path, so uncertain implementation links are omitted.
Main entry points: server.py Video analysis · App.jsx React application · AdminDashboard.jsx Admin dashboard · apiClient.js API client
Components 24
Detection and enforcement
- Video analysis
Backend/api/server.py - Vehicle detection
Backend/models/VehicleDetector - Tracking and speed
Backend/api/server.py - Plate recognition
Backend/models/NumberPlateDetector/YOLOv5/YOLOv5/plate_detection.py - Stolen plate check
Backend/stolen_plates.txt - Challan generation
Backend/scripts/challan_generator.py - Camera configuration
Backend/scripts/config.py - Camera test runner
Backend/scripts/main.py
Backend services
- FastAPI service
Backend/api/server.py - Authentication
Backend/api/auth.py - Event database manager
Backend/scripts/database_manager.py - SQLite event store
Web experience
- React application
frontend/src/App.jsx - Login page
frontend/src/pages/LoginPage.jsx - Client auth state
frontend/src/context/AuthContext.jsx - API client
frontend/src/api/apiClient.js - Role dashboard routing
frontend/src/pages/HomePage.jsx - Admin dashboard
frontend/src/components/AdminDashboard.jsx - Public dashboard
frontend/src/components/PublicDashboard.jsx - Theme state
frontend/src/context/ThemeContext.jsx - Navigation bar
frontend/src/components/Navbar.jsx - Theme toggle
frontend/src/components/ThemeToggle.jsx
Other components
- Camera operator
- Dashboard user
Connections 29
- Camera operator → Video analysis: provides footage
README.md - Video analysis → Vehicle detection: detects vehicles
- Video analysis → Tracking and speed: tracks and measures
Backend/api/server.py - Tracking and speed → Camera configuration: uses calibration
Backend/api/server.py - Video analysis → Plate recognition: extracts plates
- Video analysis → Stolen plate check: checks plates
- Video analysis → Challan generation: generates challan
README.md - Camera operator → Camera test runner: runs test feed
README.md - Camera test runner → Camera configuration: uses settings
Backend/scripts/main.py - Dashboard user → React application: opens dashboard
README.md - React application → Login page: routes to
frontend/src/App.jsx - React application → Role dashboard routing: routes to
frontend/src/App.jsx - React application → Client auth state: provides auth
frontend/src/App.jsx - React application → Theme state: provides theme
frontend/src/App.jsx - React application → Navigation bar: renders
frontend/src/App.jsx - Login page → Client auth state: submits credentials
frontend/src/pages/LoginPage.jsx - Client auth state → API client: requests token
frontend/src/context/AuthContext.jsx - API client → FastAPI service: calls backend
frontend/src/api/apiClient.js - FastAPI service → Authentication: validates users
Backend/api/server.py - Role dashboard routing → Admin dashboard: renders admin view
frontend/src/pages/HomePage.jsx - Role dashboard routing → Public dashboard: renders public view
frontend/src/pages/HomePage.jsx - Admin dashboard → API client: fetches dashboard data
frontend/src/components/AdminDashboard.jsx - Public dashboard → API client: fetches events
frontend/src/components/PublicDashboard.jsx - Admin dashboard → FastAPI service: opens event socket
frontend/src/components/AdminDashboard.jsx - Admin dashboard → FastAPI service: loads camera feeds
frontend/src/components/AdminDashboard.jsx - Navigation bar → Theme toggle: renders
frontend/src/components/Navbar.jsx - Theme toggle → Theme state: toggles theme
frontend/src/components/ThemeToggle.jsx - FastAPI service → SQLite event store: reads and logs events
README.md - Challan generation → SQLite event store: stores challan data