An order/table management system for a casual dining restaurant that is intended to optimise the restuaurant's food-serving operations.
The real-life quantity or metric that the app attempts minimize is the time it takes from the moment the customer is seated until they are served, called the sit-to-serve time.
The core mission of the application is to manage the lifecycle of the order items.
An order item is "placed" when the customer orders a menu item, it is "ready" when the item has been prepared, and it is "served" when it is at the table (the terminal and desired end state for such an item).
An important side mission of the application is to manage the lifecycle of tables.
A table is "idle" when it is available for customers, it is "occupied" when there are people by it, "needs cleaning" when it is no longer occupied but needs cleaning, etc.
It is unclear if the design should support bookings, at this stage, in which case more states will be required.
The sit-to-serve time is composed of:
We agreed to try to solve problems in the domain, and understand that some discussions in the team will target restaurant operations, rather not just coding and fullstack development.
Considering the many variations in restaurant types and service, which are nicely explained on Wikipedia. We chose to target the casual dining (also called the sit-down restaurant) type, for being a representative of the most common type of restaurant encountered.
This assumption will simplify a lot of the design decisions and make it possible to build a relevant MVP (more on this next).
In the first phase we aim solely for an MVP (a Minimum Viable Product) meaning that anything that does not fit the core mission statement above will be dropped initially until a fully functional, but a minimal, application is achieved.
TODO: on-going discussion
TODO: who will use this application
Suggestion:
- Waiter/waitress/self-service/cashier (anyone ordering food, usually they also serve the food)
- Barista/barman/waiter (anyone serving drinks)
- Cheff (anyone making food)
- Runners (anyone picking up the food and taking it to the table)
TODO: do we need a state machine for the order itself? probably not
stateDiagram-v2
state "ITEM ORDERED" as ordered
state "ITEM IN PREPARATION" as prepared
state "ITEM READY" as ready
state "ITEM SERVED" as served
state "ITEM REJECTED" as rejected
[*] --> ordered
ordered --> rejected : station declines
rejected --> ordered : new item is ordered instead
rejected --> [*] : customer cancels item order
ordered --> prepared : station accepts
ordered --> [*] : customer cancels item order
prepared --> ready
ready --> served : runner delivers the item
served --> [*] : item is payed for
TODO: using a state diagram in markdown and later using an XSTATE library visualizer
TODO: a sequence diagram showing the steps needed to make an account