Use Cases - mdabcevic/mk2 GitHub Wiki
Here a mix of business and technical information will be given on how apps intended usage.
Guest Table Scan Flow
Scenario 1: Guest finds an empty table, sits down, scans code. No passkey needed, access is directly granted. Scenario 2: Guest meets a friend at already occupied table, scans code. Needs to type in passkey displayed on friends' device for access.
Guest
|
|-- Scan QR code --> Bartender API (QR can be replaced easily)
|
|-- Check if table is empty and valid
| |--> If yes, start new guest session
| |--> If occupied, validate passphrase
|-- Return digital menu and actions, token-bound session
Once session is successfuly created, a series of actions are displayed for interacting with staff and place:
- Display menu
- Place an order
- Request staff assistance
Tech Flow:
graph TD
GUEST[Guest Phone] -->|Scan QR| API
API --> SESSION[GuestSessionService]
SESSION --> TABLE[TableService]
TABLE --> MENU[Return Menu]
Guest Places Order
graph TD
Menu -->|Add Items| OrderForm
OrderForm -->|Submit| OrderService
OrderService -->|Validate| MenuItemAndTable
OrderService -->|Store| PostgreSQL
OrderService -->|Notify| SignalR
SignalR --> StaffTablet
Staff Accepts Order & Monitors Table
Staff Dashboard
|
|-- View incoming orders --> Confirm / Discard
|-- Change table status (e.g. set to 'occupied')
|-- Receive real-time pings from Redis/SignalR
Full Guest Journey: Scan → Order → Pay
graph TD
QR[Scan QR Code] --> API
API --> Session[Validate and Start Guest Session]
Session --> Menu[Display Digital Menu]
Menu --> OrderItems[Select Items]
OrderItems --> OrderService[Submit Order]
OrderService --> Notify[Notify Staff via Redis/SignalR]
OrderService --> Status[Order Status Tracked]
Status --> Pay[Request Bill]
Pay --> Checkout[Cash or Card]
Manager/Admin Flow: Daily Operations
graph TD
Manager -->|Login| Dashboard
Dashboard --> StaffMgt[Manage Staff Roles]
Dashboard --> TableSetup[Configure Tables]
Dashboard --> Menus[Edit Menu Items]
Dashboard --> Analytics[View Table/Order Trends]
Dashboard --> Subscriptions[Manage Tier & Settings]