Skip to content

Build a Restaurant Group Back-Office

Davor Minchorov•Advanced•22 to 33 weekends•November 5, 2026

A restaurant group has outgrown the cloud till it runs on: when the connection dropped on a Friday, its terminals could not see each other's orders and the last portions of one dish were sold three times. You will build the group's back-office, from booking a table and firing a course to selling the last portion once, closing the business day and reporting it, and prove it survives a simulated Friday with failures injected.

The brief

The client

I own three restaurants of 60 seats each in the Netherlands, with one shared menu and one head chef who writes the recipes for all three, and we serve about 240 covers a day at each site. On a Friday evening the cloud service behind our tills went down for about an hour and a half. The tills kept taking orders in offline mode, but each terminal held only its own orders, so the kitchen display at the grill never saw what the second terminal took. The last lamb shoulders were sold on two terminals and on the delivery app, and three tables waited on one dish.

When the connection came back, a guest who had ordered through the app turned out to have been charged for an order that never reached a till. I found out because he phoned. I need one system where the tills keep working without the cloud, where the last portion is sold once, and where yesterday's numbers are right the next morning.

The problem

Today the group runs a cloud till for orders and payments, a booking widget, a rota spreadsheet and a stock spreadsheet, and the bookkeeper is the integration. A dish runs out mid-service because stock is counted by hand on Sunday night, and nobody learns it until a guest is told. The till subtracts from a portion count when an order is entered, so when two terminals and the delivery app read the same number at the same moment, the last portion sells more than once. When the cloud is gone the terminals cannot see each other, and on reconnect nobody can say which orders are duplicates.

The day is whatever the till closed at 04:00, so an order rung at 01:30 on Saturday belongs to Friday's takings, but the rota spreadsheet and the bookkeeper use the calendar date and disagree with it. Money moves in six directions: guests pay, tips go to staff, wages go out, suppliers are paid against invoices that arrive after the delivery, delivery platforms keep a commission, and the card processor settles a batch later. Each leaves a figure that has to match the others at close.

The owner reads one figure above all, prime cost (food plus labour as a share of sales), and it stays a guess until the next hand count, because food cost depends on that count. A manager approves voids and comps at the till and nothing records who. An inspector can ask for the fridge readings and for which supplier lot went into which dish, and today the answer is a binder.

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 guest book a table for a party size and time, hold it for the length of a turn, cancel it, and offer a cancelled table to the waitlist; mark a no-show, release the table and charge the card-guarantee fee exactly once.
  • Let servers place orders with courses and allergy flags, show each kitchen station only its own items on a display, and let cooks bump and recall tickets.
  • Sell each limited dish no more times than there are portions, across every terminal and the delivery platform at once, and take the dish off sale everywhere within 10 seconds of its last portion selling.
  • Split a check across cards and cash, take the tip the guest chooses on the card terminal as part of the card payment, refund a line with a named manager, and settle a check only when its parts add up to its total.
  • Record deliveries by lot against purchase orders, match supplier invoices to both, count stock, say which dishes used a recalled lot, and keep the fridge logs an inspector can ask for.
  • Publish rosters that respect rest rules, handle swaps, and share pooled tips by minutes worked with retained records.
  • Keep terminals taking orders and card payments through an outage of their connection to the cloud, and merge their backlog on reconnect without losing or duplicating an order or a payment.
  • Accept orders from delivery platforms, reject those for dishes no longer available, and reconcile what the platform pays against what was sold.
  • Close each site's business day, produce the Z report (the end-of-day sales summary), and give the owner yesterday's sales, covers, labour percent, food cost and usage variance.
  • Keep serving through a stopped or updated capability: with card payments stopped, tables are still booked and orders taken; with stock stopped, terminals keep selling the portions they can confirm; with booking stopped, seated parties still order; a change shipped during service drops no order.

Deliverables

  • Your repository starts the whole product with one command, plus a simulator that plays the guests, hosts, servers, cooks, managers, suppliers, card processor and delivery platform, with seed data for 3 sites, 60 dishes, 120 ingredients, 12 suppliers and 8 limited dishes.
  • A README that takes a reviewer from a fresh clone to a closed day with a Z report in 20 minutes, and lists the command that runs each test the brief asks for.
  • A way to run the group's day faster than real time and to cause each outside failure the brief names: terminals cut off from the cloud, any one named capability stopped and started again, the processor answering late or not at all after it has taken the money, the delivery platform sending an order twice, losing one or answering late, a supplier invoice arriving before its delivery, and the product killed in the middle of a save.
  • A description of the purchase order document a supplier receives and of the 90-day export an inspector receives, so each knows what to expect.
  • A test suite covering every failure test in the brief, plus the results of the simulated Friday from the final Phase, committed to your repository.
  • An operations note stating what an operator must be able to do: follow one guest's visit from booking to payment, retry a record that keeps failing, erase a person's details on request, produce the inspector export, and restore the reports from stored data.

