Skip to content

Build a Food Delivery Platform

Davor Minchorov•Advanced•18 to 27 weekends•November 19, 2026

A food delivery platform keeps taking orders and charging cards while its kitchen tablets are unreachable, and 212 customers pay for food that no kitchen ever saw. You will build the replacement, from menus and card holds through the kitchen, couriers, refunds and payouts, and prove it survives a simulated dinner peak with failures injected.

The brief

The client

I run operations at a food delivery platform in one mid-sized city. We list about 120 independent restaurants, take about 1,000 orders a day and have up to 120 couriers on shift at dinner, all on one application that handles the cart, the card charge, the kitchen tablets and the courier app.

During one Friday dinner peak the connection to our kitchen tablets dropped for 2 hours 40 minutes. The customer side stayed up, so it kept taking orders and charging cards. 212 customers paid for food no kitchen ever saw, waited 50 minutes or more and cancelled, and my team refunded them by hand over the weekend.

Our accountant then found that courier tips were counted toward the base pay we promise for each delivery. A courier kept none of the tip the customer meant for them, and nobody had decided that. I need a platform where a card hold, a kitchen and a courier always end in the same outcome, and where I can show a restaurant, a courier or a bank exactly where each cent went.

The problem

Today nothing can answer whether the money, the kitchen and the courier agree about an order. When the kitchen side fails, the customer side keeps selling, because taking payment never waits for a restaurant to say yes. Nobody has decided what customers, restaurants and couriers can still do when one capability is down, so a fault in one place is a fault everywhere.

Every refund is a manual edit of an order total. A missing item refunded after the card was charged and one refunded before it end with different amounts, and nobody can say which is right. The card provider keeps its fee on a charge that is refunded later, and nobody has booked that cost anywhere. Commission, courier pay, tips, refunds and payouts are recomputed from order totals at the end of the week, which is how tips were absorbed into base pay.

Couriers' positions are kept forever next to their orders. A bank dispute is answered with screenshots, because nobody recorded who delivered the order or when. Restaurants ask for a weekly statement that matches their own till, and ours does not.

The client's name and figures are invented for this brief; the rules and the failures are ones that real businesses of this kind work with.

The spec

Requirements

  • Let a restaurant be onboarded with a recorded consent, then publish a menu with modifiers, tax rates, allergen tags and opening hours, and mark items sold out.
  • Let a customer filter a menu by allergen, build a basket and see a total with tax, delivery fee, service fee and tip that equals what is charged.
  • Create one order and one card hold however often, and however simultaneously, the same order is submitted.
  • Hold the card before the kitchen is asked, handle a bank challenge, and take money only for an order the kitchen accepted and only for the lines that were delivered.
  • Deliver each order to the restaurant's tablet in a form the restaurant can check, take its answer within 5 minutes, and release the hold when the order is rejected, unanswered or cancelled.
  • Offer each accepted order to one courier at a time, give it to exactly one, offer it again if the courier declines or never arrives, and show the customer a live tracking view with the order's status and an ETA.
  • Show where every cent of a completed order went, including the card provider's fee, keep tips apart from courier base pay, and pay restaurants and couriers weekly with a statement each can check.
  • Let support refund a customer fully or partly, attribute the cost to the restaurant, the courier or the platform, and answer a bank dispute with order evidence.
  • Keep customers, restaurants and couriers working as stated while menu publishing, card payments, the kitchen connection, courier dispatch, tracking, refunds or payouts is stopped, change one visible rule while orders keep arriving, and give an operator what is needed to trace an order, retry what could not be processed, and pause a restaurant or a zone.

