PDF-RAG
A fullstack RAG system for uploading PDFs and querying them with natural language using vector search, background processing, and LLMs.
What it is.
PDF-RAG is a fullstack Retrieval-Augmented Generation platform that lets users upload PDF documents and ask grounded questions in natural language.
It combines a Next.js frontend with an Express + TypeScript backend, BullMQ background workers for ingestion, Qdrant for vector similarity search, and LLM providers (Gemini/OpenAI) for context-aware answers with citations.
Built in four moves.
Asynchronous ingestion pipeline
PDF processing and indexing run through BullMQ + Redis so uploads remain responsive and scalable.
Semantic retrieval with vectors
LangChain chunking + embeddings store document meaning in Qdrant for fast similarity-based context lookup.
Grounded answer generation
LLM responses are generated from retrieved chunks with deduplicated source citations and page references.
Production-ready deployment
Docker Compose orchestrates frontend, API, worker, Redis, and Qdrant for repeatable local/production setup.
What it does.
Secure PDF ingestion
Upload via web interface with Cloudinary support and local-storage fallback.
Background indexing
BullMQ workers process chunking and embedding asynchronously.
Vector search
Qdrant powers high-performance semantic retrieval.
RAG question answering
Answers are grounded in document context with source citations.
Flexible auth mode
Clerk authentication with graceful open dev-mode fallback.
Containerized architecture
Multi-service Docker Compose stack for consistent environments.
How it fits together.
- Next.js App Router for a modern frontend with fast iteration and clean UI composition.
- Express + TypeScript backend for predictable API structure and maintainable server logic.
- BullMQ + Redis for reliable asynchronous document processing and scaling.
- Qdrant for vector-native semantic retrieval performance.