Out of scope

  • Payroll calculation. Staff scheduling outputs hours and tip shares; computing pay needs rules that differ by country.
  • Accounting export. Reports end at the daily summary; an accounting integration adds no new problem.
  • Fiscalisation, meaning signed receipts and a tax-inspection export. The rules differ by country and change, so the brief picks none.
  • Tax lines. Prices and totals are gross amounts in cents; tax rates differ by country and order type, and any rate here would be invented.
  • Real card processing. The processor is a simulator you write, with the behaviours the brief names.
  • Supplier electronic ordering. A purchase order leaves as a document a person could send.
  • Credit notes for short deliveries and premium pay for late roster changes. A short delivery holds its invoice and resolving it is outside the brief; roster changes carry no premium pay.
  • A guest-facing booking site, ordering on the group's own website, or a staff mobile app. The simulator plays the people, and a terminal or a display is checked by what it accepts and shows, not by how it looks.
  • Demand forecasting and automatic roster generation. Optimal scheduling is a research field of its own; the brief checks a roster a person built.
  • Stock transfers between sites and a central kitchen. Each site holds its own stock.
  • Sharing no-show history between sites. Guest data is kept per site.
  • A purge of checks, payments, shifts, fridge logs or lot records. They stay after a person's details are erased. The client is a Dutch business and must keep its business records for 7 years (Belastingdienst rule), so no deletion period is built or tested.
  • Kubernetes or cloud deployment. Everything runs on one machine.

Architectural constraints

  • Amounts are exact to the cent, weights are whole grams and temperatures are whole tenths of a degree Celsius, negative below zero. Prices and totals are gross: there is no tax line.
  • No full card number is ever stored. The group keeps the last four digits and whatever the processor hands back to charge the card again.
  • Money is taken only against a check the server has closed.
  • A limited dish is never sold more times than it has portions. The group would rather turn a guest away than sell a portion twice.
  • Corrections never erase. A void, a comp, a refund, a stock count, a tip correction and a drawer count each leave the earlier figure readable and name the person who approved it. The approver's name and role are taken from the terminal login and are not verified.
  • Every moment is recorded so that the order of events survives clock changes. Reports group by business day, which ends at a per-site cutoff (04:00 by default), and never by calendar date.
  • A capability that is stopped may slow the others and never makes them fail. The one stated exception is a limited dish whose portions a terminal cannot confirm while stock is unreachable: it shows as sold out at that terminal.
  • Guest names, phone numbers and allergy declarations are erased 12 months after the guest's last booking and on request. Staff names and contact details are erased 12 months after the person's last shift and on request. Checks, payments, shifts, fridge logs and lot records stay, identified by ID.

Prerequisites

You have finished an intermediate project or have equivalent experience: you have built applications that keep data in a database and talk to an outside system. Any language and framework will do. You do not need to know how a restaurant group runs its service; the first Phase explains the business and the words the brief uses.

Create a free accountSign in

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

Phase 1

Map the service day and start the clock

Produces a written map of one service day, a rule that files every sale on the right business day, and one command that starts the product and a simulator with a clock you control. It adds no restaurant behaviour yet, which starts in Phase 2.

Research

Implementation

Implementation

Architectural walkthrough

How a restaurant group runs a service day

The group has three restaurants of 60 seats in the Netherlands, with one shared menu and one head chef who writes the recipes for all three. Each site serves about 240 covers a day. A guest books a table through a booking widget or arrives without one. Servers take orders on tills, a kitchen display shows each station only its own items, and guests also order through delivery platforms.

A normal evening has bookings held for the length of a turn, a waitlist for cancelled tables, and a few limited dishes that run out. The kitchen cooks from deliveries that arrive against purchase orders, and the supplier's invoice follows later. Managers approve voids and comps at the till. At close, each site counts its drawer and the card processor settles its batch afterwards, and the delivery platforms pay what they owe minus their commission.

