How thevj0000/supportpilot-ai works
SupportPilot is a multi-tenant customer-support platform: business users manage workspaces and knowledge, while customers ask questions through the hosted chat or an embedded widget. Knowledge is uploaded, processed and indexed; chat retrieves workspace-scoped evidence, generates a grounded response, rebuilds trusted citations and persists the conversation. Separate operations support feedback, human handoff, escalation triage and admin lifecycle controls. The graph emphasizes these product paths and the retrieval/generation layer. Relationships are based on the README, excerpts and SOURCE INDEX references; unsampled implementations and integrations are not treated as inspected.
Main entry points: main.py FastAPI application · chat/service.py Customer chat service · rag/service.py Knowledge retrieval · answering.py Grounded answering
Components 23
Web experiences
- Business console
frontend/src/App.tsx - Customer chat
frontend/src/pages/CustomerChatPage.tsx - Embeddable widget
frontend/public/supportpilot-widget.js - Knowledge manager
frontend/src/knowledge/useKnowledgeSources.ts - Operations dashboard
frontend/src/admin
Support workflows
- Knowledge processing
backend/app/knowledge/service.py - Customer chat service
backend/app/chat/service.py - Escalation triage
backend/app/escalations/service.py - Notifications
backend/app/notifications/service.py - Admin operations
backend/app/admin/gateway.py
AI and retrieval
- Knowledge retrieval
backend/app/rag/service.py - Grounded answering
backend/app/rag/answering.py - Embedding provider
backend/app/ai/embeddings/base.py - Structured generation
backend/app/ai/generation/base.py - RAG evaluation
backend/evals/rag/deterministic.py
Platform services
- FastAPI application
backend/app/main.py - Workspace authorization
backend/app/auth/dependencies.py - Knowledge storage
backend/app/knowledge/gateway.py - Conversation storage
backend/app/chat/gateway.py - Vector retrieval gateway
backend/app/rag/gateway.py
Other components
- Customer / admin
- Google Gemini
- Supabase platform
Connections 31
- Customer / admin → Business console: uses
README.md - Customer / admin → Customer chat: asks support
README.md - Embeddable widget → Customer chat: embeds chat
README.md - Business console → Knowledge manager: manages knowledge
frontend/src/App.tsx - Business console → Operations dashboard: opens operations
frontend/src/App.tsx - Customer chat → FastAPI application: sends chat requests
README.md - Knowledge manager → FastAPI application: manages sources
README.md - Operations dashboard → FastAPI application: loads operations
README.md - FastAPI application → Workspace authorization: routes protected access
- FastAPI application → Customer chat service: routes chat
- FastAPI application → Knowledge processing: routes processing
- FastAPI application → Admin operations: routes admin
- Knowledge processing → Knowledge storage: reads and writes
backend/app/knowledge/service.py - Customer chat service → Conversation storage: persists turns
backend/app/chat/service.py - Customer chat service → Knowledge retrieval: requests evidence
backend/app/chat/service.py - Customer chat service → Grounded answering: grounds response
backend/app/chat/service.py - Knowledge retrieval → Embedding provider: embeds query
backend/app/rag/service.py - Knowledge retrieval → Vector retrieval gateway: searches vectors
backend/app/rag/service.py - Grounded answering → Knowledge retrieval: retrieves evidence
backend/app/rag/answering.py - Grounded answering → Structured generation: generates decision
backend/app/rag/answering.py - Structured generation → Google Gemini: calls provider
README.md - Embedding provider → Google Gemini: calls provider
README.md - Customer chat service → Escalation triage: requests handoff
README.md - Escalation triage → Notifications: notifies teams
- Escalation triage → Google Gemini: triages conversation
README.md - Admin operations → Supabase platform: manages records
README.md - Knowledge storage → Supabase platform: stores knowledge
README.md - Conversation storage → Supabase platform: stores conversations
README.md - Vector retrieval gateway → Supabase platform: queries pgvector
README.md - RAG evaluation → Knowledge retrieval: evaluates retrieval
backend/evals/rag/hosted.py - RAG evaluation → Grounded answering: measures answers