How rahul5977/studybot works
StudyBuddy AI turns uploaded study documents into searchable context for AI tutoring and related learning tools. The main flow runs from the learner through the React interface and API to document processing or chat orchestration, then returns answers and learning outputs. The README also describes plans, flashcards, web search, and progress analytics; some branches are documented but their implementations were not sampled, so only evidenced connections are drawn. Backend code excerpts are partial, limiting visibility into some processing and agent interactions.
Main entry points: Home.jsx Study Workspace · routes_chat.py Chat Routes · conductor.py Conductor Agent · simple_rag.py Simple RAG
Components 26
Study Interface
- Study Workspace
frontend/src/pages/Home.jsx - Document Upload
frontend/src/components/UploadForm.jsx - Tutor Chat
frontend/src/components/ChatBox.jsx - Plan Editor
frontend/src/components/PlanEditor.jsx - Workflow View
frontend/src/components/StepsVisualizer.jsx - Progress Dashboard
frontend/src/components/Dashboard.jsx - Flashcard Review
frontend/src/components/Flashcards.jsx - API Client
frontend/src/utils/api.js
API Routes
- Document Routes
backend/app/api/routes_docs.py - Chat Routes
backend/app/api/routes_chat.py - Plan Routes
backend/app/api/routes_plan.py - Flashcard Routes
backend/app/api/routes_flashcards.py
Learning AI
- Conductor Agent
backend/app/agents/conductor.py - Tutor Agent
backend/app/agents/tutor.py - Planner Agent
backend/app/agents/planner.py - Web Search Agent
backend/app/agents/search_agent.py - Flashcard Agent
backend/app/agents/flashcards.py
Document Knowledge
- Simple RAG
backend/app/services/simple_rag.py - Document Chunking
backend/app/agents/chunker.py - Embedding Service
backend/app/core/embeddings.py
State and Integrations
- Qdrant Vector Store
backend/app/core/db.py - Application Settings
backend/app/core/config.py - Interaction Logger
backend/app/core/logger.py
Other components
- Learner
- OpenAI API
- Tavily Search
Connections 37
- Learner → Study Workspace: uses
- Study Workspace → Document Upload: shows
frontend/src/pages/Home.jsx - Study Workspace → Tutor Chat: shows
frontend/src/pages/Home.jsx - Study Workspace → Progress Dashboard: shows
frontend/src/pages/Home.jsx - Study Workspace → Flashcard Review: shows
frontend/src/pages/Home.jsx - Study Workspace → Workflow View: shows
frontend/src/pages/Home.jsx - Study Workspace → Plan Editor: shows
frontend/src/pages/Home.jsx - Study Workspace → API Client: requests plans
frontend/src/pages/Home.jsx - Document Upload → API Client: uploads files
- Tutor Chat → API Client: sends chat
frontend/src/components/ChatBox.jsx - API Client → Document Routes: calls document API
frontend/src/utils/api.js - API Client → Chat Routes: calls chat API
frontend/src/utils/api.js - API Client → Plan Routes: calls plan API
frontend/src/utils/api.js - Document Routes → Document Chunking: chunks documents
backend/app/api/routes_docs.py - Document Routes → Embedding Service: creates embeddings
backend/app/api/routes_docs.py - Document Routes → Qdrant Vector Store: stores chunks
backend/app/api/routes_docs.py - Chat Routes → Conductor Agent: orchestrates query
backend/app/api/routes_chat.py - Chat Routes → Simple RAG: processes simple RAG
backend/app/api/routes_chat.py - Chat Routes → Tutor Agent: enhances answer
backend/app/api/routes_chat.py - Chat Routes → Flashcard Agent: generates cards
backend/app/api/routes_chat.py - Chat Routes → Interaction Logger: logs interaction
backend/app/api/routes_chat.py - Plan Routes → Conductor Agent: creates plan
backend/app/api/routes_plan.py - Plan Routes → Planner Agent: refines plan
backend/app/api/routes_plan.py - Flashcard Routes → Flashcard Agent: handles cards
backend/app/api/routes_flashcards.py - Conductor Agent → Planner Agent: delegates planning
backend/app/agents/conductor.py - Conductor Agent → Web Search Agent: delegates search
backend/app/agents/conductor.py - Conductor Agent → Simple RAG: retrieves context
backend/app/agents/conductor.py - Simple RAG → Embedding Service: embeds query
backend/app/services/simple_rag.py - Simple RAG → Qdrant Vector Store: queries chunks
backend/app/services/simple_rag.py - Simple RAG → OpenAI API: generates response
- Embedding Service → OpenAI API: creates vectors
backend/app/core/embeddings.py - Web Search Agent → Tavily Search: searches web
- Conductor Agent → OpenAI API: uses language model
- Study Workspace → Plan Editor: renders plans
frontend/src/pages/Home.jsx - Study Workspace → Workflow View: renders steps
frontend/src/pages/Home.jsx - Simple RAG → Application Settings: reads limits
backend/app/services/simple_rag.py - Embedding Service → Application Settings: reads credentials
backend/app/core/embeddings.py