Behind the service sit the rota, the tip pool and the stock count. Staff are rostered with rest rules, and pooled tips are shared by minutes worked. The owner reads prime cost every morning, and an inspector can ask for the fridge readings and for which supplier lot went into which dish.

The words this brief uses:

  • Cover: one guest served. A site serving 240 covers a day served 240 guests.

  • Turn: the length of time a table is held for one party before it is offered to the next.

  • Ticket and bump: a ticket is one order's items for a station. A cook bumps it to mark it done, and can recall it.

  • Limited dish: a dish with a fixed number of portions for the day, such as the last lamb shoulders.

  • Void and comp: a void removes a line from a check, and a comp gives it free. A manager approves both.

  • Business day: the trading day, which ends at a per-site cutoff, 04:00 by default, and not at midnight.

  • Z report: the end-of-day sales summary for one site.

  • Prime cost: food plus labour as a share of sales.

  • Lot: one delivery of an ingredient from a supplier, identified so that a recall can name the dishes that used it.

  • Purchase order: the document the group sends a supplier to order goods. The supplier's invoice is matched to it and to the delivery.

Why the day is not the calendar date

The group's day does not end at midnight. An order rung at 01:30 on Saturday belongs to Friday, because the kitchen is still closing Friday dinner. A report that groups by calendar date splits that dinner across two days, and the owner reads a quiet Friday and a busy Saturday that never happened. The bookkeeper and the rota use calendar dates, so the three disagree about what a day earned.

Two nights a year the clocks change and the business day is 23 or 25 hours long. A rule that subtracts a fixed number of hours files sales under the wrong day on exactly those nights, when nobody is checking. A terminal that sends a sale hours after it happened must still file it under the day it happened, not the day the group heard about it.

The group has a second problem before any code: nobody has written down how a day runs. Everyone who touches a visit, from the host to the delivery platform, sees a different slice of it, and each notices a different failure first. Without a map in the restaurant's own words, the later Phases are built against a guess, and the first busy Friday shows which part of the guess was wrong.

The last problem is testing. Rules measured in minutes and hours, such as a no-show after 20 minutes or a 90-minute outage, cannot wait for real time. If the day cannot be sped up and the outside failures cannot be caused on demand, none of the rules in this brief can be shown to hold. A product a reviewer cannot start from a fresh clone costs the same patience.

Phase 2

Publish menus and recipes

Produces three sites, a menu of 60 dishes with recipes in grams, allergens that follow the ingredients, every earlier version of a recipe or price kept, and a hand 86 per site. It takes no orders yet.

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

The head chef writes one set of recipes for three kitchens and changes them. On Tuesday the lamb recipe changes. If Monday's sales are then costed against Tuesday's grams, Monday's food cost is wrong and nobody can say why. A recipe or a price that can be edited in place makes every earlier report disagree with what was cooked and charged.

Allergens are a safety matter. A list typed on each dish drifts from the ingredients the moment someone changes an ingredient and forgets the dish. A guest with an allergy is then told something the kitchen's own recipe contradicts, and the group hears about it from the guest.

Prices carry their own risk. A price changed at 17:55 is the price at 18:00, and a check opened at lunch must not change under the guest. A price saved and then lost when the product dies leaves the group selling at a price nobody agreed, or with two prices that both claim to be current.

A chef also needs to take a dish off sale at one site for an evening because the fish did not come, without touching the other two sites or the recipe. If that decision reaches every site, two kitchens lose a dish they have.

Phase 3

Book and seat tables

Produces bookings that hold a table for a turn, a waitlist, a release for parties that never arrive, an overbooking rule for peak slots, and a test with two hosts racing. It leaves the no-show card fee for Phase 8.

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

A table held all evening halves the room. A table held too short seats two parties at one table. The group's turns are 90 minutes for a party of 2 or fewer, 120 for 3 to 5 and 150 for 6 or more, so a party of 4 booked at 19:00 holds its table until 21:00 and the next party sits at 21:00.

Two hosts working at once each see the same free table and each promise it. Two parties then stand at one table at 21:00 and a host explains it to both. It happens at the busiest minute of the evening and never shows in a quiet test with one person.

About one booking in ten never arrives. A restaurant that never overbooks leaves seats empty at its busiest hour. One that overbooks with no rule has no answer on the evening when everyone shows up. The group allows up to 10% over a peak slot's capacity and wants the rule for who is seated first and who waits decided in advance.

