How ajay-shekhawat-1/personal-rag works
Personal RAG is a document-grounded question-answering application. Users add PDF/DOCX files or website URLs, which the API extracts, chunks, embeds, and stores in Qdrant; they can manage indexed sources, search them, or ask questions answered by Groq using retrieved context. The frontend separates knowledge management from chat. The excerpts show the upload, search, and model-service flow, but the chat route and chat component were not excerpted, so some chat links remain unverified.
Main entry points: documents.py Document routes · api.js API client · chat.py Chat route · search.py Search route
Components 18
Web interface
- App navigation
frontend/src/App.jsx - Knowledge page
frontend/src/pages/KnowledgePage.jsx - Upload sources
frontend/src/components/UploadDocument.jsx - Document list
frontend/src/components/DocumentList.jsx - Chat page
frontend/src/pages/ChatPage.jsx - Chat interface
frontend/src/components/Chat.jsx - API client
frontend/src/services/api.js
API routes
- FastAPI app
backend/app/main.py - Document routes
backend/app/routes/documents.py - Search route
backend/app/routes/search.py - Chat route
backend/app/routes/chat.py
Knowledge ingestion
- Text extraction
backend/app/services/document_service.py - Text chunking
backend/app/services/chunking_service.py
Retrieval and answers
- Embedding service
backend/app/services/embedding_service.py - Vector store
backend/app/services/qdrant_service.py - Answer generation
backend/app/services/llm_service.py
Other components
- User
- Groq model API
Connections 26
- User → App navigation: uses
frontend/src/App.jsx - App navigation → Knowledge page: shows
frontend/src/App.jsx - App navigation → Chat page: shows
frontend/src/App.jsx - Knowledge page → Upload sources: renders
frontend/src/pages/KnowledgePage.jsx - Knowledge page → Document list: renders
frontend/src/pages/KnowledgePage.jsx - Chat page → Chat interface: renders
frontend/src/pages/ChatPage.jsx - Upload sources → API client: calls
frontend/src/components/UploadDocument.jsx - Document list → API client: calls
frontend/src/components/DocumentList.jsx - Chat interface → API client: calls
- API client → Document routes: HTTP requests
frontend/src/services/api.js - API client → Search route: HTTP requests
frontend/src/services/api.js - API client → Chat route: HTTP requests
frontend/src/services/api.js - FastAPI app → Document routes: registers
backend/app/main.py - FastAPI app → Search route: registers
backend/app/main.py - FastAPI app → Chat route: registers
backend/app/main.py - Document routes → Text extraction: extracts text
backend/app/routes/documents.py - Document routes → Text chunking: chunks text
backend/app/routes/documents.py - Document routes → Embedding service: creates vectors
backend/app/routes/documents.py - Document routes → Vector store: stores and lists
backend/app/routes/documents.py - Text extraction → Groq model API
- Search route → Embedding service: embeds query
backend/app/routes/search.py - Search route → Vector store: searches chunks
backend/app/routes/search.py - Chat route → Embedding service: embeds query
backend/app/routes/chat.py - Chat route → Vector store: retrieves context
backend/app/routes/chat.py - Chat route → Answer generation: generates answer
backend/app/routes/chat.py - Answer generation → Groq model API: requests completion
backend/app/services/llm_service.py