
🍔 Food Delivery & QSR · C4 Architecture · Pro
A Swiggy/Zomato-style food delivery platform: customer, restaurant and rider apps, and the services that match orders, riders and payments.
C4 Architecture diagrams are part of Pro. Anyone can view this one; generating and editing it needs Pro.
Drawing diagram…
A food delivery platform: customers order in a mobile app, restaurants accept orders in a partner app, riders use a delivery app. Services: restaurant and menu service, order service, payment service with an external payment gateway, dispatch service that assigns riders using live GPS locations stored in Redis, ETA service, and a notification service. Order events flow through Kafka to push real-time updates.
C4Container
title Food Delivery Platform
Person(customer, "Customer", "Orders food")
Person(restaurant, "Restaurant", "Prepares orders")
Person(rider, "Delivery Partner", "Delivers orders")
System_Boundary(fd, "Food Delivery Platform") {
Container(capp, "Customer App", "React Native", "Browse and order")
Container(rapp, "Restaurant App", "Android", "Accept and prepare")
Container(dapp, "Rider App", "Android", "Pickups and drops")
Container(order, "Order Service", "Go", "Orders and status")
Container(menu, "Menu Service", "Java", "Restaurants and menus")
Container(dispatch, "Dispatch Service", "Go", "Rider assignment")
ContainerDb(geo, "Live Locations", "Redis", "Rider GPS")
ContainerQueue(kafka, "Order Events", "Kafka", "Status changes")
}
System_Ext(pay, "Payment Gateway", "UPI, cards, wallets")
Rel(customer, capp, "Uses")
Rel(restaurant, rapp, "Uses")
Rel(rider, dapp, "Uses")
Rel(capp, menu, "Browses")
Rel(capp, order, "Places order")
Rel(order, pay, "Charges")
Rel(order, kafka, "Publishes")
Rel(kafka, rapp, "New order")
Rel(kafka, dispatch, "Ready for pickup")
Rel(dapp, geo, "Updates location")
Rel(dispatch, geo, "Finds nearest rider")Everything that happens between a customer tapping Place Order and the food arriving: payment, restaurant acceptance, rider assignment, pickup and delivery.
Every status of a food delivery order, from placed to delivered, including restaurant rejection, no rider and customer cancellation.
How orders from dine-in, takeaway and delivery apps flow through a restaurant kitchen display system to the pass and out.
A schema for a food delivery platform: restaurants, menus, items with add-ons, customers, orders, order items and riders.
How a food delivery platform scales for lunch and dinner peaks: pre-scaling, autoscaling services, sharded databases and a surge-protected dispatch.
A cloud kitchen that runs several virtual brands: orders from aggregators, a kitchen display system, inventory and dispatch.