How feohuman/squishcart works
Mega is a grocery-shopping and inventory application with a Streamlit interface and a FastAPI service. The user workflow spans account registration/login, product browsing and administration, basket management, and QR-based scanning and checkout. The API persists users, products, and baskets in SQLite; a separate recommendation utility updates recipe popularity from purchase history. The README is empty, so capabilities and connections here are based on sampled source and the source index; several data-file relationships are not shown.
Main entry points: index.py Storefront UI · main.py Store API · recalg.py Recipe popularity · middleware.py Backend client
Components 15
Shopping interface
- Storefront UI
src/index.py - Backend client
src/middleware.py - QR scanner
src/scanner.py
API and domain
- Store API
src/main.py - Token and passwords
src/auth.py - Shopping objects
src/objects.py
Persistence
- Store data models
src/models.py - Database sessions
src/database.py - SQLite store
src/test.db
Recommendations
- Recipe popularity
src/recalg.py - Purchase history data
src/Marcel.json - Recipe data
src/recipes.json - Recommended recipes data
src/recommendations.Marcel.json
Other components
- Shopper or admin
- Camera
Connections 13
- Shopper or admin → Storefront UI: uses
src/index.py - Storefront UI → Backend client: calls
src/index.py - Backend client → Store API: sends requests
src/middleware.py - Storefront UI → QR scanner: starts scanning
src/index.py - QR scanner → Camera: captures frames
src/scanner.py - Storefront UI → Shopping objects: creates products
src/index.py - Store API → Token and passwords: calls
src/main.py - Store API → Store data models: queries and updates
src/main.py - Store API → Database sessions: gets engine and sessions
src/main.py - Database sessions → SQLite store: connects
src/database.py - Recipe popularity → Purchase history data: reads history
- Recipe popularity → Recipe data: updates popularity
- Recipe popularity → Recommended recipes data: writes recommendations