Back to projects

IntelliPDF — RAG-Powered PDF Chat Platform

IntelliPDF is a full-stack Retrieval-Augmented Generation (RAG) application that lets users upload PDFs and chat with their contents, with cited source passages behind every answer. Documents are indexed asynchronously via a Redis-backed BullMQ worker, progressing through queued, processing, embedding, and indexing stages, with live progress broadcast to the client over Socket.IO. The backend is organized into feature modules (auth, pdf-chat, users, audit) built with Node.js, Express 5, TypeScript, and Prisma, wired through a small composition root for dependency injection. PDFs are parsed and split with LangChain, embedded using Google Gemini embeddings, and stored as vectors in Qdrant, with retrieval scoped per document and filtered by similarity score. Follow-up questions are rewritten into standalone queries before retrieval, and answers stream to the client over Server-Sent Events from a Groq-hosted LLM, with citations sent ahead of the response text. The system includes a transactional outbox pattern for reliable hand-off between PostgreSQL and BullMQ, compare-and-swap refresh-token rotation, deterministic Qdrant point IDs to prevent duplicate vectors on retry, and guarded deletion flows. Authentication supports both email/password and Google OAuth, with JWT access tokens, HTTP-only refresh cookies, and role-based access control for admin and manager routes.

Tech Stack

React 19TypeScriptViteNode.jsExpress 5PrismaPostgreSQLRedisBullMQQdrantLangChainGoogle GeminiGroqSocket.IODocker ComposeTailwind CSSTanStack QueryZustand

Features

  • PDF upload with real-time indexing progress via Socket.IO
  • Background indexing pipeline: parsing, chunking, embedding, and vector storage
  • RAG-based chat with conversation-aware, standalone-question retrieval
  • Server-Sent Events streaming for chat responses with citations sent first
  • Source snippet, page metadata, and similarity score display per answer
  • Transactional outbox pattern for reliable PostgreSQL-to-BullMQ hand-off
  • Deterministic Qdrant point IDs to prevent duplicate vectors on retry
  • Email/password and Google OAuth authentication
  • JWT access tokens with HTTP-only, rotated refresh-token sessions
  • Role-based access control (admin, manager) with audit log endpoints
  • Compare-and-swap refresh-token rotation to prevent concurrent reuse
  • Dockerized local development stack via Docker Compose