Three sides at once: customer, restaurant and courier, with one order moving through a state machine.
What is on this board
Parts
- Customer Mobile app
- Restaurant panel Web app
- Courier Mobile app
- Orders Monolith · Rails
- Orders and menus Relational DB · PostgreSQL
- Restaurants nearby Search index · Elasticsearch
- Couriers Geospatial index · Redis GEO
- Payment Payment provider · Mercado Pago
- Pix Banking / open finance · Pix
- Live order status Realtime channel
- Status Email / SMS / push
- Start Initial state
- Placed State
- Accepted State
- Ready State
- With the courier State
- Delivered State
- End Final state
How they connect
- Customer → Restaurants nearby: what's near me?
- Customer → Orders: places order
- Orders → Payment: charge
- Orders → Pix: or Pix
- Orders → Orders and menus: SQL
- Orders → Live order status: status
- Live order status → Customer: live status
- Live order status → Restaurant panel: new order
- Restaurant panel → Orders: accepted, ready
- Orders → Couriers: closest courier
- Courier → Orders: picked up, delivered
- Orders → Status: on its way
Notes and decisions
- Orders: One deploy until a part needs its own scale
More like this
News feed, like TwitterFan-out on write or on read? Timelines in a cache, the celebrity problem, and how a post reaches millions of followers.
News feed, like TwitterFan-out on write or on read? Timelines in a cache, the celebrity problem, and how a post reaches millions of followers.
URL shortener, like BitlyThe first system design interview question: key generation, heavy reads, a cache in front, and click analytics off the request path.