How we built a FoodTech aggregator platform connecting 200+ restaurants with diners — with intelligent order routing, driver dispatch, and real-time tracking achieving <3min average delivery times.
FoodTech Marketplace · Real-Time Dispatch
A regional food delivery operator had successfully onboarded 200+ restaurants across a dense urban market, but their operations were collapsing under scale. Orders were manually assigned to drivers via WhatsApp groups. Restaurants had no visibility into when drivers would arrive. Customers called support to ask “where's my order?” — and support had no real-time data to answer. Kitchen staff at popular restaurants were overwhelmed during lunch peaks because order flow was unpredictable.
The client needed a platform that could route orders to the nearest available restaurant location, dispatch drivers optimally based on proximity and capacity, sync order status in real time between restaurant tablets, driver apps, and the customer app, and handle payments and commissions across thousands of daily transactions. Speed and reliability were non-negotiable — the market was competitive, and a bad experience meant lost repeat business.
Orders came in without clear assignment to the right restaurant branch. Multi-location chains had to manually forward orders to the nearest kitchen. Duplicate orders sometimes went to wrong locations, causing delays and customer complaints.
Drivers were assigned via human dispatchers or WhatsApp. Load balancing was poor — some drivers got too many orders while others sat idle. No visibility into driver availability or ETA back to restaurant zones.
Each restaurant had different menu formats, operating hours, and POS systems. Manual data entry caused menu errors and pricing mismatches. New restaurant signup took weeks instead of days.
Customers had no live view of their order. Drivers shared location via WhatsApp, which was unreliable. Restaurants couldn't anticipate pickup times, leading to food sitting too long or drivers waiting.
We built a three-sided marketplace: a Next.js web app for diners and restaurant management, React Native apps for drivers and restaurant kitchen displays, and a Node.js backend with Firebase for real-time events. Order routing uses geo-based rules to assign orders to the nearest restaurant branch. Driver dispatch uses a queue with proximity scoring — the system pushes assignments to the closest available driver. PostgreSQL holds orders, menus, and payments; Redis caches availability and live driver positions.
The driver dispatch algorithm was the hardest piece. We score drivers by distance to pickup, current load, and historical performance. Orders are pushed to the top-ranked available driver; if they don't accept within 30 seconds, we cascade to the next. Firebase syncs acceptance and status changes to all clients within milliseconds, so restaurants and customers see updates instantly.
Mapped restaurant and driver workflows. Designed order lifecycle and status flow. Built geo-routing rules and restaurant branch assignment logic. Defined menu and menu-item data model for multi-vendor support.
Built Node.js order API and Stripe integration. Developed React Native customer and driver apps. Implemented restaurant portal for menus and order management. Firebase integration for real-time order status.
Built driver dispatch queue with proximity scoring. Implemented GPS streaming and live map in customer app. Kitchen display tablet for order queue. Optimized for <3min average delivery in pilot zone.
Built restaurant self-signup and menu import tools. Load-tested with 50K orders/month. Rolled out to full 200+ restaurant network. Monitored and tuned dispatch algorithm based on real-world performance.
Food delivery aggregates three real-time flows: customer orders, restaurant preparation, and driver movement. Any latency in syncing status between these sides creates friction — drivers arriving before food is ready, or food cooling while waiting for a driver. Firebase gave us sub-second updates across all clients without building a custom WebSocket infrastructure.
The dispatch algorithm had to balance fairness (drivers get equal opportunity), efficiency (minimize total delivery time), and availability (don't overload a single driver). We iterated on scoring weights using real order data — proximity mattered most, but load balancing prevented driver burnout during lunch peaks.
Restaurant onboarding was a hidden complexity. Menus vary wildly in structure — categories, modifiers, combos, availability windows. We built a flexible schema and a CSV import tool that maps columns to our model. New restaurants could go live in a day instead of a week, which was critical for scaling from 50 to 200+ partners.
We help FoodTech companies build real-time ordering, dispatch, and tracking systems. Let's talk about your architecture.