KRISH MAURYA — FOLIO ©2026
0
[CS /06] Case study — ©2025SELECTED WORK (03)

PDF-RAG

A fullstack RAG system for uploading PDFs and querying them with natural language using vector search, background processing, and LLMs.

ROLEFull-stack · solo build
TIMELINE2025
CORE STACKNext.js · Express · Qdrant · Redis · LangChain
STATUSIn Progress
[01] OverviewTHE SHORT VERSION

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.

TypeScriptNext.jsReactExpress.jsLangChainQdrantBullMQRedisDocker ComposeGemini / OpenAI
krishmaurya.dev/pdf-rag06 / 03
pdf-rag — intelligent document Q&A
PDF-RAG — app preview

PDF-RAG

Next.js frontend · Express backend · Qdrant · BullMQ
[02] ApproachHOW IT GOT BUILT

Built in four moves.

STEP 01

Asynchronous ingestion pipeline

PDF processing and indexing run through BullMQ + Redis so uploads remain responsive and scalable.

STEP 02

Semantic retrieval with vectors

LangChain chunking + embeddings store document meaning in Qdrant for fast similarity-based context lookup.

STEP 03

Grounded answer generation

LLM responses are generated from retrieved chunks with deduplicated source citations and page references.

STEP 04

Production-ready deployment

Docker Compose orchestrates frontend, API, worker, Redis, and Qdrant for repeatable local/production setup.

[03] Key featuresSHIPPED & WORKING

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.

[04] Under the hood$ tree ./pdf-rag

How it fits together.

krish@dev — zsh — 80×24
krish@dev ~ % tree ./pdf-rag --depth 1
●./Pdf-Rag
●├── client/ Next.js 16 frontend · UI · upload/search flows
●├── server/ Express API · LangChain · worker logic
●│ ├── server.ts REST endpoints and orchestration
●│ └── worker.ts PDF chunking and vector indexing jobs
●├── docker-compose.yml Redis + Qdrant + API + Frontend
●└── .env.example Environment and provider configuration
KEY DECISIONSDECISIONS.md
  • 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.