How mrzues/wings-theory works
Wings Theory is a restaurant inventory and POS backend. A cashier submits an order through the HTTP API; recipe expansion calculates ingredient needs, reservation holds stock, and kitchen start commits deductions to the ledger. The backend also supports receiving and expiry-aware stock, unlimited-dining sessions and reconciliation, verification queues, forecasting, anomaly detection, and association analysis. The README documents spreadsheet normalization and seeding as the route to initialize the operational data. The graph emphasizes documented flows and indexed module references; unsampled route details are not inferred.
Main entry points: api.py HTTP API · reservation.py Order Reservation · seed.py Spreadsheet Seeding · unli.py Unlimited Reconciliation
Components 18
POS Operations
- Recipe Expansion
backend/wt/resolver.py - Order Reservation
backend/wt/reservation.py - Unlimited Reconciliation
backend/wt/unli.py - Unlimited Refills
backend/wt/refills.py
Inventory Data
- Unit Conversion
backend/wt/units.py - Ingredient Mapping
backend/wt/mapping.py - Recipe Gapfill
backend/wt/gapfill.py - Spreadsheet Seeding
backend/wt/seed.py - Raw CSV Import
backend/wt/raw_import.py
Analysis & Controls
- Verification Queue
backend/wt/verification.py - Forecasting
backend/wt/forecasting.py - Anomaly Detection
backend/wt/anomaly.py - Association Rules
backend/wt/associations.py
API & Persistence
- HTTP API
backend/wt/api.py - SQLite Database
backend/wt/db.py - Role Authorization
backend/wt/auth.py
Other components
- Cashier
- Kitchen
Connections 21
- Cashier → HTTP API: submits orders
README.md - HTTP API → Recipe Expansion: resolves recipes
backend/wt/api.py - HTTP API → Order Reservation: reserves stock
backend/wt/api.py - Kitchen → HTTP API: starts orders
backend/wt/api.py - HTTP API → Order Reservation: commits deductions
backend/wt/api.py - HTTP API → Unlimited Refills: handles refills
backend/wt/api.py - HTTP API → Unlimited Reconciliation: routes reconciliation
backend/wt/api.py - Order Reservation → Recipe Expansion: expands needs
backend/wt/reservation.py - Order Reservation → SQLite Database: writes ledger
README.md - Unlimited Refills → Order Reservation: uses stock logic
backend/wt/refills.py - Unlimited Reconciliation → Order Reservation: corrects stock
backend/wt/unli.py - HTTP API → Role Authorization: checks capabilities
backend/wt/api.py - HTTP API → Verification Queue: serves verification
backend/wt/api.py - HTTP API → Forecasting: exposes forecasts
backend/wt/api.py - HTTP API → Anomaly Detection: exposes anomalies
backend/wt/api.py - HTTP API → Association Rules: exposes analysis
backend/wt/api.py - Spreadsheet Seeding → SQLite Database: loads data
README.md - Spreadsheet Seeding → Ingredient Mapping: uses aliases
backend/wt/seed.py - Spreadsheet Seeding → Recipe Gapfill: fills recipe gaps
backend/wt/seed.py - Spreadsheet Seeding → Unit Conversion: parses quantities
backend/wt/seed.py - Raw CSV Import → Unit Conversion: normalizes quantities