How sasikiranambati/shop-pulse works
Shelfora is an offline-first grocery-management and invoice-intelligence platform for Kirana retailers. The principal workflow is store staff recording sales or scanning supplier invoices, then managing inventory and reviewing business insights; billing can also be voice-driven. The React client communicates with a FastAPI backend, while local caching and queued mutations support offline operation and later synchronization. Invoice OCR is a distinct extraction and audit-workbook workflow. The graph combines README-documented capabilities with sampled calls; several routes and frontend feature implementations were not sampled, so their internal links are intentionally limited.
Main entry points: App.tsx Shelfora App · client.ts HTTP Client · invoice_pipeline.py Invoice Pipeline · Sales.tsx POS Billing
Components 20
Store Client
- Shelfora App
src/App.tsx - Authentication
src/context/AuthContext.tsx
Retail Operations
- POS Billing
src/pages/Sales.tsx - Voice Billing
src/components/VoiceBillModal.tsx - Inventory
src/pages/Inventory.tsx - Dashboard
src/pages/Dashboard.tsx - Demand Insights
src/pages/Insights.tsx
Invoice Intelligence
- Invoice Scanner
src/pages/InvoiceScanner.tsx - Invoice Pipeline
backend/services/grocery_ocr/pipeline/invoice_pipeline.py - OCR Engine
backend/services/grocery_ocr/engines/ocr_engine.py - AI Interpretation
backend/services/grocery_ocr/ai/service.py - Audit Workbooks
backend/services/grocery_ocr/excel/storage_manager.py
API and Data
- HTTP Client
src/api/client.ts - REST Routes
backend/api/routes - Route Registry
backend/api/main.py - Retail Database
backend/db/session.py
Offline and Devices
- Offline Queue and Sync
src/services/syncService.ts - Scale and Counter
src/services/scaleService.ts
Other components
- Store Staff
- AI Providers
Connections 24
- Store Staff → Shelfora App: uses
README.md - Shelfora App → Authentication: provides session
src/App.tsx - Shelfora App → POS Billing: routes to
src/App.tsx - Shelfora App → Inventory: routes to
src/App.tsx - Shelfora App → Dashboard: routes to
src/App.tsx - Shelfora App → Demand Insights: routes to
src/App.tsx - Shelfora App → Invoice Scanner: routes to
src/App.tsx - POS Billing → HTTP Client: records sales
- POS Billing → Offline Queue and Sync: queues mutations
- Voice Billing → HTTP Client: submits voice bill
- Inventory → HTTP Client: updates stock
- Dashboard → HTTP Client: requests metrics
- Demand Insights → HTTP Client: requests forecasts
- Invoice Scanner → HTTP Client: uploads invoice
README.md - HTTP Client → REST Routes: calls
README.md - Route Registry → REST Routes: registers
backend/api/main.py - REST Routes → Invoice Pipeline: dispatches invoice
README.md - Invoice Pipeline → OCR Engine: recognizes pages
backend/services/grocery_ocr/pipeline/invoice_pipeline.py - Invoice Pipeline → AI Interpretation: interprets items
backend/services/grocery_ocr/pipeline/invoice_pipeline.py - Invoice Pipeline → Audit Workbooks: stores workbook
backend/services/grocery_ocr/pipeline/invoice_pipeline.py - Invoice Pipeline → Retail Database: avoids database writes
backend/services/grocery_ocr/pipeline/invoice_pipeline.py - AI Interpretation → AI Providers: uses provider
backend/services/grocery_ocr/ai/service.py - Offline Queue and Sync → HTTP Client: syncs mutations
README.md - Store Staff → Scale and Counter: weighs goods
README.md