Fleet & Food Delivery Real-Time Mobile Platform
Dual-application mobile ecosystem for customer ordering and driver route coordination featuring live map tracking and status streaming.
Why this was built
Customers get anxious when driver locations lag or jump erratically on maps. Constantly polling GPS coordinates drains phone batteries and overburdens server APIs.
Technical Approach
Built a persistent WebSocket channel broker with battery-aware mobile listeners. Implemented smooth bezier polyline interpolation on the Flutter client so driver markers glide smoothly across roads rather than teleporting.
// WebSocket consumer broadcasting driver telemetry to customer app
class OrderTrackingConsumer(AsyncWebsocketConsumer):
async def receive_json(self, content):
if content.get("type") == "driver_location":
await self.channel_layer.group_send(
self.order_room_group,
{
"type": "location_update",
"lat": content["lat"],
"lng": content["lng"],
"bearing": content["bearing"],
"speed": content["speed"],
}
)Key Architectural Features & Outcomes
Smooth polyline interpolation and turn-by-turn map updates
Persistent WebSocket broker handling live driver status and dispatch
In-app transactional messaging between customers, riders, and dispatchers
Resilient background location service with geofence-triggered transitions