Open source · MIT licensed · v1.0

Chatbots thatknow your docs.

ChatRAG is an open-source Next.js platform for building RAG chatbots. Upload your documents, choose from 100+ models, and run the whole thing on your own infrastructure, free under the MIT license.

Get it on GitHub

Built on Next.js 16, Supabase pgvector and the Vercel AI SDK

support.acme.dev
What's our refund window for annual plans?
AI
Ask anything about your documents…
+

AI models through OpenRouter, OpenAI, Anthropic and Gemini

interface languages, from Spanish to Yoruba

$

license fees, for you or your clients

MIT

licensed, so you can fork it, rebrand it and sell what you build

01Features

From a folder of files to a chatbot people pay for.

Drop in documents, get a knowledge base

PDFs, Word, Excel, slides and images go in through the dashboard. ChatRAG parses them with LlamaCloud, chunks and embeds them, and stores them in a pgvector HNSW index, so they're searchable seconds later.

02Batteries included

The parts you'd spend months building.

03Deployment modes

One codebase, two shapes.

One knowledge base, shared by everyone

Single-tenant

Every user chats with the same documents and keeps a private chat history. The right shape for a product docs bot, a support assistant or an AI twin.

  • Set up in minutes
  • Shared documents, private chats
  • One Supabase project

A private workspace for every team

Multi-tenant

Each user or organization gets an isolated knowledge base, enforced by Supabase row-level security. Build your own NotebookLM-style SaaS on top.

  • Workspaces with roles and invites
  • Isolated documents per tenant
  • Subscription tiers and quotas
Compare the modes

Built with

Next.jsSupabaseOpenAIOpenRouterLlamaCloudMCPfal.aiReplicateStripePolarTypeScriptTailwind CSSResend
04Quick start

Running locally before your coffee cools.

You need Node.js 20.9 or newer, a free Supabase project and an OpenAI key for embeddings. Deploy to Vercel, Fly.io or any server that runs Node.

~/projects
$ git clone https://github.com/areia-ai/chatrag.git
$ cd chatrag && npm install
$ npm run configure-deployment # single or multi-tenant
$ npm run db:setup # creates the Supabase schema
$ npm run config # visual config UI on :3333
$ npm run dev # your chatbot on :3000
✓ Ready on http://localhost:3000
05FAQ

Questions, answered.

Free and open source, forever

Fork it and make it yours.