Open Source • MIT Licensed

AI-Powered Document Chat System

Upload documents, chat with AI about their content, and extract insights instantly. Powered by advanced AI models with semantic search and intelligent document processing.

Open-source document chat platform built with Next.js 15, React 19, and TypeScript. Deploy your own instance with optional billing to monetize as a SaaS.

Watch the complete demo and walkthrough

100% Free to Use
Self-Hosted
Privacy-First
No Vendor Lock-In
Use Cases

Built for Every Industry

From knowledge management to customer support, Document Chat System adapts to your needs

Knowledge Management
Build searchable knowledge bases, research libraries, and personal "second brains" with AI-powered recall
Customer Support
Train support teams with product manuals, policies, and FAQs for instant AI-powered answers
Developer Docs
Create interactive API documentation and technical guides where developers can ask questions
Legal & Compliance
Maintain regulatory documents and get instant answers about compliance requirements and policies
Education & Research
Upload textbooks, lecture notes, and research papers for AI-powered tutoring and study assistance
White-Label SaaS
Deploy as your own branded document management platform with built-in billing and multi-tenancy

And many more: HR onboarding, content creation, medical research, property management, and more

Features

Everything You Need for Document AI

A complete, production-ready platform with advanced features for document management, AI chat, vector search, multi-tenancy, and optional monetization.

Core
Multi-Provider AI Chat
Unified interface supporting OpenRouter (100+ models), OpenAI, and ImageRouter. Switch providers seamlessly with intelligent routing, streaming responses, and conversation history.
  • 100+ AI models via OpenRouter
  • OpenAI GPT-4 Turbo & GPT-3.5
  • ImageRouter for image generation
  • Streaming responses with SSE
  • Context-aware conversations
Processing
Advanced Document Processing
Intelligent extraction and processing for 5+ file formats including PDFs, Office documents, images, and more. Background processing with Inngest for scalability.
  • PDF, DOCX, TXT, MD, and images
  • Image OCR and vision AI
  • Metadata extraction & analysis
  • Batch processing with queues
  • Real-time progress tracking
Search
Vector Search & Embeddings
Semantic search powered by Pinecone or pgvector. Find relevant content across thousands of documents with AI-powered similarity matching.
  • Pinecone serverless indexes
  • PostgreSQL pgvector support
  • Hybrid search (semantic + keyword)
  • Automatic chunking & embedding
  • Namespace isolation per org
Multi-Tenant
Multi-Tenant Architecture
Enterprise-grade multi-tenancy with complete data isolation, organization management, role-based access control, and team collaboration features.
  • Organization-based isolation
  • Role-based permissions (RBAC)
  • Team member invitations
  • Per-org resource limits
  • Shared folders & documents
Infrastructure
Organization & Folder Management
Hierarchical folder structure with drag-and-drop organization, bulk operations, and intelligent document categorization.
  • Nested folder hierarchies
  • Drag-and-drop organization
  • Bulk move & copy operations
  • Smart folder suggestions
  • Folder-level permissions
Background Jobs
Background Job Processing
Scalable background processing with Inngest for document processing, embeddings, notifications, and scheduled tasks.
  • Inngest serverless functions
  • Retry logic & error handling
  • Scheduled cron jobs
  • Event-driven workflows
  • Job monitoring & logging

And Much More...

Supabase File Storage

Scalable cloud storage with CDN distribution

Redis Caching

Lightning-fast responses with Upstash Redis

Type-Safe APIs

End-to-end TypeScript with Zod validation

Real-Time Updates

Live document sync and chat streaming

Docker Ready

Production Dockerfile with optimization

Edge Optimized

Fast global delivery with edge functions

How It Works

From Upload to AI Conversation in Seconds

Our intelligent pipeline processes documents automatically and makes them instantly searchable

1. Upload Documents

Drag and drop any document - PDFs, Word documents, text files, images, and more. Organize in folders or let AI categorize them automatically.

2. AI Processing

Advanced document processors extract text, metadata, and meaning. Content is chunked, embedded, and indexed for semantic search in real-time.

3. Start Chatting

Ask questions in natural language. AI retrieves relevant content and generates accurate answers with citations to source documents.

Under the Hood
The technology powering intelligent document conversations

Document Processing

  • • Custom parsers for each file type
  • • OCR for scanned documents & images
  • • Metadata extraction & enrichment
  • • Intelligent chunking algorithms

Vector Embeddings

  • • OpenAI text-embedding-3-large
  • • Pinecone serverless indexes
  • • Semantic similarity matching
  • • Hybrid search (vector + keyword)

