How arpitkanani/rag-project_docmind works
DocuVortex is a document- and YouTube-aware RAG workspace. Users authenticate, upload files or submit video URLs, then query the resulting collections in persistent chat sessions; the backend retrieves context and returns grounded answers with citations. The graph preserves the documented ingestion, agentic query, authentication, collection, and session capabilities. Some routes and graph nodes are unsampled, so only README- or index-supported connections are shown; optional provider links are marked unverified.
Main entry points: app.py FastAPI application · ingestion_pipeline.py Ingestion pipeline · memory_manager.py Chat memory and attachments · vector_store.py Qdrant vector store
Components 30
API and Web
- Web workspace
templates/static/js/app_new.js - Web authentication
templates/static/js/auth.js - FastAPI application
app.py - Authentication routes
src/routers/auth.py - File upload routes
src/routers/upload.py - YouTube routes
src/routers/youtube.py - Query routes
src/routers/query.py - Session routes
src/routers/sessions.py - Collection routes
src/routers/collections.py
Content Ingestion
- Ingestion pipeline
src/pipelines/ingestion_pipeline.py - Document and transcript loading
src/components/document_loader.py - Text chunking
src/components/text_splitter.py - File handling
src/utils/file_helper.py - YouTube utilities
src/utils/youtube_helper.py
Agentic RAG
- RAG graph
src/graph/builder.py - Agent workflow nodes
src/graph/nodes_agentic.py - Context retrieval node
src/graph/nodes/retrieve.py - Answer generation node
src/graph/nodes/generate.py - Grounded answer and citations
src/chains/qa_chain.py - Semantic retrieval and reranking
src/components/retriever.py - RAG state schema
src/graph/state.py - Chitchat subgraph
src/graph/chitchat_subgraph.py
Identity and State
- API key and token resolver
src/auth.py - Chat memory and attachments
src/components/memory_manager.py - Session and user database access
src/database/db.py
Shared Services
- Qdrant vector store
src/components/vector_store.py - Embedding provider
src/components/embedder.py
Other components
- User or API client
- PostgreSQL
- LLM provider
Connections 36
- User or API client → Web workspace: uses workspace
- User or API client → FastAPI application: calls REST API
- Web workspace → FastAPI application: sends REST requests
- Web workspace → Web authentication: uses authentication
- FastAPI application → Authentication routes: registers
app.py - FastAPI application → File upload routes: registers
app.py - FastAPI application → YouTube routes: registers
app.py - FastAPI application → Query routes: registers
app.py - FastAPI application → Session routes: registers
app.py - FastAPI application → Collection routes: registers
app.py - Authentication routes → API key and token resolver: validates credentials
src/routers/auth.py - API key and token resolver → Session and user database access: looks up users
src/auth.py - File upload routes → Ingestion pipeline: starts ingestion
src/routers/upload.py - YouTube routes → Ingestion pipeline: starts ingestion
src/routers/youtube.py - Ingestion pipeline → Document and transcript loading: loads source
src/pipelines/ingestion_pipeline.py - Ingestion pipeline → Text chunking: chunks documents
src/pipelines/ingestion_pipeline.py - Ingestion pipeline → Qdrant vector store: adds chunks
src/pipelines/ingestion_pipeline.py - Ingestion pipeline → File handling: validates and saves files
src/pipelines/ingestion_pipeline.py - Document and transcript loading → YouTube utilities: uses URL utilities
src/components/document_loader.py - Qdrant vector store → Embedding provider: creates embeddings
src/components/vector_store.py - Query routes → RAG graph: invokes graph
src/routers/query.py - RAG graph → Agent workflow nodes: assembles workflow
src/graph/builder.py - RAG graph → RAG state schema: uses state
src/graph/builder.py - Agent workflow nodes → Context retrieval node: dispatches retrieval
src/graph/builder.py - Agent workflow nodes → Chitchat subgraph: dispatches chat
src/graph/nodes_agentic.py - Context retrieval node → Chat memory and attachments: loads history
src/graph/nodes/retrieve.py - Context retrieval node → Semantic retrieval and reranking: searches collections
src/graph/nodes/retrieve.py - Semantic retrieval and reranking → Qdrant vector store: searches vectors
src/components/retriever.py - Answer generation node → Grounded answer and citations: uses answer helpers
src/graph/nodes/generate.py - Answer generation node → Chat memory and attachments: uses chat history
src/graph/nodes/generate.py - Grounded answer and citations → LLM provider: generates responses
- Session routes → Chat memory and attachments: manages sessions
src/routers/sessions.py - Query routes → Chat memory and attachments: manages conversation
src/routers/query.py - Chat memory and attachments → Session and user database access: reads and writes messages
src/components/memory_manager.py - Session and user database access → PostgreSQL: queries
- Collection routes → Qdrant vector store: manages collections
src/routers/collections.py