A product that dies after saving a booking and before showing it must neither lose that booking nor make it twice. With booking stopped, nobody can book, and the group accepts that for a table. It does not accept losing bookings already made.

Phase 4

Take orders and run the kitchen

Produces orders with courses and allergy flags at the price and recipe sold, courses fired by rule or by hand, a ticket per kitchen station, and bump and recall. It leaves voids, closing and the visit test for Phase 5.

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

The order is the spine of a visit. The guest bought a dish at a price, and nothing the group does afterwards may change what was bought. A price changed at 17:55 is the price at 18:00. A recipe revised at 19:00 changes nothing about the plates sold at 18:30. An order that follows the menu as it is today rewrites a check the guest has already seen.

The kitchen has its own view of the same visit. A ticket on the grill display has a life of its own: a cook bumps it, recalls it, or sees it on a second display. The order and the kitchen may disagree for a while, and that is fine. A recall that sends the next course a second time puts two entrees in front of a table that wanted one.

A guest who declared an allergy orders, and the flag has to reach the cook. If it does not, the wrong plate leaves the kitchen and the group learns about it from the table. Servers also keep taking orders when booking and menu editing are stopped, and a double tap on a tablet is routine on a Friday that must not place an order twice or fire a course twice.

Phase 5

Correct and close a check

Produces voids and comps that name the manager who approved them, a closed check with the right total, and a visit test that kills the product at random moments. It leaves taking money for Phase 8.

Implementation

Implementation

Testing

Architectural walkthrough

A manager approves voids and comps at the till today and nothing records who. When the owner later finds a gap, nobody can say which line, which manager or why. A correction that edits the line instead of sitting beside it hides what happened. The cost is shrinkage with no name against it and a manager nobody can question.

A check is read by a guest at the table. A void, or a recall on the kitchen side, must not change a check that has already been printed. A server printing the check while a recall changes it underneath hands the guest a total that is wrong by the time they read it.

A line voided after its course was fired is waste, because the plate was cooked. Counted as nothing, it hides food cost. Counted twice, it makes the stock figure wrong.

A process killed in the middle of service must not lose an order or a course, and must not make either twice. This Phase ends with the first test that kills the product on purpose during a scripted dinner.

Phase 6

Sell the last portion once

Produces ingredient stock that follows the cooking, waste, limited dishes sold from portions given to each seller, and a sold-out dish that comes off sale everywhere within 10 seconds. It leaves deliveries and counts for Phase 7.

Research

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

The group keeps two kinds of stock, and they fail differently. Flour is counted in grams and may read below zero until someone counts, because nobody stops selling bread over a figure. Eight dishes are limited, with a fixed number of portions a day, for example 12 lamb shoulders. A portion is a promise to a guest, and an order the group accepts has to be cookable.

The last portion is the dangerous one. Two terminals and the delivery platform each have a guest in front of them and one portion left. If each reads the same count and sells, the lamb is sold twice. On the group's last bad Friday, three tables waited on one dish, and the server found out when the kitchen said so.

Making every sale ask stock first has its own cost. A terminal that cannot reach stock either stops selling or guesses. The group chose its trade: turn a guest away before selling a dish twice, and let each seller keep selling the portions it was given earlier while cut off, for at most 30 minutes.

A terminal that dies holding portions must not let them be sold a second time. A dish that sells out must come off sale on every terminal and on the platform within 10 seconds, or the next guest orders it. A dish voided after the kitchen cooked it is gone, and stock has to say so.

Phase 7

Receive deliveries and match invoices

Produces purchase orders as documents, deliveries recorded by lot, invoice matching with a price tolerance, stock counts, and food costed at the price actually paid. It leaves recall tracing and fridge logs for Phase 13.

Implementation

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

One purchase leaves three documents: the order the group sent, the delivery that arrived and the invoice the supplier billed, and they disagree. A supplier delivers 18,000 grams against an order of 20,000 and invoices 20,000. Paying the invoice because the order existed pays for grams that never arrived.

Stock has to rise by what arrived, not by what was ordered. A figure raised by the order is wrong from the first short delivery, and nobody notices until a count. A count is how the group admits the figure was wrong, and it must leave the history readable rather than rewriting it.

Suppliers send documents in the wrong order. An invoice can arrive before its delivery, and a delivery can be sent twice. A product that raises stock twice, or rejects the invoice for good because it came early, overpays or loses a bill.

