$git clone https://github.com/butterbase-ai/butterbase---
| 1 | <p align="center"> |
| 2 | <img src=".github/assets/logo.png" alt="Butterbase" width="420" /> |
| 3 | </p> |
| 4 | |
| 5 | <p align="center"><strong>AI-native, open-source backend-as-a-service.</strong><br/>Postgres · Auth · Storage · Functions · AI Gateway · MCP server</p> |
| 6 | |
| 7 | <p align="center"> |
| 8 | <a href="./LICENSE"><img alt="License: Apache 2.0" src="https://img.shields.io/badge/License-Apache_2.0-blue.svg"></a> |
| 9 | <a href="https://github.com/butterbase-ai/butterbase/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/butterbase-ai/butterbase?style=social"></a> |
| 10 | <a href="https://github.com/butterbase-ai/butterbase/network/members"><img alt="GitHub forks" src="https://img.shields.io/github/forks/butterbase-ai/butterbase?style=social"></a> |
| 11 | <br/> |
| 12 | <a href="https://discord.gg/Aq7q5mqbrt"><img alt="Join Discord" src="https://img.shields.io/badge/Join-Discord-5865F2?logo=discord&logoColor=white"></a> |
| 13 | <a href="https://www.linkedin.com/company/butterbase/?trk=public_profile_following-company_profile-result-card_result-card_title"><img alt="Follow us on LinkedIn" src="https://img.shields.io/badge/Follow-LinkedIn-0A66C2?logo=linkedin&logoColor=white"></a> |
| 14 | <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white"> |
| 15 | <img alt="Postgres" src="https://img.shields.io/badge/Postgres-336791?logo=postgresql&logoColor=white"> |
| 16 | <img alt="Docker" src="https://img.shields.io/badge/Docker-2496ED?logo=docker&logoColor=white"> |
| 17 | </p> |
| 18 | |
| 19 | <p align="center"> |
| 20 | <a href="https://butterbase.ai"><strong>Website</strong></a> · |
| 21 | <a href="https://discord.gg/Aq7q5mqbrt"><strong>Discord</strong></a> · |
| 22 | <a href="https://www.linkedin.com/company/butterbase/?trk=public_profile_following-company_profile-result-card_result-card_title"><strong>LinkedIn</strong></a> · |
| 23 | <a href="./SETUP.md"><strong>Self-host</strong></a> · |
| 24 | <a href="./docs"><strong>Docs</strong></a> · |
| 25 | <a href="./ROADMAP.md"><strong>Roadmap</strong></a> · |
| 26 | <a href="./Examples"><strong>Examples</strong></a> · |
| 27 | <a href="./CONTRIBUTING.md"><strong>Contributing</strong></a> |
| 28 | </p> |
| 29 | |
| 30 | --- |
| 31 | |
| 32 | <!-- Drop a demo gif at .github/assets/demo.gif and uncomment: |
| 33 | <p align="center"><img src=".github/assets/demo.gif" alt="Butterbase demo" width="720" /></p> |
| 34 | --> |
| 35 | |
| 36 | Butterbase gives you the building blocks for AI-driven applications without lock-in: a Postgres-backed backend with row-level security, serverless functions, an LLM gateway, realtime subscriptions, key-value store, file storage, RAG, durable per-key actors, and a built-in **Model Context Protocol (MCP) server** so agents can operate your backend with tools instead of glue code. |
| 37 | |
| 38 | ## Features |
| 39 | |
| 40 | **Data** |
| 41 | - **Postgres data plane** — per-app databases with declarative schema (`/schema`), automatic REST endpoints (`/auto-api`), and migrations. |
| 42 | - **Row-Level Security** — first-class RLS policy management with user-isolation helpers (`/rls`). |
| 43 | - **Key-Value store** — regional, quota-protected KV with TTL, audit trail, and dashboard expose rules (`/v1/:app/kv/*`). *New in v0.2.0.* |
| 44 | - **File storage** — S3/R2-backed object storage with presigned URLs, ACLs, and async indexing (`/storage`). |
| 45 | |
| 46 | **Compute** |
| 47 | - **Serverless functions** — TypeScript functions executed on the Deno runtime (`/functions`). |
| 48 | - **Durable Objects** — stateful per-key actors for chat rooms, multiplayer, rate limiters, long-running agents (`/durable-objects`). |
| 49 | - **Realtime** — WebSocket subscriptions to table changes for live UIs and presence (`/realtime`). |
| 50 | - **Edge SSR** — deploy Next.js / Remix / Astro edge handlers from source (`/edge-ssr`, `/edge-ssr-from-source`). |
| 51 | - **Frontend hosting** — zip or build-from-source static / SPA deploys with custom domains (`/frontend`, `/custom-domains`). |
| 52 | |
| 53 | **AI** |
| 54 | - **AI gateway** — single endpoint for chat, embeddings, model listing; pluggable router adapters (`/gateway`, `/ai-config`). |
| 55 | - **RAG** — managed collections, document ingestion, semantic search and synthesized answers (`/rag`). |
| 56 | - **Integrations** — third-party too |