Deliverables

  • Your repository starts the whole platform with one command, plus a way to play the customers, the restaurant tablets, the couriers and the payment provider's messages, with a clock you control so a day runs faster than real time.
  • A fake payment provider you built, able to decline a card, ask for a bank challenge, answer late, answer twice, answer out of order, time out, expire a hold, open a dispute, keep its fee on a charge that is refunded later and fail on demand.
  • A README that takes a reviewer from a fresh clone to an order placed, accepted, delivered, paid and shown on the restaurant's statement in 15 minutes, and lists the command that runs each test.
  • A worked example of one order's money, by hand, that the platform reproduces to the cent.
  • Documentation for a restaurant's tablet integration: the requests the platform sends, how to verify their signature, and the answers it accepts.
  • A test suite covering every failure test the Phases pose, plus the results of the simulated dinner peak from the final Phase committed to your repository.
  • An operations note stating how an operator traces an order, retries what the platform could not process, pauses a zone or a restaurant, reverses a payout, and stops and restarts each of the seven capabilities named in the requirements.

Out of scope

  • Real maps, geocoding or route optimisation. Zones and a fixed travel-time table are enough to teach dispatch, and routing is a research field of its own.
  • Customer and courier mobile apps. An HTTP interface and the simulator stand in for them.
  • A real payment provider or real card data. A fake provider that mimics holds, partial captures, expiry and disputes keeps the build on one machine and keeps card data out of your repository.
  • Integrating with real restaurant point-of-sale vendors. A simulated tablet is enough, because each vendor integration is a separate project of mapping item codes and failed-order states.
  • Batching or stacking, one courier carrying two orders. It turns offers into a matching problem and doubles the dispatch rules, so one order per courier keeps the offer rule checkable.
  • Promotions, vouchers and loyalty. Each one adds a pricing rule, and the brief wants the pricing rules fixed and few.
  • Ratings and reviews. They add moderation and aggregation and say nothing about the coordination between a payment, a kitchen and a courier.
  • Courier employment classification. The brief states no rules on employee versus contractor status.
  • Real bank transfers for payouts. A payout ends at a statement and the amounts behind it, and moving the money is the client's bank.
  • Push, SMS or email notifications. The tracking view is how the customer learns an order changed.
  • Machine-learned prep times or ETAs. The platform records the waiting time such a model would need, and nothing learns from it here.
  • Payment methods that cannot be held. They need a different flow, pay first and refund on rejection, and would double the rules for ending an order.
  • Kubernetes or cloud deployment. Everything runs on one machine.
  • Payment methods other than cards, such as iDEAL. The platform takes cards only, because the card is held before the kitchen accepts and charged after, and iDEAL takes the money at once.

Architectural constraints

  • Amounts are in euros and exact to the cent. No amount is ever rounded in a way that makes a total differ from the sum of its parts.
  • No card number is ever stored.
  • Money is never taken for an order the kitchen has not accepted.
  • Every order ends in exactly one outcome, and no card hold stays open past its deadline.
  • Whatever fails, no order is lost, no order is doubled and no deadline fires twice.
  • A stopped capability delays only the work that needs it. Everything else keeps working.
  • Tips and courier base pay are never counted against each other.
  • The customer's name, phone and delivery address are seen by a courier only while that delivery is active.
  • A courier's position is kept only while the courier is on shift, and each position is deleted 30 days after its delivery.
  • Personal fields are erased on request, while financial, tax and order-evidence records stay for 7 years, identified by ID only.
  • The platform never deactivates a courier on its own. It raises a flag that an operator decides on.

Prerequisites

You have finished an intermediate project or have equivalent experience, on any stack. You do not need prior experience with payments or with products that keep working while part of them fails, and you do not need to know how a food delivery platform works; the first Phase explains the business and the words the brief uses. The brief has you build the fake payment provider yourself, so no account with a payment company is needed. Having once chased a refund that came out different depending on when it was issued will make most of this brief feel familiar.

Create a free accountSign in

Free to start. An account is what keeps track of the checkpoints you finish.

Phase 1

Map the platform

Produces the written map of one order (who takes part, what each party sees and does, every deadline), one order's money worked by hand to the cent, and a way to start the platform with one command and move a clock you control. Runs no customer order yet.

Research

Research

Implementation

Architectural walkthrough

How a food delivery platform gets a meal from a kitchen to a door

