How adlinef06/brainbuddy-ai works
BrainBuddy AI is a study assistant whose main user workflows are general Q&A, personalized study planning and quizzes, and Drive-backed book Q&A. A separate agent API coordinates planning, research, checking, and persistent memory. The graph separates React screens and API transport from FastAPI route handling and backend services. Some route implementations and services are only partly sampled; those links are included only where excerpts, the SOURCE INDEX, or the README support them.
Main entry points: App.jsx App and routing · main.py FastAPI application · groq_service.py Groq chat service · api.js API client
Components 23
Study assistant UI
- App and routing
frontend/src/App.jsx - Navigation
frontend/src/components/Sidebar.jsx - Home
frontend/src/pages/Home.jsx - General Q&A screen
frontend/src/pages/AskQuestion.jsx - Study plan and quizzes
frontend/src/pages/StudyPlan.jsx - Book Q&A screen
frontend/src/pages/BookQA.jsx - API client
frontend/src/api.js
Backend API
- FastAPI application
backend/main.py - General Q&A route
backend/main.py - Study plan route
backend/main.py - Quiz and progress routes
backend/main.py - Book Q&A routes
backend/main.py - Agent workflow route
backend/main.py
AI and study services
- Groq chat service
backend/app/services/groq_service.py - LangGraph agents
backend/app/services/agent_graph_service.py - Book indexing and retrieval
backend/app/services/book_service.py - Drive book access
backend/app/services/drive_service.py - Text processing
backend/app/services/text_utils.py
External services and storage
- ChromaDB store
backend/app/services/vector_store.py - MySQL study and quiz store
backend/app/services/mysql_store.py
Other components
- Student
- Groq LLM
- Google Drive
Connections 29
- Student → App and routing: uses
README.md - App and routing → Navigation: renders
frontend/src/App.jsx - App and routing → Home: routes to
frontend/src/App.jsx - App and routing → General Q&A screen: routes to
frontend/src/App.jsx - App and routing → Study plan and quizzes: routes to
frontend/src/App.jsx - App and routing → Book Q&A screen: routes to
frontend/src/App.jsx - General Q&A screen → API client: calls
frontend/src/pages/AskQuestion.jsx - Study plan and quizzes → API client: calls
frontend/src/pages/StudyPlan.jsx - Book Q&A screen → API client: calls
frontend/src/pages/BookQA.jsx - API client → FastAPI application: sends API requests
frontend/src/api.js - FastAPI application → General Q&A route: handles
backend/main.py - FastAPI application → Study plan route: handles
backend/main.py - FastAPI application → Quiz and progress routes: handles
backend/main.py - FastAPI application → Book Q&A routes: handles
backend/main.py - FastAPI application → Agent workflow route: handles
README.md - General Q&A route → Groq chat service: calls
backend/main.py - Study plan route → Groq chat service: calls
backend/main.py - Book Q&A routes → Book indexing and retrieval: searches books
backend/main.py - Book Q&A routes → Groq chat service: generates answers
backend/main.py - Book Q&A routes → Drive book access: lists and reads books
backend/main.py - Agent workflow route → LangGraph agents: runs workflow
README.md - Quiz and progress routes → MySQL study and quiz store: stores quiz attempts
backend/main.py - Quiz and progress routes → ChromaDB store: stores completed topics
backend/main.py - LangGraph agents → Groq chat service: requests agent output
backend/app/services/agent_graph_service.py - LangGraph agents → ChromaDB store: reads and saves memory
backend/app/services/agent_graph_service.py - Book indexing and retrieval → ChromaDB store: indexes and searches
backend/app/services/book_service.py - Book indexing and retrieval → Text processing: cleans and chunks
backend/app/services/book_service.py - Drive book access → Google Drive: lists and downloads
backend/app/services/drive_service.py - Groq chat service → Groq LLM: invokes model
backend/app/services/groq_service.py