AI Conversation

  • • RAG (Retrieval Augmented Generation)
  • • Context window management
  • • Source attribution & citations
  • • Streaming token responses

Background Jobs

  • • Inngest event-driven functions
  • • Automatic retries & error handling
  • • Queue-based processing
  • • Real-time progress updates
Technology

Built with Modern, Production-Ready Stack

Leveraging the latest technologies for performance, scalability, and developer experience

Frontend
  • React 19
  • Next.js 15
  • TypeScript 5
  • Tailwind CSS
  • Radix UI
  • Zustand
Backend
  • Next.js API Routes
  • Prisma ORM
  • PostgreSQL
  • Clerk Auth
  • Zod Validation
  • tRPC
AI & ML
  • OpenRouter (100+ models)
  • OpenAI
  • ImageRouter
  • Pinecone
  • pgvector
  • LangChain
Infrastructure
  • Supabase
  • Upstash Redis
  • Inngest
  • Docker
  • Stripe (optional)
  • Sentry

All dependencies are actively maintained and production-proven at scale

Built-in Monetization

Turn Your Deployment into a SaaS Business

Optional Stripe integration lets you charge users for your deployment. Subscription management, usage limits, and billing are built-in and ready to go.

Billing features are 100% optional - self-host for free without any payment integration
Easy Pricing Customization
Create pricing plans via API or directly in the database, then sync with Stripe

Use Admin API

POST /api/v1/admin/pricing-plans

Or Edit Database

pricing_plans table via Prisma

Stripe Sync

Optional auto-sync with Stripe

{
  planType: "STARTER",
  displayName: "Starter Plan",
  description: "Perfect for individuals",
  monthlyPrice: 2900, // $29 in cents
  yearlyPrice: 29000, // $290 yearly (2 months free)
  currency: "usd",
  features: {
    list: [
      "3 user seats",
      "500 AI credits/month",
      "100 documents/month",
      "Priority support"
    ]
  },
  limits: {
    seats: 3,
    documentsPerMonth: 100,
    aiCreditsPerMonth: 500,
    storageGB: 10
  },
  isActive: true,
  isPopular: true,
  displayOrder: 1,
  createStripeProducts: true
}

Fully customizable limits including: seats, documentsPerMonth, aiCreditsPerMonth, storageGB, and more

Free
$0/month
  • 1 user seat
  • 50 AI credits/month
  • 100 pages/month
  • Basic support
Starter
Popular
$29/month
  • 3 user seats
  • 500 AI credits/month
  • 1,000 pages/month
  • Priority support
Professional
$99/month
  • 10 user seats
  • 2,000 AI credits/month
  • 5,000 pages/month
  • Premium support
Enterprise
Custom
  • Unlimited seats
  • Custom AI credits
  • Unlimited pages
  • 24/7 dedicated support

These are examples - fully customizable to your needs. Disable billing entirely if you just want to self-host for free.

Open Source

Free Forever, Open to Everyone

Document Chat System is MIT licensed. Use it for personal projects, commercial products, or build your own SaaS business. No restrictions, no vendor lock-in.

MIT License

Permissive license allowing commercial use, modification, and distribution

Community Driven

Active development, regular updates, and welcoming community contributions

No Vendor Lock-In

Self-host anywhere, use your own infrastructure, keep full control of your data

5+

Supported File Formats

100+

AI Models Available

99.9%

Uptime SLA

100%

Open Source

Frequently Asked Questions

What AI models can I use?

You can use any model from OpenRouter (100+ models including GPT-4, Claude, Llama, Mistral, and more),OpenAI directly (GPT-4 Turbo, GPT-3.5), or ImageRouter for image generation. The system supports switching between providers seamlessly.

Do I need to pay for AI API usage?

The platform is free and open source. Configure your AI provider API keys to enable chat features. Supports multiple AI providers including OpenRouter, OpenAI, Anthropic, and more.

Can I monetize my deployment?

Yes! The optional Stripe integration lets you create subscription plans, set usage limits, and charge users for your deployment. It's completely optional - you can also run it for free without any billing features.

How do I self-host this?

Deploy to Vercel with our automated setup script that syncs all environment variables in one command. Or use the included production-ready Dockerfile for any platform that supports Docker (AWS, GCP, Azure, DigitalOcean, Railway, Render). Full step-by-step deployment guide with automated scripts available in the README.

Ready to Transform Your Documents?

Start chatting with your documents today. Free, open source, and ready to deploy.

No credit card required • Deploy in minutes • 100% open source

Document Chat - AI-Powered Document Analysis & Intelligent Chat