81
A document chat app built with Retrieval-Augmented Generation (RAG). Upload documents, train them with AI, and chat to extract insights.
Upload documents (PDF, DOCX, TXT, MD, RTF, CSV), train them using semantic embeddings, and ask questions in natural language. The AI answers using your document content, not generic knowledge.
RAG Pipeline:
Document processing: extracts text from multiple formats
Intelligent chunking: splits text into 1000-character chunks with 20-character overlap
Vector embeddings: converts chunks into 1536-dimensional vectors using Google Gemini's embedding-001
Vector storage: stores embeddings in Supabase PostgreSQL with pgvector
Semantic search: uses cosine similarity to find relevant document sections
Contextual responses: Gemini 2.0-flash-lite generates answers from retrieved context
Architecture:
Frontend: Next.js 15 (App Router) + React 19 + TypeScript
UI: TailwindCSS 4 + shadcn/ui
Backend: Next.js API Routes + Server Actions
Database: Supabase (PostgreSQL + pgvector)
AI: Google Gemini (embeddings + chat)
Processing: LangChain text splitters
Multi-format support: PDF, DOCX, TXT, MD, RTF, CSV
Semantic search: meaning-based retrieval, not keyword matching
Conversation memory: maintains chat history
Credit system: built-in usage tracking (10 free credits)
Modern UI: glassmorphism design, dark/light mode, responsive
Privacy-first: documents stored in your Supabase instance
Type-safe: TypeScript with strict checking
Error handling: validation and error boundaries
Performance: optimized vector search with indexed queries
Scalable: stateless architecture, horizontal scaling ready
Production-ready: error handling, validation, security practices
Research: query academic papers and research documents
Documentation: interact with technical docs and manuals
Business: analyze reports, contracts, and business documents
Education: study materials and lecture notes
Personal: organize and search personal documents
Built with modern web technologies and production-ready architecture. Try it with 10 free credits.
Live Demo: docochat-rag-ai.hemantsharma.tech
Built with