How this was built: Real-time systems

Staging Pro 2.0 is a real-time IoT backend for running race events. Race coordinators use it to manage several events at the same time, control the staging order, start and stop races, and send safety flags to every connected device. Updates reach the devices in under 100 milliseconds.
At a race, timing matters. A late flag or start signal is a safety problem. So the main goal of this project was fast, reliable updates and a clear record of everything that happened during an event.
The backend is built with Django REST Framework. PostgreSQL stores the data, and Redis handles the real-time message queues. The system tracks each race from start to finish. An auto-staging algorithm works out the staging order using buffer rules that coordinators can change. Every event goes into a log that can't be edited, so there is a full audit trail.
Django Channels handles the WebSocket connections, which gives live two-way communication between the race control dashboard and the IoT devices. When a coordinator makes a change, the backend recalculates the staging order and every connected screen gets the update right away. The system runs in Docker on AWS behind Nginx, and GitHub Actions handles deployments.