This project lets you upload PDFs, extract and structure their data, and chat with your documents using Retrieval-Augmented Generation (RAG) powered by a FastAPI backend and a modern Next.js frontend.
- Upload PDFs and extract their content
- Store and search document chunks using ChromaDB
- Query with your choice of AI model
- Modern ChatGPT-style web UI (Next.js)
- FastAPI backend for PDF processing, embedding, and chat
- Frontend: Next.js (React, TypeScript)
- Backend: FastAPI (Python)
- Vector Store: ChromaDB
- Embeddings: HuggingFace (all-MiniLM-L6-v2)
- Install dependencies:
pip install -r requirements.txt pip install fastapi uvicorn python-multipart
- Set your AI API key:
- Create a
.envfile with:API_KEY=your_api_key_here
- Create a
- Run the backend:
The backend will be available at
uvicorn backend.main:app --reload
http://localhost:8000.
- Install dependencies:
cd frontend npm install - Run the frontend:
The frontend will be available at
npm run dev
http://localhost:3000.
- Upload a PDF using the chat UI.
- Ask questions about the document in a ChatGPT-style interface.
- View answers and chat history.