How qthai-06/smartcaffe works
SmartCafe AI is a Streamlit café-inventory application: staff sign in, inspect stock or submit a photo, review and adjust AI-detected counts, then save an inventory snapshot. The dashboard also exposes inventory history, audit records, and an advisor that estimates replenishment needs from recent snapshots. The main control and persistence relationships are visible in the excerpts and README; the advisor’s forecast calculation is implemented in its page, while the separate forecast module is only a stub. Some dashboard details are omitted from the sampled app excerpt.
Main entry points: app.py Streamlit dashboard · database.py Inventory persistence · page_inventory.py Inventory page · page_advisor.py Replenishment advisor
Components 10
Application
- Streamlit dashboard
smartcafe_ai/app.py - Login authentication
smartcafe_ai/src/auth.py
Inventory workflow
- Inventory page
smartcafe_ai/ui/page_inventory.py - YOLO recognition
smartcafe_ai/src/vision.py
History and advice
- Replenishment advisor
smartcafe_ai/ui/page_advisor.py - Reusable UI components
smartcafe_ai/ui/components.py
Persistence
- Inventory persistence
smartcafe_ai/src/database.py - SQLite inventory store
smartcafe_ai/data/db - CSV inventory file
smartcafe_ai/data/inventory.csv
Other components
- Cafe staff
Connections 11
- Cafe staff → Streamlit dashboard: uses
README.md - Streamlit dashboard → Login authentication: authenticates
smartcafe_ai/app.py - Streamlit dashboard → Inventory persistence: loads and saves
smartcafe_ai/app.py - Streamlit dashboard → Inventory page: routes to
smartcafe_ai/app.py - Streamlit dashboard → Replenishment advisor: routes to
smartcafe_ai/app.py - Inventory page → YOLO recognition: processes image
smartcafe_ai/ui/page_inventory.py - Inventory page → Inventory persistence: reads and saves
smartcafe_ai/ui/page_inventory.py - Replenishment advisor → Inventory persistence: reads history
smartcafe_ai/ui/page_advisor.py - Replenishment advisor → Reusable UI components: renders metrics
smartcafe_ai/ui/page_advisor.py - Inventory persistence → SQLite inventory store: reads and writes
smartcafe_ai/src/database.py - Inventory persistence → CSV inventory file: migrates and exports
smartcafe_ai/src/database.py