A kitchen cannot know which lot went into which plate. The group accepts that and uses lots oldest first, which is an approximation, and takes the cost of a dish from the price actually paid. The cost of a wrong approximation is a food cost the owner trusts and should not.

Phase 8

Take payments and split bills

Produces card and cash payments against a closed check, splits that settle once, tips taken with the card payment, refunds approved by a named manager, drawer counts and the no-show fee. Staff pay-outs and offline card limits wait for later Phases.

Implementation

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

The card processor is an outsider, and the group does not control what it does. It can take a guest's money and then fail to answer for 10 seconds. You write the processor simulator yourself, and it behaves as this Phase describes.

A payment that is retried after silence can charge the guest twice. A product killed after the processor took the money and before it noted the answer leaves nobody knowing what was charged, and the guest finds out from the bank statement. Both cost the client a refund, a phone call and a guest who does not come back.

A split bill adds a second failure. Two terminals asking for the last 5,600 cents of an 18,600 cent check at the same moment can both be told yes, and a declined part can leave a check that looks paid and is not. A check that never settles blocks the day close, and a check that settles short is money the group never collected.

A tip travels inside the captured amount, so a tip entered wrongly can only be corrected by moving the money twice, and staff are short of that tip until it is. A refund that changes the payment it reverses makes the drawer and the card batch disagree with each other at close.

Phase 9

Schedule staff and pool tips

Produces rosters that obey the rest rules, shift swaps, clock-in and clock-out with labour cost, pooled tip shares and a test that runs with other capabilities stopped. It computes no pay and no premium rates.

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

Rest rules have to hold at the moment of every change. A cook who finishes at 01:00 and is swapped into a shift at 11:00 has had 10 hours of rest, and the manager who made the swap did not do the sum. The damage comes from the third swap of the week, when nobody is looking at the whole roster. It costs the group a tired cook and a breach of its own house policy: 11 hours between shifts, a 30-minute break on a shift longer than 5 hours 30 minutes, and at most 48 hours in a roster week net of breaks.

Clocks make the arithmetic wrong on two nights a year. On the night the clocks go forward, 11 hours on the wall clock is 10 hours of rest. A shift worked across the night they go back is 540 minutes, not 480. A shift belongs to the business day it started on, even when it ends after the 04:00 cutoff.

The third problem is tips: the shares for a night must add up to the pool to the cent, and staff compare their shares. A share that is a cent out, or a tip refunded after the shares were given, starts an argument the manager cannot settle from the records.

Staff scheduling also has to keep working on a Friday when booking or card payments are stopped. A rota that cannot be changed because another capability is down is worse than the spreadsheet it replaced.

Phase 10

Take online orders

Produces online orders from the delivery platform, received once, accepted or rejected against live availability inside the platform's 3 minutes, a platform menu kept in step within 10 seconds, missed orders found, and the platform's settlement reconciled. Working while cut off from the cloud waits for the next Phase.

Implementation

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