The platform lists about 120 independent restaurants in one city and takes about 1,000 orders a day, with up to 120 couriers on shift at dinner. A restaurant publishes a menu with modifiers, tax rates, allergen tags and opening hours, and marks items sold out. A customer filters the menu by allergen, builds a basket and sees one total made of the items, tax, delivery fee, service fee and tip.

The platform does not cook or deliver anything itself. When a customer orders, the platform holds the amount on the card and sends the order to the restaurant's kitchen tablet. The restaurant has 5 minutes to accept or reject it. After it accepts, the platform offers the order to one courier at a time until one takes it, and the customer watches the order's status and an estimated arrival time. Money is taken only for the lines that were delivered.

Each week the platform pays every restaurant and every courier and gives each a statement. Support handles refunds and answers disputes raised through a customer's bank.

The words this brief uses:

  • Modifier: a choice added to a menu item, such as a size or an extra.

  • Hold: an amount set aside on the customer's card without taking it. It is released if the order does not go ahead.

  • Capture: taking the money, which can be less than the hold.

  • Kitchen tablet: the device in the restaurant that receives orders and sends back the restaurant's answer.

  • Offer: the platform asking one courier to take an accepted order. The courier can decline.

  • Base pay: the amount the platform promises a courier for each delivery.

  • Tip: money the customer adds for the courier, kept apart from base pay.

  • Commission: the share of an order the platform keeps from the restaurant.

  • Statement: the weekly list of what the platform paid a restaurant or courier and why, which they check against their own records.

  • Dispute: a customer asking their bank to reverse a charge. The platform answers with order evidence.

Why the map comes first

No customer order runs in this Phase. It exists because of what a team learns on the first Friday it builds without it.

Everyone who touches an order holds a different idea of who is involved, what each person must do by when, and what the money comes to. When those ideas are written down after the platform is built, the first comparison happens in the weekly payout, where a courier's tip has already been counted toward the base pay the client promises. Nobody decided that, and nobody could see it.

The client's Friday was a deadline nobody owned. The connection to the kitchen tablets dropped for 2 hours 40 minutes, the customer side kept taking cards, and 212 customers paid for food no kitchen saw. Nobody's job was to notice that the 5 minutes a restaurant gets to answer had passed.

Money has the same problem. If the 3,389 cents of the worked basket is not agreed to the cent before anything is built, the first disagreement about a total has no right answer to check against. It surfaces on a restaurant's statement that does not match its till.

Deadlines of 5 minutes, 10 minutes and 7 days also cannot be tested by waiting. A product that can only be exercised in real time gets checked once, by hand, and then trusted.

Phase 2

Publish restaurant menus

Produces restaurants onboarded with a recorded consent, menus with modifiers, tax classes, allergen tags and opening hours in the restaurant's own time zone, and the rules for when a menu can be ordered from. Leaves ordering from those menus for the next Phase.

Implementation

Implementation

Testing

Architectural walkthrough

A restaurant changes its menu while customers are still ordering from the old one. It also presses publish twice, or sends an older edit after a newer one because its connection was slow. The client pays for each of these in the same way: a customer is charged a price the restaurant no longer honours.

Opening hours add a second kind of error. A restaurant open from 18:00 to 02:00 in Berlin is open at half past midnight, and the clocks change twice a year, on a night when 02:30 does not exist and on a night when it happens twice. A platform that reads every restaurant's hours in one time zone sells dinner at the wrong hour on those nights and refuses it at others.

Allergens are the part with a person at the end of it. A menu item that says nothing about allergens is not the same as an item that says it has none, and a customer who filters out peanuts will trust the filter. An item nobody checked, shown as safe, is the worst result the platform can produce in this Phase.

Onboarding is where the client's legal exposure starts. A restaurant listed without a recorded consent is a restaurant the client cannot show an agreement for. A process that dies halfway through onboarding must not leave a restaurant half-listed, with an agreement recorded and no restaurant, or a restaurant and no agreement.

Phase 3

Place an order

