A Next.js app for Retrieval-Augmented Generation (RAG) using OpenAI, Qdrant, and LangChain. Index and query data from PDFs, websites, and text.
- Upload and index PDFs, CSVs, and text files
- Index website content and remote PDFs
- Store embeddings in Qdrant (via Docker)
- Chat interface powered by OpenAI (GPT-4o-mini, GPT-4.1-mini)
- Context-aware answers based on your uploaded sources
- Modern UI with Tailwind, Radix, and Lucide icons
- Theme support (light/dark)
Watch the demo on YouTube: https://youtu.be/Zi-qxFximXI
app/
api/ # REST endpoints for chat, file/text/website storage, source listing/deletion
components/ # UI components (chat window, file upload, etc.)
lib/ # Utility functions, text splitting, store logic
public/ # Static assets (SVGs, favicon, screenshots)
uploads/ # Uploaded files (created at runtime)
scripts/ # Utility scripts (e.g., test-qdrant.cjs)
- Start Qdrant (vector DB) via Docker:
docker-compose up -d
- Install dependencies:
npm install
- Run the development server:
npm run dev
- Open http://localhost:3000
POST /api/chat— Ask questions, get context-aware answersPOST /api/store-file— Upload and index files (PDF, CSV, TXT)POST /api/store-text— Store raw textPOST /api/store-website— Index website or remote PDFGET /api/list-sources— List indexed sourcesPOST /api/delete-source— Delete a source by ID
- Next.js, React, TypeScript
- LangChain, OpenAI, Qdrant
- Tailwind CSS, Radix UI, Lucide Icons
- Docker (Qdrant)

