DocsChat
Multi-tenant AI documentation chat platform. Paste a URL, get a live AI chat widget in under 3 minutes. Live at docschatai.netlify.app.
Client
DocsChat (Khaas product)
Industry
AI SaaS / embeddable widget
Duration
4 weeks (concept to production)
DocsChat is a productised RAG chatbot widget that turns any documentation into a context-aware AI assistant. It has processed 1,000+ documents and is live and demoable at docschat.khaas.net. Teams waste hours answering questions whose answers already exist in their docs; DocsChat crawls a URL, chunks and embeds the content, retrieves with pgvector, and answers with schema-constrained Claude output — deployable as a two-line embed in under three minutes. Built solo on Supabase (pgvector), FastAPI, React/Vite, and the Anthropic Claude API, with Google Gemini embeddings on the free tier keeping per-answer cost at effectively zero. The widget is iframe-isolated so it never collides with the host page's styling.
Overview
| Field | Detail |
|---|---|
| Project | DocsChat — AI-powered documentation chat platform |
| Type | Full-stack SaaS + embeddable widget |
| Timeline | 4 weeks (concept to production) |
| Stack | FastAPI · React · Supabase · Gemini · Claude |
| Live URL | docschatai.netlify.app |
The problem
Businesses publish thousands of pages of documentation — help centres, product pages, onboarding guides, FAQs — but customers still can't find answers quickly. They open support tickets, abandon products, or leave. The knowledge is there; it just isn't accessible.
There was no turnkey solution that:
- Let a non-technical business owner point at a URL and get a live AI chat widget back
- Required zero ML knowledge to configure
- Produced a two-line embed snippet compatible with any website
The solution
DocsChat is a multi-tenant SaaS platform that turns any URL or document library into a context-aware AI chat widget — in under three minutes.
A user pastes a URL, the platform crawls and indexes the content automatically, and they get a snippet they drop into any site. No config files. No API wrangling. No AI expertise needed.
How it works
URL / Docs → Crawl → Chunk → Embed → pgvector → Claude Answer- Crawl — automated spider discovers up to 100 pages from a seed URL, respecting
robots.txt - Chunk — content split into overlapping 512-token segments to preserve context
- Embed — each chunk encoded to a 768-dimension vector via Google Gemini
text-embedding-004 - Store — vectors persisted in Supabase pgvector with cosine similarity indexing
- Answer — top-8 chunks retrieved at query time; Anthropic Claude composes a cited, grounded answer
Key features
For business owners
- No-code setup — paste a URL, wait ~2 minutes, get a widget
- Live ingestion progress — real-time SSE stream shows crawl and indexing phases
- Re-index on demand — one click refreshes the knowledge base from source
- Conversation history — all chats stored and browsable per knowledge base
- API key management — scoped keys for widget access, SHA-256 hashed at rest
For developers
- Iframe-isolated widget — zero CSS bleed, zero dependency, sandboxed
- Streaming responses — Claude answers stream token-by-token
- Chunk browser — inspect every stored chunk, word counts, and metadata
- REST API — full programmatic access to knowledge bases and chat
For agencies
- Multi-tenant — unlimited knowledge bases per account, fully isolated via RLS
- White-label ready — brand colour, position, and welcome message configurable per widget
- Anonymous trial flow — landing page lets visitors chat against any URL with no sign-up
Tech stack
| Layer | Technology | Role |
|---|---|---|
| Backend | FastAPI (Python) | REST API, SSE streaming, background tasks |
| Frontend | React + Vite + Tailwind | Dashboard, widget frame, landing page |
| Database | Supabase (PostgreSQL) | Auth, Row Level Security, vector storage |
| Vectors | pgvector (768-dim) | Cosine similarity search |
| Embeddings | Google Gemini (free tier) | text-embedding-004, 1500 RPM, €0 cost |
| AI / LLM | Anthropic Claude | claude-sonnet-4 for chat completions |
| Cache | Redis (Railway) | Rate limiting, session caching |
| Hosting | Railway + Netlify | Auto-deploy from GitHub |
| Auth | Supabase Auth | Email/password + Google OAuth, JWT |
Technical highlights
RAG pipeline with zero cold-start
Ingestion runs as a FastAPI BackgroundTask. Progress is written to an ingest_progress JSONB column in Supabase every few seconds. The frontend opens an SSE connection and streams updates live — no polling, no WebSocket overhead.
Free embeddings at scale
Google Gemini text-embedding-004 produces 768-dimension vectors on the free tier (1,500 requests/minute). Switching from OpenAI embeddings cut embedding cost to zero without sacrificing retrieval quality.
Widget CSS isolation
The embed is a sandboxed <iframe> rather than injected DOM elements. Host-page styles can't bleed in; widget styles can't leak out. Communication between host and widget happens via postMessage.
Multi-tenant security
Every database table has Row Level Security enabled. The backend uses Supabase's service role key only for background ingestion; all user-facing reads use the anon key + JWT, so users can only ever access their own data.
Results
< 3 min
URL → live chat widget
100
Pages auto-crawled per KB
< 200 ms
Vector search latency
€0 / mo
Embedding cost (Gemini)
2 lines
Embed snippet size
Email + OAuth
Auth providers
Business impact
- Enables instant self-service answers, reducing support ticket volume
- No-code setup means sales cycle is the live demo — visitors try it on the landing page before signing up
- Free embedding tier keeps margins high at small-to-medium scale
- Widget works on WordPress, Webflow, Shopify, or custom stacks — no integration work needed
- Resellable as a managed service: one-time setup fee + monthly retainer per client
Pricing (as shipped)
| Plan | Price | Limits |
|---|---|---|
| Free | €0 / mo | 1 KB, 50 pages, 100 chats/mo |
| Pro | €29 / mo | Unlimited KBs, 100 pages each, unlimited chats |
| Agency / White-Label | €3,000 setup + €200/mo | Custom domain, your branding, dedicated instance |
Built by Ojas Gangwal at Khaas. Want something similar?
Book a 30-min call →Need something like this?
Book a 30-min call. We'll scope your project together — no obligation.