Produces menus customers always see in their newest form, an allergen filter, a basket total that equals the charge, and an order that is created once however often it is submitted. Leaves the card, the kitchen and the couriers for later Phases.

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

Phones retry, customers double-tap, and a menu changes while a basket is open. The client has paid for each of these. A placement sent twice becomes two orders, and the client refunds one of them by hand. A total on the screen that differs by a cent from the charge shows up weeks later on a restaurant's statement.

Menu updates reach customers late, twice or in the wrong order, and sometimes not at all because menu publishing is stopped. A customer who sees an old price and is charged a new one disputes the charge. A customer who cannot see any menu because one part of the platform is stopped is a lost order for every restaurant, so the last published menu has to stay usable.

An order placed at one price must keep that price. If a restaurant edits a dish at 19:40, the customer who saw the old price at 19:39 is owed the old price or told about the new one before paying, never charged a price they did not see.

A process that dies between storing an order and answering the customer leaves a customer who does not know whether they ordered. If they try again the platform must find the order that exists. If it told them the order was placed, the order must exist.

Phase 4

Hold the card

Produces a card hold taken before the kitchen is asked, a bank challenge the customer must complete in time, and provider messages that arrive twice or out of order, tested against a fake payment provider you build. Takes no money yet.

Research

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

Banks challenge, time out, answer late, answer twice and answer in the wrong order. The client pays for each of these with money. A customer charged twice phones support. A customer charged for an order that already ended waits days for a refund. A hold left open for 7 days keeps a customer's money reserved for food that was never cooked.

Taking payment at checkout is how the client runs today, and it is the reason a rejected or unanswered order needs a refund. A hold takes nothing, so this Phase only reserves the amount. Whether the hold ends in a charge or a release is decided by what the kitchen does next.

A bank asking the customer to confirm the payment adds a wait the client does not control. An order sitting in that wait with a basket and a hold needs an end, and a challenge completed after that end must not bring a dead order back.

A process that dies after the bank granted the hold and before the kitchen was asked leaves a customer whose card is held for an order nobody is cooking. The customer finds out when they phone. The fake provider you build here is also what every later money Phase is tested against, so it has to be able to cause every awkward behaviour the bank can.

Phase 5

Reach the kitchen

Produces orders delivered to the restaurant's tablet in a form the restaurant can check, the restaurant's answers taken back, a restaurant that pauses when its tablet goes silent, and scheduled orders released when cooking should start. Leaves deciding what each answer means for the order to the next Phase.

Research

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

The tablet is a device the platform does not control. It goes offline, answers twice, answers late, and its owner may press accept and reject within a second of each other. The client has already paid for one such failure: the connection to the tablets dropped for 2 hours 40 minutes, and 212 customers paid for food no kitchen ever saw.

A restaurant needs to be able to check that an order came from the client. Without that, anyone who knows the address of a tablet can send it a forged order, and the kitchen cooks food that nobody ordered and nobody will collect.

A restaurant that stops answering has to stop receiving orders. Selling into a kitchen that nobody is reading collects payment for food nobody cooks. The opposite mistake is as costly: a platform that measures silence badly can pause every restaurant at once because the platform itself was down for a while.

A process that dies after saving an order and before sending it leaves a customer with a held card and a kitchen that never heard of the order, and nobody finds out until the customer phones. Scheduled orders add a second clock: a dinner order sent at lunchtime is ignored or cooked too early.

Phase 6

Settle each order

Produces an order that is accepted or ended within the kitchen's 5 minutes, a hold released when the order ends before acceptance, lines that run out after placement, the client's rule for late cancels, and orders that survive a restart. Leaves couriers and taking the money for later Phases.

Implementation

Implementation

Implementation

Implementation

Testing

Testing

Architectural walkthrough

Every order must end in one outcome that the customer, the restaurant and the bank agree on. The failures here are the ones that leave them disagreeing. A clock forgotten when the platform restarts leaves an order waiting forever with a customer's card held. A clock remembered twice tells the customer twice that their order was cancelled.

