How nachiket-mr360/vyapermitra_ai works
VyaparMitra is a voice-first shop assistant with a web dashboard for kirana and grocery owners. The main voice workflow captures speech, transcribes it, parses an intent, then requires confirmation before executing a mutation; the UI also supports product, sales, inventory, analytics, planner, and memory workflows. The graph preserves these documented product areas and the SQLite business-data layer. Relationships are limited to those evidenced by excerpts, the source index, or the README; unsampled route and service wiring is not asserted.
Main entry points: App.tsx App navigation · useVoiceSession.ts Voice session · routes HTTP routes · client.ts API client
Components 30
Shop interface
- App navigation
frontend/src/App.tsx - Sales workspace
frontend/src/components/sales/SalesPage.tsx - Dashboard
frontend/src/components/dashboard/HomeDashboard.tsx - Planner UI
frontend/src/components/Planner.tsx - Inventory view
frontend/src/components/inventory/InventoryPage.tsx - Insights view
frontend/src/components/insights/InsightsPage.tsx - Settings
frontend/src/components/settings/SettingsPage.tsx - API client
frontend/src/api/client.ts
Voice interaction
- Voice overlay
frontend/src/components/voice/VoiceOverlay.tsx - Voice session
frontend/src/hooks/useVoiceSession.ts - Audio capture
frontend/src/audio/vad.ts - Speech playback
frontend/src/audio/ttsSession.ts - Voice API
frontend/src/api/voice.ts - Prisma STT
backend/gnani/stt.py
Intent processing
- Intent API
frontend/src/api/intent.ts - Intent parser
backend/intents/parser.py - Intent executor
backend/intents/executor.py - Gemini interpreter
backend/llm/gemini.py
Shop operations
- Product catalog
backend/services/products.py - Sales lifecycle
backend/services/sale_lifecycle.py - Stock management
backend/services/stock.py - Planner service
backend/services/planner.py - Analytics
backend/services/analytics.py - Shop memory
backend/services/memory.py - Catalog matching
backend/catalog.py
Backend platform
- HTTP routes
backend/routes - Flask application
backend/app.py - Shop database
backend/db.py
Other components
- Shop owner
- Gnani service
Connections 35
- Shop owner → App navigation: uses
frontend/src/App.tsx - App navigation → Dashboard: shows
frontend/src/App.tsx - App navigation → Sales workspace: shows
frontend/src/App.tsx - App navigation → Planner UI: shows
frontend/src/App.tsx - App navigation → Inventory view: shows
frontend/src/App.tsx - App navigation → Insights view: shows
frontend/src/App.tsx - App navigation → Settings: shows
frontend/src/App.tsx - App navigation → Voice overlay: opens
frontend/src/App.tsx - Voice overlay → Voice session: uses
frontend/src/components/voice/VoiceOverlay.tsx - Voice session → Audio capture: captures
frontend/src/hooks/useVoiceSession.ts - Voice session → Voice API: requests speech
frontend/src/hooks/useVoiceSession.ts - Voice session → Intent API: submits transcript
frontend/src/hooks/useVoiceSession.ts - Voice session → Speech playback: plays speech
frontend/src/hooks/useVoiceSession.ts - Voice API → API client: sends requests
- Intent API → API client: sends requests
- Intent API → HTTP routes: calls intent endpoints
- Voice API → HTTP routes: calls voice endpoints
- Prisma STT → Gnani service: requests transcription
- HTTP routes → Flask application: registered by
backend/app.py - HTTP routes → Intent parser: dispatches intent
- HTTP routes → Intent executor: confirms intent
backend/routes/sales.py - Intent parser → Catalog matching: matches products
backend/intents/ops_parser.py - Intent executor → Sales lifecycle: executes mutations
- Intent executor → Planner service: executes reminders
- Intent executor → Shop memory: executes memory actions
- Product catalog → Shop database: reads and writes
backend/services/products.py - Sales lifecycle → Shop database: reads and writes
backend/services/sale_lifecycle.py - Stock management → Shop database: reads and writes
backend/services/stock.py - Planner service → Shop database: reads and writes
backend/services/planner.py - Product catalog → Stock management: delegates stock changes
backend/services/products.py - Sales lifecycle → Stock management: applies returns
backend/services/sale_lifecycle.py - Dashboard → API client: fetches data
frontend/src/components/dashboard/HomeDashboard.tsx - Planner UI → API client: fetches data
frontend/src/components/Planner.tsx - Sales workspace → API client: sends requests
frontend/src/components/sales/SalesPage.tsx - Gemini interpreter → Gnani service: interprets with Gemini