How takamasospiter-max/roadguard_pt works
RoadGuard AI combines a driver-facing mobile app, a Django backend, and an officer/admin web portal. The main workflow is consented sensor collection, AI detection, grouping detections into hazards, and publishing warnings; drivers can also submit photo reports for officer review. The README documents mobile capabilities whose implementation files are not present in this tree, so the mobile app is represented at its available directory level. Backend relationships below are limited to those shown in excerpts or explicitly documented in the README.
Main entry points: App.tsx Portal route entry · Mobile app Driver mobile app · models.py Hazards and reports · pipeline.py Batch processing
Components 21
Driver app
- Driver mobile app
Mobile app
Detection backend
- Sensor intake
Web portal/new-backend/telemetry/services.py - Sensor batches
Web portal/new-backend/telemetry/models.py - Batch processing
Web portal/new-backend/detection/pipeline.py - AI engine interface
Web portal/new-backend/detection/engine.py - Sensor model
Web portal/new-backend/ai_engine/sensor_model.py - Detection records
Web portal/new-backend/detection/models.py - Spot grouping
Web portal/new-backend/detection/spots.py - Hazards and reports
Web portal/new-backend/roadguard/models.py - Mobile services
Web portal/new-backend/mobile - Route guidance service
Web portal/new-backend/mobile/routing.py
Officer portal
- Portal route entry
Web portal/frontend/src/App.tsx - Officer dashboard
Web portal/frontend/src/pages/DashboardPage.tsx - Hazard map
Web portal/frontend/src/pages/MapPage.tsx - Report review
Web portal/frontend/src/pages/ReportsPage.tsx - User management
Web portal/frontend/src/pages/UsersPage.tsx
Accounts and governance
- Portal authentication
Web portal/new-backend/roadguard/auth_views.py - Portal accounts
Web portal/new-backend/roadguard/models.py - Audit records
Web portal/new-backend/roadguard/audit.py
Other components
- Driver
- OSRM routing service
Connections 24
- Driver → Driver mobile app: uses
- Driver mobile app → Sensor intake: uploads batches
- Sensor intake → Sensor batches: stores readings
Web portal/new-backend/telemetry/services.py - Sensor batches → Batch processing: awaits analysis
Web portal/new-backend/detection/pipeline.py - Batch processing → AI engine interface: analyzes batch
Web portal/new-backend/detection/pipeline.py - AI engine interface → Sensor model: loads configured model
Web portal/new-backend/detection/engine.py - Batch processing → Detection records: saves results
Web portal/new-backend/detection/pipeline.py - Batch processing → Spot grouping: assigns spots
Web portal/new-backend/detection/pipeline.py - Spot grouping → Hazards and reports: groups detections
Web portal/new-backend/detection/spots.py - Driver mobile app → Mobile services: requests hazards
- Mobile services → Hazards and reports: serves hazard data
- Driver mobile app → Route guidance service: requests routes
- Route guidance service → OSRM routing service: fetches routes
Web portal/new-backend/mobile/routing.py - Driver mobile app → Portal authentication: signs in
- Portal route entry → Portal authentication: protects pages
Web portal/frontend/src/App.tsx - Portal authentication → Portal accounts: authenticates accounts
Web portal/new-backend/roadguard/auth_views.py - Portal route entry → Officer dashboard: routes dashboard
Web portal/frontend/src/App.tsx - Portal route entry → Hazard map: routes map
Web portal/frontend/src/App.tsx - Portal route entry → Report review: routes reports
Web portal/frontend/src/App.tsx - Portal route entry → User management: routes users
Web portal/frontend/src/App.tsx - Officer dashboard → Hazards and reports: reviews hazards
- Hazard map → Hazards and reports: shows hazards
- Report review → Hazards and reports: reviews reports
- Portal accounts → Audit records: actions audited
Web portal/new-backend/roadguard/audit.py