You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is an AI-powered web application that lets users upload PDF documents and have intelligent conversations with them.
Ask questions in plain English, get instant accurate answers with exact page references.
The Problem:
Humans waste millions of hours every day searching through documents for information that takes seconds to find the text.
Finding specific information inside large documents is slow, painful, and extremely inefficient.
We all deal with large documents every day.
Student | 500 page textbook | Exam tomorrow. Cannot find specific topic. Reads for hours.
Employee | 800 page company handbook | Simple policy question. HR is busy. Waits 2 days for reply.
Researcher | 50 research papers | Needs specific methodology. Reads every paper manually. Takes weeks.
Doctor | Medical literature | Needs specific drug interaction info. Cannot search by meaning.
The Solution:
Upload any PDF document.
Ask any questions.
Get the exact answer in seconds.
With the exact page number it came from.
Screenshots
Login Page
Sidebar Page
Chat Page
History Page
Tech Stack
Frontend
Technology
Purpose
React.js
User interface
Tailwind CSS
Styling
Axios
API calls
React Router
Navigation
Backend
Technology
Purpose
Node.js
Runtime environment
Express.js
Web framework
MongoDB
Main database
Mongoose
MongoDB
Passport.js
Google OAuth
JWT
Authentication tokens
Multer
File upload handling
pdf-parse
PDF text extraction
AI & Search
Technology
Purpose
Google Gemini API
Text embeddings (gemini-embedding-001)
Groq API
LLM answer generation (llama-3.3-70b-versatile)
Pinecone
Vector database (semantic search)
DevOps
Technology
Purpose
Git + GitHub
Version control
Vercel
Frontend deployment
Render
Backend deployment
MongoDB Atlas
Cloud database
Features
Currently Built ✅
Google OAuth Authentication (Sign in with Google)
PDF Document Upload (up to 10MB)
PDF Text Extraction
RAG Pipeline (Retrieval Augmented Generation)
Google Gemini Embeddings (gemini-embedding-001)
Pinecone Vector Database (semantic search)
Groq AI Answer Generation (llama-3.3-70b-versatile)
Top-K Retrieval (K=4 most relevant chunks)
Query Cleaning and Validation
Context Window Management
Real-time Streaming Responses (word by word)
Page References (every answer cites exact page)
Chat History (persists after logout)
Multiple Document Management
Duplicate Document Prevention
Conversation Delete
Document Delete (clears vectors too)
Toast Notifications
Chat History Awareness (last 6 messages)
Error Handling (empty PDF, no chunks, irrelevant questions)
Architecture:
RAG Pipeline
UPLOAD PHASE (once per document):
PDF Upload
→ Extract Text (pdf-parse)
→ Split into Chunks (1000 chars, 200 overlap)
→ Generate Embeddings (Google Gemini)
→ Store in Pinecone with metadata (page numbers)
QUESTION PHASE (every question):
User Question
→ Clean Query
→ Generate Question Embedding (Gemini)
→ Search Pinecone → Top 4 Similar Chunks
→ Format Context with Page Numbers
→ Add Chat History
→ Stream to Groq AI (llama-3.3-70b-versatile)
→ Stream Response to Frontend (SSE)
→ Save to MongoDB
Prerequisites
Node.js v22+
MongoDB Atlas account
Google Cloud Console account
Groq API account (free)
Google AI Studio account (free, for Gemini)
Pinecone account (free)
# Clone the repository
git clone https://github.com/kaushiki-tripathi/ChatDocs.git
# Go to backend foldercd ChatDocs/backend
# Install dependencies
npm install
# Create .env file and add your credentials# Start development server
npm run dev
# Go to frontend folder (in a new terminal)cd ../frontend
# Install dependencies
npm install
# Start frontend
npm run dev
An AI-powered web application that lets users upload PDF documents and have intelligent conversations with them. Ask questions and get instant accurate answers with page references.