[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-79391":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":15,"starSnapshotCount":15,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},79391,"butterbase-oss","butterbase-ai\u002Fbutterbase-oss","butterbase-ai","Open-source backend-as-a-service. Postgres, auth, storage, functions, AI gateway, MCP.",null,"TypeScript",1018,94,72,6,0,922,63.93,"Apache License 2.0",false,"main",[22,23,24,25,26,27,28],"baas","backend-as-a-service","mcp","open-source","postgres","supabase-alternative","typescript","2026-06-11 04:06:54","# Butterbase\n\n**AI-native, open-source backend-as-a-service.** Postgres data plane, auth, storage, functions, an AI gateway, and a built-in Model Context Protocol (MCP) server. Apache-2.0 licensed.\n\nButterbase gives you the building blocks for AI-driven applications without lock-in: spin up a Postgres-backed backend with row-level security, ship serverless functions, route LLM traffic through a single gateway, and let agents drive it all via MCP tools.\n\n## Open-source vs. managed\n\nThis repo ships the **runtime data plane**:\n\n- `services\u002Fcontrol-api` — Fastify control plane (apps, auth, storage, functions, AI gateway, RLS, migrations). Embeds the MCP server at `\u002Fmcp`.\n- `services\u002Fmcp-server` — MCP tool implementations (built into the control-api image; can also run standalone over stdio)\n- `services\u002Fdeno-runtime` — serverless function executor (included in local Docker)\n- `services\u002Fagent-runtime`, `services\u002Fbuild-runner`, `services\u002Fstorage-indexer` — used in production \u002F managed deploys; not started by the local compose file\n- `packages\u002Fsdk`, `packages\u002Fcli`, `packages\u002Fplugin`, `packages\u002Fshared` — client surfaces\n\nThe **managed offering** at [butterbase.ai](https:\u002F\u002Fbutterbase.ai) adds multi-region orchestration, billing, upstream AI router adapters, lease-based quota enforcement, and ops dashboards. Those live in a private repo that consumes this one as a submodule.\n\nWhen you self-host, the AI gateway runs without upstream router adapters, billing uses a no-op provider, and quotas are unlimited. Wire your own implementations via the `BillingProvider`, `QuotaEnforcer`, and `RouterAdapter` interfaces in `packages\u002Fshared`.\n\n## Quickstart (self-host)\n\n**Requirements:** Docker, Node 22+, npm.\n\n### 1. Clone (with submodules)\n\nThe Claude Code plugin (`packages\u002Fplugin`) is a git submodule ([butterbase-plugin](https:\u002F\u002Fgithub.com\u002FNetGPT-Inc\u002Fbutterbase-plugin)). A plain clone leaves `packages\u002Fplugin\u002F` empty and `npm install` silently skips that workspace.\n\n```bash\ngit clone --recurse-submodules https:\u002F\u002Fgithub.com\u002FNetGPT-Inc\u002Fbutterbase-oss.git\ncd butterbase-oss\n```\n\nIf you already cloned without submodules:\n\n```bash\ngit submodule update --init --recursive\n```\n\nOptional — keep submodules updated on every pull:\n\n```bash\ngit config --global submodule.recurse true\n```\n\n### 2. Install dependencies and configure env\n\n```bash\nnpm ci\ncp .env.example .env\n```\n\n`docker-compose.local.yml` sets `KV_REDIS_URL_US_EAST_1` for you. Edit `.env` only if you override defaults (e.g. run control-api on the host — use `redis:\u002F\u002Flocalhost:6379`).\n\n### 3. Start the stack\n\nFirst run builds images and can take several minutes.\n\n```bash\ndocker compose -f docker-compose.local.yml up -d\n```\n\nWait until control-api is healthy:\n\n```bash\ncurl -sf http:\u002F\u002Flocalhost:4000\u002Fhealth\u002Fready\n```\n\n### 4. Run database migrations\n\nSchema is **not** applied automatically on container start. From the repo root (with the stack running):\n\n```bash\nexport NEON_PLATFORM_PRIMARY_URL=postgresql:\u002F\u002Fbutterbase:butterbase_dev@localhost:5433\u002Fbutterbase_control\nexport NEON_RUNTIME_PROJECT_ID_US_EAST_1=postgresql:\u002F\u002Fbutterbase:butterbase_dev@localhost:5437\u002Fbutterbase_runtime_us\nexport BUTTERBASE_REGIONS=us-east-1\n\nnpm run migrate:all\n```\n\n### 5. Seed the local dev user\n\nWith `AUTH_ENABLED=false`, the API uses `DEV_OWNER_ID` from compose. That user must exist in `platform_users` (fresh volumes start empty):\n\n```bash\nexport NEON_PLATFORM_PRIMARY_URL=postgresql:\u002F\u002Fbutterbase:butterbase_dev@localhost:5433\u002Fbutterbase_control\nnpm run seed:dev\n```\n\n### 6. Smoke test\n\nAuth is disabled in the local compose profile (`AUTH_ENABLED=false`):\n\n```bash\ncurl -X POST http:\u002F\u002Flocalhost:4000\u002Finit \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"name\": \"my-app\"}'\n\ncurl http:\u002F\u002Flocalhost:4000\u002Fapps\n```\n\n### Local endpoints\n\n| Service | URL \u002F port |\n|---------|------------|\n| Control API | http:\u002F\u002Flocalhost:4000 |\n| MCP (HTTP, via control-api) | http:\u002F\u002Flocalhost:4000\u002Fmcp |\n| Deno runtime | http:\u002F\u002Flocalhost:7133 |\n| Docs site | http:\u002F\u002Flocalhost:4321 |\n| Control plane Postgres | `localhost:5433` |\n| Data plane Postgres | `localhost:5435` |\n| Runtime plane Postgres | `localhost:5437` |\n| LocalStack (S3) | http:\u002F\u002Flocalhost:4566 |\n\nFull setup (auth, MCP clients, troubleshooting, production notes): **[`SETUP.md`](.\u002FSETUP.md)**.\n\n## Architecture\n\n```\n                  ┌──────────────────────────────────┐\n                  │  Your app \u002F agent \u002F MCP client │\n                  └──────────────┬───────────────────┘\n                                 │\n                  ┌──────────────▼───────────────────┐\n                  │     control-api (Fastify)        │\n                  │  apps · auth · storage · funcs   │\n                  │  AI gateway · RLS · MCP \u002Fmcp     │\n                  └──┬─────────┬─────────┬────────┬──┘\n                     │         │         │        │\n              ┌──────▼──┐ ┌────▼────┐ ┌──▼──┐ ┌───▼────────┐\n              │ Postgres│ │ Storage │ │Redis│ │deno-runtime│\n              │ planes  │ │ (S3\u002FR2) │ │ KV  │ │ (functions)│\n              └─────────┘ └─────────┘ └─────┘ └────────────┘\n```\n\nThe control-api is the main entry point. Platform metadata lives in the control-plane DB; per-app data in the data plane; hot-path runtime tables in the runtime-plane DB (`db\u002Fcontrol-plane`, `db\u002Fruntime-plane`, `db\u002Fdata-plane` migrations).\n\n## Documentation\n\n- [`SETUP.md`](.\u002FSETUP.md) — self-host and local development guide\n- [`CONTRIBUTING.md`](.\u002FCONTRIBUTING.md) — contributor workflow and OSS scope\n- [`Examples\u002F`](.\u002FExamples) — example apps\n\n## Project status\n\nInitial open-source release (v0.1.0). The data plane is production-tested by the managed offering. Public APIs and the MCP tool surface are stabilizing; the OSS distribution is new — report self-host issues and we will tighten docs and defaults from feedback.\n\n## Contributing\n\nSee [`CONTRIBUTING.md`](.\u002FCONTRIBUTING.md). Read the scope section before PRs that touch billing, quota math, or upstream router adapters.\n\n## Security\n\nSee [`SECURITY.md`](.\u002FSECURITY.md). Report vulnerabilities to `security@butterbase.ai`.\n\n## License\n\n[Apache-2.0](.\u002FLICENSE). Copyright 2026 NetGPT Inc.\n","Butterbase 是一个开源的后端即服务（BaaS）平台，提供Postgres数据库、认证、存储、函数、AI网关和模型上下文协议（MCP）服务器等功能。项目使用TypeScript编写，支持构建基于AI的应用程序，包括行级安全的Postgres后端、无服务器函数以及通过统一网关路由大语言模型流量的能力。此外，Butterbase还内置了MCP工具，允许代理通过MCP驱动整个应用。它适合需要灵活且可自托管的后端解决方案的场景，尤其是那些希望避免供应商锁定同时利用AI功能开发应用程序的开发者或团队。",2,"2026-06-01 03:48:22","CREATED_QUERY"]