A restaurant accepting and a customer cancelling at the same moment are two true facts about one order. If both succeed, the client charges a customer for an order the customer cancelled, or the restaurant cooks food nobody will collect. The platform has to pick one, and the other party has to be told the real outcome.

Items run out after an order is placed, and a customer cancels after cooking has started. The client has a rule for each, and a platform that cancels the whole dinner for one missing side dish loses the order and the customer. A platform that charges nothing for a cancel after cooking leaves the restaurant paying for the food.

A bank that is unreachable at the moment an order ends must not leave the customer's money reserved. The release has to happen later, once, and the customer has to see that it did.

Phase 7

Dispatch couriers

Produces couriers on shift in six zones, offers that reach one courier at a time and timed to the food, pickup and dropoff confirmed with a code, and a new offer when a courier drops out. Money and the customer's live view are left for later Phases.

Implementation

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

This Phase has to survive couriers who say yes twice, say nothing, or never arrive.

An offer goes to one courier at a time, so it looks as if two couriers can never hold the same order. They can. An offer runs out after 45 seconds, the next courier receives it, and the first courier's accept arrives from a phone with a weak signal a moment later. Both drive to the restaurant. One goes home unpaid, the restaurant hands the bag to whoever stands at the counter first, and the courier who lost has a reason to stop working for the platform.

Timing costs money in the other direction. A courier sent at the moment the kitchen accepts stands at the counter for the whole prep time, paid by the platform and unable to take another order. With 120 couriers on shift handling 200 orders an hour at the dinner peak, couriers are already about 83 percent busy, so every minute of waiting is a minute some other customer's food has no courier.

Absence is the quietest failure. A courier who never arrives sends nothing, so the order sits ready, the food goes cold, and the customer learns about it by phoning. The same goes for a zone where every courier has gone home: the platform keeps selling delivery nobody will make, and the client refunds those orders by hand.

Phase 8

Capture and book the money

Produces the card charge after delivery, for the lines delivered only, and a record of where every cent of each completed order went, with tips kept apart from courier base pay. Refunds, statements and payouts are left for later Phases.

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

This Phase has to survive taking the wrong amount, taking it twice, and not being able to explain it.

The card hold is the most the customer could owe. What the customer owes is the order's final amounts, after any line that ran out and after any refund approved inside the 30 minute report window. Charging the whole hold and sending the difference back later feels safe, and it shows the customer a charge for food nobody delivered. Customers phone about it, and the client pays for that line on the next invoice from the bank.

A process can die between asking the bank to charge and hearing the answer. Nobody then knows whether the money moved, and the guess is wrong in one of two ways: the customer is charged twice or the platform delivers a dinner it was never paid for. A refused charge after the food has been eaten is lost money, and restaurant and courier must still be paid.

The client's accountant found another failure: courier tips counted toward the base pay the client promises for each delivery, so couriers kept none of the tip the customer meant for them, and nobody had decided that. Rounding is one more. Tax is taken out per line and rounded half up, which is wrong by a cent for baskets with odd prices in ways one worked example never shows. At 1,000 orders a day those cents add up to a gap the accountant cannot trace to any order.

Phase 9

Track the courier and the ETA

Produces a live view for the customer with status and an ETA, courier positions that are accepted even when they arrive hours late, and the rule for how long those positions are kept. Refunds and payouts are left for later Phases.

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

This Phase has to survive late data and data kept too long.

Couriers lose signal in cellars, lifts and tunnels. Their phones then send nothing for an hour and everything at once. If the platform treats the last batch it received as the latest news, the courier jumps back to where they were two hours ago, the ETA jumps with them, and the customer reads that as a broken promise and phones support.

A customer's view is read far more than it is written. Each viewer reloads every 10 seconds, which is about 12 reads a second at the dinner peak, and every one of those reads is a customer deciding whether to phone the client.

