Problem
Design a food delivery system connecting customers, restaurants, and delivery agents
- Enforce strict order lifecycles where actors are restricted to legal transitions
- Support stackable promotions and tip routing without entangling pricing logic in the order
- Atomically match orders to the nearest free agent while handling concurrency and retries
Key Test Points
- State pattern for lifecycle transitions
- Strategy pattern for discount pipelines
- Atomic claim for concurrent agent assignment
Spot an issue or have a suggestion?