Wenlan
Wenlan is a source-backed AI knowledge base and LLM wiki for AI work: organize documents and decisions into pages you can find, inspect, and review.
翻訳待ち
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full 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.
This is the beginning of the README. Read the rest at the original. Read the full README ↗