The client also keeps every courier position forever next to the order. A trail of where a person was and when is personal data. Nobody has a reason to hold it for years, and a breach or a request from the courier makes it a problem. Payouts, tax records and bank disputes still need to know that a delivery happened and who made it, so deleting the trail cannot mean deleting the order.

Phase 10

Refund and answer disputes

Produces refund cases from customer reports, refunds that end with the same money for the restaurant, the courier and the customer whether the card was charged yet or not, and the platform absorbing the fee the provider keeps after a charge, the cost placed on the right party, a decision on not-received claims, and answers to bank disputes. Payouts are left for the next Phase.

Implementation

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

This Phase has to survive refunds that depend on timing and claims that depend on one person's word.

A refund approved a minute before the card is charged and one approved a minute after look the same to the customer. For the bank they are different transactions. If the platform works them out differently, the restaurant's statement and the courier's pay change with the timing of a click, and nobody can say which figure is right. The bank also keeps its fee on the charge it has already made, so the platform pays for a refund that comes late. Two support agents approving the same refund at the same moment, or one agent pressing twice, can pay the customer twice.

The cost of a refund belongs to whoever caused it. If the platform absorbs every refund, a restaurant that packs the wrong item never hears about it. If restaurants absorb every refund, they pay for food lost in transit. The client's own table decides it, and a courier is flagged for an operator to read, never penalised on one customer's word.

A customer who says the food never arrived is one person's word against another's. The client's bank disputes were answered with screenshots because nobody had recorded who delivered an order or when. A lost dispute costs the amount, the bank's fee and the next payout of whoever was paid for it. The evidence also has to survive the customer asking to be erased.

Phase 11

Pay restaurants and couriers

Produces a weekly statement and payout for each restaurant and each courier, and the correction when a dispute is lost after a party was paid. The tools for an operator are left for the last Phase.

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

This Phase has to survive a payout that is wrong, run twice or left half done.

Restaurants asked for a weekly statement that matches their own till, and the client's does not. A restaurant that finds one wrong line argues about every line, and the client's finance person ends up reconciling by hand. A week is also ambiguous: an order delivered at 23:30 on Sunday belongs to a different statement from one delivered at 00:10 on Monday, and the week when the clocks change contains a day of 23 or 25 hours.

A payout run can be killed halfway or started twice by two people. Rerunning after a kill pays some restaurants twice. Not rerunning leaves others unpaid, and the client has no way to tell which is which. Money paid twice does not come back.

The bank decides a dispute whenever it decides, which can be weeks after the restaurant and the courier were paid for the order. Rewriting a statement already sent means the party's own records no longer match. Ignoring the loss means the platform pays for the order twice. A party asking to be erased must not make any of this stop adding up.

Phase 12

Operate the platform

Produces what an operator needs to trace an order and retry what could not be processed, then the proofs: a simulated dinner peak, one capability stopped at a time, one updated at a time, and every failure at once. Nothing new is sold in this Phase.

Implementation

Implementation

Implementation

Testing

Testing

Testing

Architectural walkthrough

This Phase has to survive the Friday that started the project: the connection to the kitchen tablets down for 2 hours 40 minutes, 212 customers paid for food no kitchen saw, and the client's team found out from the customers.

When one order goes wrong, an operator on the phone has minutes. If the history of that order has gaps, or sits in several tools, the operator guesses from timestamps. One message the platform cannot make sense of can hold up everything behind it if it is retried forever, and can lose an answer nobody notices if it is thrown away.

A product that stops everything when one capability stops is as bad as one that keeps selling when the kitchen is gone. An update that drops orders while it runs turns every lunchtime release into a loss. A platform that works for one order at a time can still fail at the dinner peak, where everything that waits does so with a hundred others.

Each of these failures is survivable alone. The Friday came from several at once, so the last Checkpoint runs them together, and its pass condition is the client's: every order ends in exactly one outcome, no hold stays open past its deadline, the books balance to the cent, and no customer is charged for an order the kitchen did not accept.

Architectural walkthrough

One outcome for every order

