How mahadevan-007/voice-agent works
VocalKart takes a store owner from access request and approval through OTP verification into a LiveKit voice order, where Raj checks inventory and sends a confirmed order summary by WhatsApp. The graph includes the documented admin, bilingual ordering, pricing/schemes, and frontend call experience. Some frontend-to-backend and telephony wiring is not visible in the excerpts, so those links are omitted or marked unverified.
Main entry points: token_server.py FastAPI service · agent.py Raj voice agent · crud.py Catalog and request operations · whatsapp.py WhatsApp summary sender
Components 22
Storefront
- Access landing page
frontend/src/pages/LandingPage.tsx - Frontend app
frontend/src/App.tsx - Call experience
frontend/src/pages/CallPage.tsx - LiveKit call controls
frontend/src/components
Access and Approval
- FastAPI service
token_server.py - Admin approval panel
admin.py - OTP handling
otp.py - Approval email
email_service.py
Voice Ordering
- Raj voice agent
agent.py - Ordering instructions
prompt.py - Outbound call dispatch
call.py
Catalog and Data
- Catalog and request operations
crud.py - Inventory and request models
models.py - Database sessions
database.py - Product catalog seed
init_db.py
Order Delivery
- WhatsApp summary sender
whatsapp.py
Other components
- Store owner
- Twilio SMS
- LiveKit voice service
- PostgreSQL inventory
- Twilio WhatsApp
- Whatomate fallback
Connections 25
- Store owner → Access landing page: requests access
- Frontend app → Access landing page: renders
frontend/src/App.tsx - Access landing page → FastAPI service: polls status
frontend/src/pages/LandingPage.tsx - Store owner → Admin approval panel: reviews request
- FastAPI service → Admin approval panel: mounts router
token_server.py - FastAPI service → Catalog and request operations: manages requests
token_server.py - FastAPI service → Approval email: sends notification
token_server.py - Approval email → Admin approval panel: emails approval link
email_service.py - FastAPI service → OTP handling: generates codes
token_server.py - FastAPI service → Twilio SMS: sends OTP
- Store owner → Call experience: starts call
- Call experience → LiveKit call controls: uses controls
- Store owner → LiveKit voice service: speaks order
- Outbound call dispatch → LiveKit voice service: dispatches agent
- LiveKit voice service → Raj voice agent: runs agent
- Raj voice agent → Ordering instructions: uses instructions
agent.py - Raj voice agent → Catalog and request operations: looks up catalog
agent.py - Raj voice agent → Catalog and request operations: deducts stock
agent.py - Product catalog seed → Catalog and request operations: creates products
init_db.py - Catalog and request operations → Inventory and request models: queries models
crud.py - Inventory and request models → Database sessions: uses base
models.py - Database sessions → PostgreSQL inventory: opens sessions
- Raj voice agent → WhatsApp summary sender: sends confirmed order
agent.py - WhatsApp summary sender → Twilio WhatsApp: delivers summary
- WhatsApp summary sender → Whatomate fallback: fallback delivery