How nxd010/shelfies works
Shelfies is a React and Flask inventory-management product: users scan product images, review detection results and updated stock, then browse inventory and analytics. The frontend’s scan page sends images through its API client; the backend runs detection, updates product counts and scan history, and persists records. The dashboard and database views use the frontend product cache and API. The README documents webcam scanning and 294 product classes; the sampled scan page shows image upload, but not webcam capture. Backend routing and configuration details not present in excerpts are represented only where the README or SOURCE INDEX supports them.
Main entry points: app.py Flask API and workflows · productDatabase.js Product cache · App.jsx App navigation · Dashboard.jsx Inventory dashboard
Components 17
Inventory interface
- App navigation
frontend/src/App.jsx - Product scanning
frontend/src/pages/Scanning.jsx - Inventory dashboard
frontend/src/pages/Dashboard.jsx - Category chart
frontend/src/components/CategoryChart.jsx - Recent products
frontend/src/components/ProductList.jsx - Inventory browser
frontend/src/pages/Database.jsx - Navigation sidebar
frontend/src/components/Sidebar.jsx
Client data
- Product cache
frontend/src/utils/productDatabase.js - API client
frontend/src/utils/api.js
Detection and API
- Flask API and workflows
backend/app.py - Backend configuration
backend/config.py - Class categorization
backend/utils.py - YOLOv8 detector
backend/models/best.pt
Inventory persistence
- Product records
backend/models.py - Scan history records
backend/models.py - SQLite inventory store
Other components
- Inventory user
Connections 23
- Inventory user → App navigation: uses
README.md - App navigation → Navigation sidebar: renders
frontend/src/App.jsx - App navigation → Product scanning: routes to
frontend/src/App.jsx - App navigation → Inventory dashboard: routes to
frontend/src/App.jsx - App navigation → Inventory browser: routes to
frontend/src/App.jsx - Product scanning → API client: submits image
frontend/src/pages/Scanning.jsx - Product scanning → Product cache: refreshes
frontend/src/pages/Scanning.jsx - Inventory dashboard → API client: loads stats
frontend/src/pages/Dashboard.jsx - Inventory dashboard → Product cache: reads products
frontend/src/pages/Dashboard.jsx - Inventory dashboard → Category chart: renders
frontend/src/pages/Dashboard.jsx - Inventory dashboard → Recent products: renders
frontend/src/pages/Dashboard.jsx - Category chart → Product cache: subscribes to
frontend/src/components/CategoryChart.jsx - Recent products → Product cache: subscribes to
frontend/src/components/ProductList.jsx - Inventory browser → Product cache: reads products
frontend/src/pages/Database.jsx - Product cache → API client: fetches products
frontend/src/utils/productDatabase.js - API client → Flask API and workflows: HTTP requests
README.md - Flask API and workflows → Backend configuration: loads settings
backend/app.py - Flask API and workflows → YOLOv8 detector: runs detection
README.md - Flask API and workflows → Class categorization: maps classes
backend/app.py - Flask API and workflows → Product records: queries and updates
backend/app.py - Flask API and workflows → Scan history records: records scans
backend/app.py - Product records → SQLite inventory store: persists inventory
README.md - Scan history records → SQLite inventory store: persists history
README.md