The client's Friday happened because the customer side, the kitchen side and the courier side each held their own idea of whether an order was alive. The customer side had taken the order and the card charge. The kitchen side had never heard of it. Nobody was responsible for noticing the difference, so 212 customers waited for food that no one was cooking.

Every order in this platform must end in one outcome that the customer, the restaurant, the courier and the bank all agree on. An order the kitchen never answers has to end, and the customer has to see that it ended before they cancel in frustration. An order that ends early has to give back what it took.

Money moves last

The steps run in a fixed order: hold the card, ask the kitchen, find a courier, and take the money last, for the lines actually delivered. Each alternative to this order has a price, and the client's Friday shows the first one.

  • Charging at checkout is the simplest flow and the one the client runs today. Every rejection, timeout and outage then needs a refund, and the customer has watched their money leave for food nobody cooked. A card hold takes nothing until the order is delivered.

  • Hiring the courier before the kitchen accepts finds a courier faster. The price is a courier standing at a restaurant for an order the kitchen then rejects.

  • Letting the bank, the kitchen or the courier decide on its own that an order is finished is quicker to write. The price is three parties with three answers to the same question, which is the Friday again.

Clocks

Every step has a clock: the bank challenge 10 minutes, the kitchen 5 minutes, the courier offer 45 seconds, the courier's arrival 10 minutes past the promised time, the card hold its expiry. If the platform forgets a clock when it restarts, an order waits forever with the customer's card held. If it remembers a clock twice, the customer is told twice that their order was cancelled, or a courier is offered an order that another courier already has.

A restaurant accepting and a customer cancelling at the same moment are two true facts about one order. Two couriers tapping the same offer at the same moment are two true facts about one offer. Each pair has to end in exactly one outcome, and the loser has to be told.

Messages from outside

The bank sends the same message twice, or sends the second one first. The restaurant's tablet answers an order that the customer cancelled a minute ago. A courier's phone uploads positions hours late from a car park with no signal. Each of these costs the client a wrong answer: a hold captured twice, an order revived after it ended, a courier shown in the wrong place.

A crash is the same problem from the inside. A process that dies after saving a payment and before telling the kitchen leaves a customer paying for food nobody is cooking, and nobody finds out until the customer phones.

Money and the people behind it

The tip defect is an accounting mistake that nobody noticed because nobody could see where each cent went. A refund issued before the card was charged and one issued after it must end with the same money for the restaurant, the courier and the customer. The platform ends with the same money too, except for the card fee that the provider keeps once a charge has been made. A dispute lost after a restaurant was paid must still be recovered from somewhere, and a restaurant, a courier or a bank must be able to check every cent against a statement.

Personal data adds a second duty. A courier's position, a customer's address and a customer's name are kept only as long as the client's rules allow, while the records the tax office and the bank may ask for stay, identified by ID only.

One capability stopped

Last Friday only the kitchen connection was down, and the product went on selling as if nothing had happened. The client needs a decided answer for every outage: with card payments stopped, customers can still browse menus and follow orders already placed. With courier dispatch stopped, restaurants keep accepting and the orders wait. With tracking stopped, nothing else changes. A change to one capability has to ship while the rest keep serving at 10 orders a minute without losing one.

Where it shows if you cut a corner

The Phase 12 dinner peak plays 400 orders over 2 simulated hours with the kitchen connection down for 20 minutes, the fake provider returning errors for 5 minutes, every kitchen and provider message sent twice, 10 couriers taken off shift without notice and order placement stopped for 60 seconds. It passes only if every order ends in exactly one outcome, no hold stays open past its deadline, the books balance to the cent and no customer is charged for an order the kitchen did not accept.

If the platform charges before the kitchen accepts, the 20 minutes of kitchen downtime fail that last condition. If a deadline is forgotten when order placement comes back after its 60 second stop, holds stay open past their deadline. If a refund or a payout is worked out differently from how the order was settled, the 10,000 generated orders in Phase 8 and the refund comparison in Phase 10 fail first, and the payout reconciliation in Phase 11 fails after them.