How maulikgupta27/studymate-ai works
StudyMate AI is a multi-user PDF study assistant. Users authenticate, upload PDFs for per-session indexing, then ask questions and receive answers grounded in retrieved pages with citations; document listing, deletion, caching, and persistent memory support that workflow. The graph separates the React interface, API orchestration, document indexing, and answer retrieval. The README documents major capabilities, while some route and retrieval implementation details are only partially excerpted; uncertain internal links are omitted.
Components 18
Study interface
- App orchestration
frontend/src/App.jsx - Passcode screen
frontend/src/components/LockScreen.jsx - PDF uploader
frontend/src/components/UploadPdfSection.jsx - Document list
frontend/src/components/UploadedPdfList.jsx - Question interface
frontend/src/components/AskQuestionSection.jsx - Session header
frontend/src/components/Header.jsx
API and sessions
- API client
frontend/src/api.js - FastAPI application
backend/app/main.py - API routes
backend/app/routes.py - Request schemas
backend/app/schemas.py - Runtime settings
backend/app/config.py
PDF indexing
- PDF ingestion
backend/app/services/indexing.py - ChromaDB vectors
Grounded answers
- Search and citations
backend/app/services/retrieval.py - Memory and cache
backend/app/services/memory.py - OpenAI models
- Mem0 memory service
Other components
- Student
Connections 24
- Student → Passcode screen: enters passcode
frontend/src/components/LockScreen.jsx - Passcode screen → API client: verifies passcode
frontend/src/components/LockScreen.jsx - App orchestration → Passcode screen: renders when locked
frontend/src/App.jsx - App orchestration → Session header: renders
frontend/src/App.jsx - App orchestration → PDF uploader: renders
frontend/src/App.jsx - App orchestration → Document list: renders
frontend/src/App.jsx - App orchestration → Question interface: renders
frontend/src/App.jsx - App orchestration → API client: requests API
frontend/src/App.jsx - PDF uploader → App orchestration: submits files
frontend/src/components/UploadPdfSection.jsx - Question interface → App orchestration: submits questions
frontend/src/App.jsx - Document list → App orchestration: requests actions
frontend/src/App.jsx - API client → FastAPI application: sends HTTP requests
README.md - FastAPI application → API routes: mounts routes
backend/app/main.py - API routes → Request schemas: validates payloads
backend/app/routes.py - API routes → PDF ingestion: indexes uploads
backend/app/routes.py - PDF ingestion → ChromaDB vectors: stores embeddings
backend/app/services/indexing.py - API routes → Search and citations: runs search and Q&A
backend/app/routes.py - Search and citations → ChromaDB vectors: searches vectors
README.md - Search and citations → Memory and cache: checks and records
backend/app/services/retrieval.py - Search and citations → OpenAI models: generates answers
backend/app/services/retrieval.py - Memory and cache → Mem0 memory service: reads and stores memories
backend/app/services/memory.py - API routes → Memory and cache: clears user data
backend/app/routes.py - Runtime settings → PDF ingestion: sets limits and store
backend/app/services/indexing.py - Runtime settings → Search and citations: sets model and store
backend/app/services/retrieval.py