An AI-powered PDF chatbot that allows you to have conversations with your PDF documents. Upload a PDF and ask questions about its content using natural language.
- 📄 Upload and process PDF documents
- 🤖 AI-powered chat interface
- 🔍 Intelligent document search and retrieval
- 💬 Natural language conversations about document content
- 🎨 Modern, responsive UI built with Next.js and Tailwind CSS
- ⚡ Fast and efficient document processing
- LangChain - AI framework for document processing
- LangGraph - Workflow orchestration
- TypeScript - Type-safe development
- ChromaDB - Vector database for document embeddings
- OpenAI - Language model integration
- Next.js 14 - React framework
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component library
- React Hook Form - Form handling
- Node.js 18+
- Yarn package manager
- OpenAI API key
- Clone the repository:
git clone https://github.com/ishanavasthi/ChatWithPDF.git
cd ChatWithPDF- Install dependencies:
yarn install- Set up environment variables:
Backend (.env):
cp backend/.env.example backend/.envAdd your OpenAI API key and other required environment variables.
Frontend (.env.local):
cp frontend/.env.example frontend/.env.local- Start the development servers:
# Start both frontend and backend
yarn devOr start them separately:
# Backend (from backend directory)
cd backend && yarn dev
# Frontend (from frontend directory)
cd frontend && yarn dev- Open your browser and navigate to
http://localhost:3000 - Upload a PDF document using the upload interface
- Wait for the document to be processed and indexed
- Start asking questions about your document in the chat interface
- The AI will provide answers based on the content of your PDF
ChatWithPDF/
├── backend/ # Backend API and AI processing
│ ├── src/
│ │ ├── ingestion_graph/ # Document processing workflows
│ │ ├── retrieval_graph/ # Question answering workflows
│ │ └── shared/ # Shared utilities
│ └── test_docs/ # Sample documents for testing
├── frontend/ # Next.js frontend application
│ ├── app/ # App router pages
│ ├── components/ # Reusable UI components
│ └── lib/ # Utility functions
└── scripts/ # Build and utility scripts
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Ishan Avasthi - GitHub
⭐ If you found this project helpful, please give it a star!