How mukesh360/rag-bot- works
DocIntel AI is a document Q&A platform with global and agent-specific knowledge spaces. Users authenticate, upload documents for indexing, then query the global RAG system or a selected agent; results include answers and sources, with chat history persisted. The graph also shows agent management, authentication, document/history storage, and the frontend. Edges follow the excerpts, SOURCE INDEX references, or README; unsampled wiring and internals are omitted where evidence is limited.
Main entry points: main.py FastAPI app · supabase_client.py Supabase client · routes.py Agent routes · rag_core.py Global RAG
Components 19
User interface
- Web interface
frontend/templates/index.html - Chat and voice
frontend/static/js/app.js
API and identity
- FastAPI app
backend/main.py - Auth routes
backend/auth/routes.py - JWT validation
backend/auth/dependencies.py - Supabase client
backend/auth/supabase_client.py - Agent routes
backend/agents/routes.py - Agent management
backend/agents/service.py - API schemas
backend/schemas.py
Knowledge and retrieval
- Agent indexing
backend/rag/document_loader.py - Global RAG
backend/rag_core.py - Vector collections
chroma_agents - Global documents
base_documents
Persistence
- Supabase database
- Chat and document storage
backend/storage.py - FAQ learning
backend/offline_learning.py
Other components
- User
- Ollama LLM
- Supabase auth
Connections 27
- User → Web interface: uses
README.md - Web interface → Chat and voice: loads
README.md - Chat and voice → FastAPI app: requests API
README.md - FastAPI app → Auth routes: mounts routes
backend/main.py - FastAPI app → Agent routes: mounts routes
backend/main.py - FastAPI app → JWT validation: protects endpoints
backend/main.py - Auth routes → Supabase client: authenticates
backend/auth/routes.py - JWT validation → Supabase client: validates token
backend/auth/dependencies.py - Agent routes → JWT validation: checks user
backend/agents/routes.py - Agent routes → Agent management: manages agents
backend/agents/routes.py - Agent management → Supabase client: uses admin client
backend/agents/service.py - Agent routes → Agent indexing: indexes and queries
backend/agents/routes.py - Agent indexing → Vector collections: stores and searches
README.md - FastAPI app → Global RAG: queries and configures
backend/main.py - Global RAG → Global documents: indexes at startup
README.md - Global RAG → Vector collections: retrieves context
README.md - Global RAG → Ollama LLM: generates answers
README.md - FastAPI app → Chat and document storage: reads and writes history
backend/main.py - Chat and document storage → Supabase client: uses admin client
backend/storage.py - Chat and document storage → Supabase database: persists records
backend/storage.py - Agent management → Supabase database: stores agent metadata
backend/agents/service.py - FAQ learning → Supabase database: reads chats, writes FAQs
backend/offline_learning.py - Auth routes → API schemas: uses models
backend/auth/routes.py - Agent routes → API schemas: uses models
backend/agents/routes.py - FastAPI app → API schemas: uses models
backend/main.py - Supabase client → Supabase auth: creates auth client
backend/auth/supabase_client.py - Supabase client → Supabase database: creates admin client
backend/auth/supabase_client.py