1. Recipe Definition & Versioning
Map menu items to raw or prepared inventory ingredients.- Navigate to Inventory → Recipes → Click
+ Create Recipe. - Select target Menu Item (e.g. “Special Kitfo”).
- Add Ingredients and required quantities per serving:
- Kitfo Prepared Meat:
0.25 kg - Niter Kibbeh:
0.05 kg - Mitmita Spice:
0.01 kg
- Kitfo Prepared Meat:
- Click Save Recipe.
Editing recipe ingredients automatically archives the old version and deploys a new
RecipeVersion to maintain historical COGS audit accuracy.2. Asynchronous Outbox Auto-Deduction Engine
To ensure sub-second cashier checkout:- POS order completion enqueues an
ORDER_CONFIRMEDevent intoOrderOutboxEvent. - The background outbox processor executes
OrderInventoryProcess:- Resolves active recipe versions for ordered menu items.
- Allocates inventory from the terminal’s configured storage location using FIFO.
- Records
SALE_CONSUMPTIONstock movements. - Calculates real Cost of Goods Sold (COGS) and updates total profit margins.
3. Real-Time Servings Availability Projection
The projection engine calculates how many portions of a menu item can be served based on current ingredient stocks across storage locations:- If Kitfo Meat stock =
5.0 kg(recipe needs0.25 kg), max servings =20. - If Mitmita spice stock drops to
0.05 kg(recipe needs0.01 kg), max servings =5. - Projections update automatically in
MenuItemAvailabilityProjection. - If
autoManageAvailabilityis enabled on the MenuItem, items automatically toggle to SOLD OUT on waiter/guest menus when projection hits0.