How 2kdietga/pbl6 works
This is a Django driver-management and driving-monitoring system: drivers and administrators use the web application, while Raspberry Pi devices use device APIs. The documented end-to-end workflow covers driver/profile and licence approval, vehicle assignment, identity and eligibility checks, driving sessions, then violation review and driver appeals. The source also shows profile-image processing and session/shift services. The README distinguishes implemented features from planned ones; violation ingestion and appeals UI are not yet implemented, and some subsystem links below rely on README-level documentation rather than sampled call sites.
Main entry points: views.py Web interface · session_services.py Session lifecycle · profile_services.py Profile services · media_services.py Media and embeddings
Components 20
Web application
- Web interface
frontend/views.py - Web forms
frontend/forms.py
Driver identity
- Profile services
accounts/profile_services.py - Media and embeddings
accounts/media_services.py - Accounts and profiles
accounts/models.py
Fleet and scheduling
- Vehicles and assignments
vehicles/models.py - Licence eligibility
vehicles/licensing.py - Shift scheduling
driving/shift_services.py
Device and sessions
- Device API
driving/device_api.py - Device protocol
driving/device_protocol.py - Session lifecycle
driving/session_services.py - Driving sessions
driving/models.py
Violations and review
- Device violation API
violations/device_api.py - Violation review
violations/services.py - Violations and appeals
violations/models.py
Other components
- Driver
- Administrator
- Face embedding API
- Raspberry Pi
- Cloudinary
Connections 25
- Driver → Web interface: uses
- Administrator → Web interface: uses
- Web interface → Web forms: submits
frontend/views.py - Web forms → Profile services: saves profile
accounts/profile_services.py - Profile services → Accounts and profiles: updates
accounts/profile_services.py - Profile services → Media and embeddings: extracts and uploads
accounts/profile_services.py - Media and embeddings → Face embedding API: requests embeddings
accounts/media_services.py - Media and embeddings → Cloudinary: uploads images
accounts/media_services.py - Web interface → Vehicles and assignments: manages fleet
frontend/views.py - Web interface → Shift scheduling: manages shifts
- Shift scheduling → Vehicles and assignments: locks assignments
driving/shift_services.py - Raspberry Pi → Device API: calls
- Device API → Device protocol: uses errors
driving/device_api.py - Device API → Session lifecycle: starts and ends
driving/device_api.py - Session lifecycle → Accounts and profiles: checks driver
driving/session_services.py - Session lifecycle → Vehicles and assignments: checks device and assignment
driving/session_services.py - Session lifecycle → Licence eligibility: checks licence fit
driving/session_services.py - Session lifecycle → Shift scheduling: selects shift
driving/session_services.py - Session lifecycle → Driving sessions: creates and ends
driving/session_services.py - Raspberry Pi → Device violation API: may send violations
- Device violation API → Violations and appeals: would record
- Administrator → Violation review: reviews violations
- Driver → Web interface: views and appeals
- Violation review → Violations and appeals: records decisions
violations/services.py - Web interface → Violations and appeals: displays violations
frontend/views.py