How sanjeev0575/custody_band_backend works
Trackin360 is a FastAPI backend for a fleet-tracking dashboard. Authenticated users manage fleet records and view tracking, health, alarm, geofence, and reporting data; devices authenticate separately to submit normalized GPS, health, and alarm payloads. The API persists records in PostgreSQL/PostGIS and supports authenticated live tracking and Firebase push delivery. The sampled excerpts show the API, persistence, auth, and integration layers; some route behavior is documented only in the README, so those links cite the README.
Main entry points: main.py FastAPI routes · database.py PostgreSQL and PostGIS · firebase_auth.py Firebase token verifier · models.py ORM data models
Components 18
API workflows
- FastAPI routes
app/main.py - Fleet and people
app/main.py - Location and trips
app/main.py - Health measurements
app/main.py - Geofences and alerts
app/main.py - Dashboard and reports
app/main.py - Payload schemas
app/schemas.py
Identity and access
- Firebase token verifier
app/firebase_auth.py - Device token security
app/security.py - Runtime settings
app/config.py
Persistence
- ORM data models
app/models.py - PostgreSQL and PostGIS
app/database.py
Live and push delivery
- Tracking connections
app/realtime.py - Push notification sender
app/notifications.py
Other components
- React dashboard
- GPS and wearable devices
- Firebase Authentication
- Firebase Cloud Messaging
Connections 19
- React dashboard → FastAPI routes: calls
README.md - GPS and wearable devices → FastAPI routes: submits payloads
README.md - FastAPI routes → Fleet and people: routes
README.md - FastAPI routes → Location and trips: routes
README.md - FastAPI routes → Health measurements: routes
README.md - FastAPI routes → Geofences and alerts: routes
README.md - FastAPI routes → Dashboard and reports: routes
README.md - FastAPI routes → Payload schemas: validates with
app/main.py - FastAPI routes → Firebase token verifier: verifies tokens
README.md - Firebase token verifier → Firebase Authentication: verifies with
app/firebase_auth.py - FastAPI routes → Device token security: checks device tokens
app/main.py - FastAPI routes → PostgreSQL and PostGIS: queries and writes
app/main.py - FastAPI routes → ORM data models: uses models
app/main.py - ORM data models → PostgreSQL and PostGIS: uses base
app/models.py - PostgreSQL and PostGIS → Runtime settings: reads settings
app/database.py - FastAPI routes → Tracking connections: broadcasts events
README.md - React dashboard → Tracking connections: opens WebSocket
README.md - FastAPI routes → Push notification sender: sends notifications
README.md - Push notification sender → Firebase Cloud Messaging: delivers messages
app/notifications.py