How eswarsainandan04/kelostats works
KeloStats turns dashboard requests into analytics answers and editable presentations. Its principal workflow routes chat through a LangGraph orchestrator, which classifies intent, loads database schema, verifies the request, retrieves ambiguous entities, generates and repairs read-only SQL, then synthesizes an answer or plans and renders slides. Separate product branches manage database connections and schema, ingest/search documents, and edit or export workspaces. The README documents these stages and capabilities; sampled source confirms API routing, database/schema behavior, semantic search, and workspace rendering, but not every orchestration edge.
Main entry points: orchestrator.py Workflow graph · ChatInterface.tsx Chat interface · database.py Database management · main.py FastAPI app
Components 29
Web application
- Dashboard
frontend/app/dashboard/page.tsx - Chat interface
frontend/app/dashboard/workspace/ChatInterface.tsx - API client
frontend/lib/api.ts
API and workflow
- FastAPI app
backend/main.py - Workflow graph
backend/workflow/orchestrator.py - Intent classifier
backend/Agents/query_classication_agent.py - Schema verifier
backend/Agents/query_verification_agent.py - Entity retrieval
backend/Agents/retrival_agent.py - SQL generation
backend/Agents/sql_writer_agent.py - SQL repair
backend/Agents/sql_repair_agent.py - Answer synthesis
backend/Agents/answer_generator_agent.py - Knowledge answers
backend/Agents/knowledge_answer_agent.py - Slide planning
backend/Agents/slide_planning_agent.py
Data sources
- Database management
backend/databases/database.py - Schema extraction
backend/databases/schema_extraction/extractor.py - SQL execution tools
backend/databases/tools - Document ingestion
backend/documents/document_upload.py - Document processing
backend/documents/document_processor.py - Semantic search
backend/documents/semantic_search.py
Presentation workspace
- Slide compilation
backend/Agents/ppt_generation_agent.py - Workspace management
backend/workspace/manage_workspace.py - Slide editor
backend/workspace/editor.py - Slide rendering
backend/workspace/render_ppt.py
Identity and persistence
- JWT verification
backend/auth/jwt_verifier.py
Other components
- Analyst
- LLM service
- Connected databases
- Supabase storage
- Document vector store
Connections 42
- Analyst → Dashboard: uses
- Dashboard → Chat interface: opens
- Chat interface → API client: submits query
- API client → FastAPI app: sends request
- FastAPI app → JWT verification: verifies protected requests
- FastAPI app → Workflow graph: routes workflow
- FastAPI app → Database management: routes database requests
- Workflow graph → Intent classifier: classifies intent
- Intent classifier → LLM service: requests classification
- Workflow graph → Schema extraction: loads schema
- Schema extraction → Database management: uses connection metadata
- Database management → Connected databases: connects and reads schema
- Workflow graph → Schema verifier: checks query
- Schema verifier → LLM service: requests verification
- Workflow graph → Entity retrieval: retrieves entities
- Entity retrieval → SQL execution tools: executes lookup SQL
- Workflow graph → SQL generation: generates SQL
- SQL generation → LLM service: requests SQL
- Workflow graph → SQL execution tools: executes SQL
- SQL execution tools → Connected databases: runs read-only queries
- Workflow graph → SQL repair: repairs failed SQL
- SQL repair → LLM service: requests repair
- Workflow graph → Answer synthesis: synthesizes results
- Answer synthesis → LLM service: requests answer
- Document ingestion → Document processing: processes uploads
- Document processing → Document vector store: stores document chunks
- Workflow graph → Semantic search: searches documents
- Semantic search → Document vector store: retrieves relevant chunks
- Workflow graph → Knowledge answers: answers from context
- Knowledge answers → LLM service: requests synthesis
- Workflow graph → Slide planning: plans presentation
- Slide planning → LLM service: requests slide plan
- Workflow graph → Slide compilation: compiles slides
- Slide compilation → Supabase storage: stores slide HTML
- Workspace management → Supabase storage: manages project files
- Slide editor → Supabase storage: updates slide content
- Slide rendering → Supabase storage: reads slide content
- Chat interface → Workspace management: loads presentation
- Chat interface → Slide editor: edits slides
- Chat interface → Slide rendering: requests rendering
- Dashboard → Database management: manages connections
- Database management → Schema extraction: extracts schema