尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Chat with your documents — grounded, cited, and honest about what it doesn't know.
DocMind AI is a multi-tenant RAG (Retrieval-Augmented Generation) SaaS. Users upload their own PDFs, Word docs, or text files, and get an instant AI chatbot that answers questions using only that content — with citations pointing back to the exact document and passage behind every claim. If the answer isn't in the uploaded documents, it says so instead of guessing.
Live demo: [add your Vercel URL here after deploying] Demo video: [add a Loom/YouTube link here]
Most "chat with your PDF" demos are a thin wrapper around a single API call with no real multi-tenancy, no verifiable citations, and no guardrails against hallucination. This project is built to look and behave like an actual product: isolated per-user workspaces enforced at the database level, streaming answers with clickable source citations, usage analytics, and a real (test-mode) billing flow with plan limits.
| Layer | Choice | Why |
|---|---|---|
| Framework | Next.js 16 (App Router) + TypeScript | Server components, API routes, and the frontend in one deployable unit |
| Styling | Tailwind CSS | Fast iteration, small bundle |
| Auth + DB | Supabase (Postgres + Auth) | Email/password + Google OAuth, Row Level Security for multi-tenancy, free tier |
| Vector search | Supabase pgvector | No separate vector database to run or pay for — cosine similarity search lives in Postgres |
| Chunking | LangChain.js (RecursiveCharacterTextSplitter) | Battle-tested chunk/overlap strategy |
| Embeddings | Google Gemini (gemini-embedding-001, pinned to 768 dims) | Free tier, 768-dim vectors |
| Chat LLM | Groq (openai/gpt-oss-120b by default, set via GROQ_MODEL) | Extremely fast streaming inference, free tier |
| Billing | Stripe (test mode) | Real checkout flow, no real charges |
| Hosting | Vercel | Zero-config Next.js deploys, free tier |
Monthly cost: $0, using each provider's free tier.
┌────────────────────────────────────────┐
│ Browser (Next.js) │
│ Landing · Auth · Dashboard · Chat UI │
└───────────────┬──────────────────────────┘
│
▼
┌────────────────────────────────────────┐
│ Next.js API Routes (Vercel) │
│ │
│ /api/upload ──► parse → chunk → embed │
│ /api/chat ──► embed Q → retrieve → │
│ stream Groq answer │
│ /api/usage, /api/documents │
│ /api/stripe/checkout, /webhook │
└───┬─────────────┬─────────────┬─────────┘
│ │ │
┌───────────▼──┐ ┌────────▼───────┐ ┌────▼──────────┐
│ Supabase │ │ Gemini API │ │ Groq API │
│ Postgres + │ │ (embeddings) │ │ (chat, LLM) │
│ pgvector + │ └────────────────┘ └───────────────┘
│ Auth + RLS │
└───────┬───────┘
│
┌───────▼───────┐
│ Stripe (test) │
│ subscriptions│
└────────────────┘
RAG pipeline, step by step:
pdf-parse / mammoth / raw text) into plain text.document_chunks.embedding (pgvector column).match_document_chunks) does a cosine-similarity search scoped to that user's rows only, returning the top 5 matches above a relevance threshold.Multi-tenancy is enforced at the database layer with Postgres Row Level
Security — every table (documents, document_chunks, chats, messages)
has policies scoping all reads/writes to auth.uid(), so one user's data is
structurally unreachable by another, not just hidden by the UI.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