# Ghost Kitchen A web app for ordering food that is physically prepared by automated cooking hardware — no human staff cooks the food. ## Language **Ghost Kitchen**: A food-ordering venue with no human kitchen staff. Orders placed through the web app trigger automated cooking hardware on-site to prepare the food. _Avoid_: Dark kitchen, cloud kitchen (these terms conventionally mean staffed, delivery-only kitchens — a different concept from this project's fully automated model) **Kitchen**: One physical location: a single deployment with its own server, its own database, one Brand, and its own set of cooking machines. Kitchens do not share a server or database with each other. _Avoid_: Store, location (as a separate multi-tenant concept — this project has no cross-kitchen data layer) **Brand**: The single restaurant concept (menu, name, branding) served by one Kitchen. One Brand per Kitchen — not a separate entity shared across multiple kitchens. **Order**: A customer's placed, paid request, containing one or more Order Items. An Order is complete once every Order Item within it has reached a terminal state — picked up or cancelled. (A fully-cancelled Order is still "complete": there is no separate status for that outcome.) **Charge**: The single payment transaction covering an Order's full total, created once at placement time. Can be partially refunded multiple times over the Order's life — once per Order Item that gets cancelled — rather than each Order Item carrying its own separate payment. _Avoid_: Payment (too generic — this project always means one Charge per Order, not a collection of per-item payments) **Order Item**: A single menu item within an Order. Progresses through its own Preparation Steps independently of the other items in the same Order, and can be picked up separately from them. Cancellable with refund any time its current Preparation Step has not yet been claimed by a Machine — including the gap between one Step finishing and the next Step being claimed. Locked as soon as a Step is claimed by a Machine (in progress). Separately, the Kitchen itself can cancel an Order Item at any point before it's ready (e.g. a Machine fault), even mid-Step, also with a refund. _Avoid_: Line item (implies a billing-only concept; this also carries preparation/pickup state) **Guest Access Token**: A bearer credential issued to a guest customer (one without an account) at Order placement time. Since a guest has no session, this token is the only proof of ownership accepted on later calls against that Order (status lookup, cancellation, pickup). _Avoid_: Session (guests never get a session; this is a different, bearer-credential mechanism) **Recipe**: The ordered list of Preparation Steps required to prepare a Menu Item. A Menu Item's Recipe can be edited later by an operator; an Order Item freezes a copy of the Recipe at the moment it's ordered, so a later Recipe edit never reshapes a Step list a customer already paid for. **Preparation Step**: One stage of preparing an Order Item, requiring a Machine carrying a specific Machine Tag, with an estimated duration. An Order Item consists of one or more Steps performed in sequence — the next Step cannot begin until the previous one finishes. The customer can see their Order Item's full Step list, current queue position, and approximate time to completion. _Avoid_: Stage (use Step consistently) **Delay**: Extra time a Machine reports on top of a claimed Preparation Step's estimated duration. Delays add to the Order Item's time to completion; the customer only sees the updated time, never a delay notice. **Machine**: A physical cooking hardware unit at a Kitchen (e.g. an oven, a grill), carrying one or more Machine Tags. A Kitchen may have multiple Machines carrying the same Tag, working in parallel. **Machine Tag**: A capability label on a Machine (e.g. "oven", "grill", "assembly") describing which Preparation Steps it's able to perform. **Queue**: The set of Preparation Steps awaiting a Machine carrying a given Machine Tag, ordered by turn. When such a Machine becomes idle, it takes the next eligible Step from that Tag's Queue. **Pickup Box**: A numbered locker at a Kitchen that a ready Order Item is placed in for the customer to collect. Each ready Order Item gets the lowest-numbered free box; if none is free, it waits for the next one to free up. The customer opens the box from their Order and closes it again after taking the item out — closing the box is what marks the Order Item picked up and frees the box. _Avoid_: Counter, shelf (the box is a lockable compartment the customer operates themselves) **Operator**: The human role attached to a Kitchen, responsible only for physically restocking ingredients and repairing machines. Never involved in cooking or fulfilling orders.