The delivery platform is an outsider with its own rules. The platform in this brief gives the group 3 minutes from its own creation of an order to accept it (real platforms allow about 10, so the short window is the simulator's, chosen to make the deadline bite), keeps showing a dish until told otherwise, and never waits for the group to check stock. You write the platform simulator yourself, with its own field names and its own way of writing money, and it behaves as this Phase describes.

The platform sends the same order twice, loses an order, and delivers one late. A guest can be charged by the platform for an order that never reached the group, and the group finds out when the guest phones. An order accepted twice is two meals cooked and one paid for. An order accepted after the dish ran out is a guest waiting for food nobody can make.

Deciding takes time the platform does not give. If the group can decide only when stock answers, and stock is slow or stopped, the window closes and the order is lost, or the group accepts blindly and sells a dish that is gone.

About 15% of covers are online orders, around 108 a day for the group. The platform deducts a 20% commission, so the money it pays is a figure the owner has to check. A difference of a few cents on each order adds up across 108 orders a day.

Phase 11

Keep trading without the cloud

Produces terminals that keep selling and taking cash and limited card payments while cut off from the cloud, tickets that still reach the kitchen display, a catch-up that never duplicates, and conflicts resolved by rule. The day close and the reports wait for the next Phase.

Implementation

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

On a Friday the group's cloud went down for about an hour and a half. Each terminal held only its own orders, so the grill never saw what the second terminal took. The last lamb shoulders were sold three times, and when the connection came back nobody could say which orders were duplicates.

A terminal that is cut off can only act on authority it was given in advance: portions of a limited dish handed to it earlier and good for 30 minutes, card money up to a cap of 15,000 cents a payment and 150,000 cents a terminal per outage, and any amount of cash. That bounds the loss from a wrong terminal to numbers the group chose beforehand, instead of to whatever the terminal believed.

When the connection returns, each terminal has a backlog of what happened, sent long after the fact. A backlog that arrives twice, half sent or out of order must not turn a 90-minute outage into duplicate checks and double-charged guests. Two terminals can also have made promises that cannot both hold: the same check paid on both, or a dish 86'd while one terminal was still selling it. The kitchen then fails to cook what was ordered, a guest is charged twice, and a manager reconciles the night by hand.

Phase 12

Close the day and report

Produces daily figures per site and for the group, prime cost, usage variance, the day close with the Z report and corrections for late sales, and a reconciliation of drawers and card batches. It adds no new sources of sales and does not export to accounting.

Implementation

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

A day is a business construct, 04:00 to 04:00, and the owner's figures have to follow it. A terminal's catch-up can land Friday's orders on Saturday morning, and a report grouped by calendar date makes Friday look quiet and Saturday busy. The bookkeeper uses the calendar date, the owner uses the business day, and they disagree about the same takings.

A closed day has to stay as issued. A manager signs the Z report, the end-of-day sales summary, and a sale that reaches the reports afterwards must not change it silently. The late sale is real money the report did not include, so it appears as a correction that names the Z report it corrects. A Z report that changes after it was signed is worth nothing to the person who signed it.

Closing has to wait for things people still hold: an open check, a drawer not yet counted, a person still clocked in. Closing over them issues a report that is wrong on Monday morning.

Three figures are approximations the owner should know about: food cost follows lots oldest first, usage variance is a signal and not a cause, and prime cost is measured against gross sales. A report that presents them as exact is trusted more than it should be, and the owner decides what to cook and whom to rota from it.

Phase 13

Keep the records inspectors and guests ask for

Produces fridge logs with corrective actions, tracing of a recalled lot to the dishes that used it, erasure of personal details with the books kept, and a 90-day export an inspector can read. It adds no new sales or staffing behaviour.

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

Three kinds of record are asked for by someone outside, at a moment the group does not choose. An inspector can ask for the fridge readings and for which supplier lot went into which dish. Today the answer is a binder, and a binder cannot tell an inspector which readings over the limit for their unit had no corrective action. A group that cannot answer fails the inspection, and one that answers wrongly is worse off.

A supplier recalls a lot. The group has to say which dishes could have used it, down to the portion, while the lot may still be in the walk-in. The kitchen cannot know which lot went into which plate, so the answer follows oldest-first use of lots and is an estimate that the group must say plainly it is.

A guest or a member of staff can ask to be forgotten, and house policy erases personal details 12 months after the last booking or last shift. The group still owes the books: checks, payments, shifts, tip shares and traceability stay, identified by ID. Erase too much and the books no longer add up. Erase too little and a person's name and phone number sit in places nobody remembers.

Phase 14

Operate the group through a failure Friday

Produces a way to follow one guest's visit, records that keep failing set aside without stopping trade, an update shipped to one capability during dinner, deadlines held at a full Friday's volume, and a simulated Friday with every failure at once. It adds no new client features.

Implementation

Implementation

Testing

Testing

Testing

Architectural walkthrough

The group fails in combinations. A terminal outage during dinner, a seller running out of portions, a processor that takes money and does not answer, and an update shipped at 20:00 do not arrive one at a time on a Friday. No earlier test ran them together, so none of them has shown how the group behaves when they do.

A record the product cannot process must not hold up the ones behind it. If one menu change carrying a value ordering cannot handle stops every later change, the kitchen cooks from an old menu until somebody notices. A record that fails only because the product was down for a minute is not a bad record, and it has to be processed after the restart, not thrown away.

An update during dinner must not drop the order being placed, the ticket being bumped or the payment being taken. A restaurant with a full dining room cannot wait for a quiet hour to change its software.

A full Friday's volume, about 720 covers and 108 online orders, puts every deadline under pressure at once: a sold-out dish off sale everywhere within 10 seconds, a ticket on the display within 5 seconds, a platform order decided in 3 minutes. The cost of getting it wrong is a Friday on which the owner cannot say what happened to a guest, a stalled kitchen, and an update that loses orders.

Architectural walkthrough

Who may say yes to a scarce thing

Most of the group's data records what happened and can be corrected afterwards, but a few decisions cannot wait for a correction. When two terminals and a delivery app each have a guest in front of them and one portion of lamb is left, someone has to say yes to exactly one of them, and the answer has to come while the cloud is gone.

The old setup let every seller read one shared portion count and subtract one. Two sellers read 1 at the same moment, both subtract, and the last shoulder is sold twice. A guest then waits for a dish nobody can cook, and the server finds out when the kitchen says so. Making every sale wait for a central answer has the opposite cost: a terminal without the connection either stops selling or goes back to guessing.

The group chose its trade. It would turn a guest away before it sold a dish twice, and it still wants every terminal to keep selling what it safely can while cut off. The test of that choice is the dish never selling twice when sellers race, when one of them dies holding portions, and when stock is unreachable.

Two different scarce things

The last portion and the last table each look like scarcity and each fails differently. A table given to two parties seats two groups at one table at 21:00. With booking stopped, nobody can book and the guest rings back, which the group accepts for a table and would not accept for a dish being sold in front of a guest.

Records nobody can edit

Stock in grams follows what happened and may read below zero until someone counts. A void, a comp, a refund, a count and a tip correction each leave the earlier figure in place and name the manager who approved it. When a drawer is short or a void looks odd, the investigation needs records nobody could have edited, and a record edited after the fact leaves the owner with a figure the owner cannot trust and a manager nobody can question.

The day belongs to the business

An order rung at 01:30 on Saturday belongs to Friday. A report grouped by calendar date splits Friday dinner across two days, and the owner reads a quiet Friday and a busy Saturday that never happened. The two nights a year the clocks change make the day 23 or 25 hours long, so a rule that subtracts a fixed number of hours files sales under the wrong day on exactly those nights.

A sale can also arrive after its day was closed, because a terminal syncs on Saturday morning what it rang on Friday. The Z report already printed for Friday cannot change under the manager who signed it, and the owner still needs the late sale counted.

The terminal decides alone

The terminal is the hardest case because it must act on its own authority. It may sell from the portions it was given, take card payments up to 150 EUR each and 1,500 EUR in total per outage, and keep tickets flowing to the kitchen display over the local network. It may not promise anything else. The loss from a terminal that was wrong stays bounded by numbers the group chose in advance: the portions it held and the card money a processor might decline when the backlog arrives.

A backlog that arrives twice, or half-arrives and resumes, must not create a second order. Two terminals that took payment for the same check while cut off must end with one payment and one refund. A dish the chef took off the menu while a terminal was cut off will have been sold anyway, and the kitchen has to be told.

What outsiders do to the product

The card processor can take the money and then fail to answer. A retry that charges again bills one part of a split twice and the guest phones. The delivery platform sends an order twice, loses one, and charges a guest for an order that never reached the group. A supplier's invoice arrives before the delivery it bills. Each of these is routine, and a product that treats them as errors loses money or loses trust on an ordinary evening.

Parts that stop and parts that change

A dinner service does not pause for a repair. With card payments stopped, tables still need booking, orders still need taking and the kitchen still needs its tickets. A change to one capability shipped during service must not drop the order a server is placing at that moment. A Friday with 720 covers and 108 online orders crowds the same deadlines into the same hour: 10 seconds to take a sold-out dish off sale, 5 seconds for a ticket to reach the grill, 3 minutes to accept a platform order.

Where it shows if you cut a corner

  • A dish that can sell twice fails the concurrent-sales test in Phase 6 and the failure Friday in Phase 14, where stock is stopped while a terminal needs more portions.

  • A report grouped by calendar date fails the business-day test in Phase 1 and the late-sale checks in Phase 12.

  • A void or recall that edits a record instead of leaving it fails the kitchen and check test in Phase 5, and later makes the restored reports differ from the live ones in Phase 12.

  • A processor call retried as a new charge fails the timeout-after-capture test in Phase 8, where one part of a split is charged twice.

  • A terminal backlog accepted twice fails the 90-minute outage test in Phase 11, and a capability that needs another to be running fails the stopped-capability tests in Phases 4, 9 and 14.

  • An update that interrupts an order in flight, or a day that misses the 10-second, 5-second or 3-minute deadline at full volume, fails Phase 14.