{"slug": "nubase-an-open-source-back-end-deploy-layer-for-ai-written-apps", "title": "Nubase – an open-source back end/deploy layer for AI-written apps", "summary": "Nubase, an open-source AI-native backend and deploy layer, launched to let coding agents turn AI-written code into live apps in minutes. The platform bundles database, auth, storage, functions, AI gateway, memory, and cron into a single self-hostable service, enabling agents to deploy apps through MCP tools without separate hosting accounts.", "body_md": "**English** · [简体中文](/OtterMind/Nubase/blob/main/README.zh-CN.md)\n\n**Turn AI-written code into real apps.** Nubase is an open-source, AI-native backend **and deploy layer** that a coding agent drives directly — so a generated app goes live in minutes. Eight capability modules in one self-hostable service: **Database, Auth, Storage, Assets, Functions, AI Gateway, Memory, and cron**.\n\nAn agent can model the data (Database + Auth), deploy backend logic (\n\nFunctions), publish the generated frontend to a public CDN (Assets), and schedule recurring work (cron) — all through MCP tools, with no separate hosting account. Supabase-style where it makes sense (Postgres, REST, JWTs, RLS, object storage, a Studio dashboard), plus first-classMemoryand anMCPsurface built for AI coding agents.\n\nFrom your project folder, run:\n\n```\nnpx -y nubase_cli@latest install-skills\n```\n\nThat single command:\n\n- 📚 installs the\n**Nubase skills** for**both Claude Code and Codex**, - 🔌 wires up the\n**MCP server** config, and - 🔐 opens a browser to\n**authorize** and pick your project.\n\nThen:\n\n**Claude Code**— restart it in this folder, run`/mcp`\n\n, and confirm`nubase`\n\nis connected.**Codex**— it's added to`~/.codex/config.toml`\n\n; just start Codex.\n\nThis connects your agent to a Nubase instance (a hosted one, or your own — spin one up in step 2). Point the CLI at any instance with:\n\n```\nnpx -y nubase_cli@latest install-skills \\\n  --studio-url https://studio.example.com \\\n  --nubase-url https://api.example.com\n```\n\nThe all-in-one Docker image bundles **PostgreSQL + Redis + the backend + Studio**:\n\n```\ndocker run -d --name nubase \\\n  -p 9999:9999 -p 5432:5432 \\\n  -v nubase_data:/data \\\n  <your-namespace>/nubase:latest\n```\n\n**Studio**→[http://localhost:9999/studio](http://localhost:9999/studio)— create an account, create a project, click** Provision**to initialize its database.** API**→[http://localhost:9999](http://localhost:9999)(the Studio UI is bundled into the backend and served on the same port)\n\nFirst-boot secrets are generated into the\n\n`/data`\n\nvolume; keep the volume to retain your projects. For a real deployment with stable secrets, see[Self-host with Docker].\n\nYour agent can now operate Nubase directly through MCP tools — inspect schema, create tables, run SQL, manage auth & storage, **deploy edge functions, publish a frontend to the public CDN, schedule cron jobs**, and read/write durable **memory**. Try asking:\n\n\"Create a\n\n`todos`\n\ntable with RLS, deploy an edge function that returns the open count, publish a one-page UI to Assets that calls it, and remember the deployment.\"\n\nSee [Deploy an AI-generated app](/OtterMind/Nubase/blob/main/docs/deploy-ai-generated-apps.md) for the full generate → live walkthrough.\n\nThe single all-in-one image is everything you need to run Nubase on your own box — **one line, no compose file, no external services**.\n\n**Try it (auto-generated secrets, kept in the volume):**\n\n```\ndocker run -d --name nubase -p 9999:9999 -p 5432:5432 \\\n  -v nubase_data:/data <your-namespace>/nubase:latest\n```\n\n**Production (pin stable secrets so encrypted project credentials survive restarts):**\n\n```\ndocker run -d --name nubase -p 9999:9999 -p 5432:5432 \\\n  -v nubase_data:/data \\\n  -e PGRST_ENCRYPTION_MASTER_KEY=\"$(openssl rand -base64 32)\" \\\n  -e METADATA_SERVICE_ROLE_KEY=\"$(openssl rand -base64 48)\" \\\n  <your-namespace>/nubase:latest\n```\n\nEverything else is configured via environment variables — Postgres, Redis, S3/R2 storage, SMTP, OAuth, and LLM providers. See [docs/docker-all-in-one.md](/OtterMind/Nubase/blob/main/docs/docker-all-in-one.md) for the full list and a multi-architecture (`amd64`\n\n+ `arm64`\n\n) note.\n\nReplace\n\n`<your-namespace>`\n\nwith the Docker Hub namespace the image is published under.\n\nAI-native applications need more than CRUD. They need user memory, retrieval, auth, storage, database APIs, and project isolation from day one. Without that backend layer, every AI coding session produces another demo that still needs weeks of infrastructure work.\n\nSupabase is excellent, but its open-source self-hosted stack is designed around a **single** project. Nubase is built for AI teams and self-hosters who want **one Studio, one backend service, and many isolated AI projects** on their own infrastructure — with three opinionated additions:\n\n**Memory is a first-class primitive**— durable memory, entity extraction, history, and hybrid retrieval are built in, not bolted on as a separate vector-store script.**AI coding gets a real backend target**— agents create tables, call REST APIs, write memory, and inspect schema through MCP-friendly tools.** Self-hosting supports many projects**— a single control plane provisions and routes to multiple isolated project databases.\n\n**🗄️ Database**— one isolated PostgreSQL per project; a PostgREST-compatible`/rest/v1`\n\nAPI (select/filter/order/paginate/insert/update/upsert/delete); per-project JWT secrets, roles, and schema cache; Row Level Security with JWT claims.**🔐 Auth**— Supabase-style signup/login and refresh-token rotation; MFA/TOTP, OTP & magic links, anonymous sign-in; OAuth (Google / GitHub / WeChat) and SAML SSO; per-project`anon`\n\n/`authenticated`\n\n/`service_role`\n\ntokens.**📦 Storage**— S3-compatible (Cloudflare R2 / AWS S3 / MinIO); public/private buckets, signed URLs, size & MIME controls; optional S3 Vectors for large document/asset workloads.**🌐 Assets (static CDN)**— publish a generated frontend: per-project public static assets served at`/assets/v1/**`\n\nwith Cache-Control/ETag/304 semantics; per-project default cache policy and custom CDN domain; agents publish directly over MCP (`assets_upload`\n\n).**⚡ Functions**— deploy backend logic as edge functions served at`/functions/v1/**`\n\n; per-function secrets, invocation logs, rate limits,`verify_jwt`\n\n; local executor or Cloudflare Workers for Platforms; agents scaffold/deploy/invoke over MCP (`functions_deploy`\n\n).**🤖 AI Gateway**— OpenAI- and Anthropic-compatible endpoints with per-project keys and token/cost usage tracking.**🧠 Memory**— Mem0-style memory API; LLM-powered fact extraction (ADD/UPDATE/DELETE/NONE); hybrid retrieval over pgvector + Postgres full-text + entity boost; entity store and append-only history. Works with OpenAI, Anthropic, and OpenAI-compatible providers.**⏰ Scheduled Jobs (cron)**— recurring jobs that invoke an edge function or a named database function on a crontab schedule, run by the control plane with run history; managed over MCP (`cron_create`\n\n).**🧰 AI Coding & Agents**— an MCP bridge (`nubase_cli`\n\n) for schema inspection, SQL execution, RLS export, project init, and memory; one consistent project-token model across Auth, REST, Storage, and Memory.**🎛️ Studio**— a Next.js dashboard for projects, SQL (with execution history), users, storage, and the memory explorer.\n\n## Full comparison as a table (including Supabase Cloud)\n\n| Area | Supabase Cloud | Supabase self-hosted | Nubase |\n|---|---|---|---|\n| Multi-project dashboard | Yes | No (mimics one project) | Yes |\n| Project isolation | Dedicated instance | One local project | Dedicated Postgres DB per project |\n| Database API | PostgREST | PostgREST | PostgREST-compatible (Java) |\n| Auth | Yes | Yes | Supabase-style Auth |\n| Storage | Yes | Yes | S3/R2-compatible |\n| AI memory | Not a core primitive | Not a core primitive | Built-in Memory pillar |\n| AI coding backend target | General primitives | General primitives | Memory + REST + MCP + Studio |\n| Deploy a generated app | App + separate hosting/Functions/cron | Self-managed stack | Frontend (Assets) + backend (Functions) + cron, one platform |\n| Edge Functions | Yes | Available in stack | Gateway + executor (local / Cloudflare WfP) |\n| Realtime | Yes | Available in stack | Not yet |\n\nNubase has two database layers:\n\n**Metadata database**— platform users, project configs, encrypted project credentials, ownership, platform settings, SQL snippets, and execution records.**Project databases**— each project gets its own PostgreSQL database with auth tables, storage metadata, memory tables, and application tables.\n\nRequests use a two-token model: `apikey`\n\nidentifies the project + role (`anon`\n\n/ `authenticated`\n\n/ `service_role`\n\n), and `Authorization: Bearer <jwt>`\n\nidentifies the end user for RLS and memory ownership. A request filter resolves the project from the `apikey`\n\n, routes JDBC to the correct project database, and sets the request context.\n\nRequirements: Java 17, Maven, Docker, Node.js + pnpm.\n\n```\n# 1. Start Postgres (15 + pgvector)\ndocker compose -f pg-docker-compose.yml up -d\n\n# 2. Required secrets\nexport PGRST_ENCRYPTION_MASTER_KEY=\"$(openssl rand -base64 32)\"\nexport METADATA_SERVICE_ROLE_KEY=\"replace-with-a-long-random-admin-token\"\nexport OPENAI_API_KEY=\"sk-...\"   # optional, only for LLM-powered Memory\n\n# 3. Backend → http://localhost:9999\nmvn spring-boot:run\n\n# 4. Studio → http://localhost:3000\ncd frontend && pnpm install && pnpm dev:studio\n```\n\nTo build the all-in-one image yourself: `docker build -f Dockerfile.all-in-one -t nubase:local .`\n\n**Write and search memory:**\n\n```\ncurl -X POST http://localhost:9999/mem/v1/memories \\\n  -H \"apikey: $NUBASE_SERVICE_KEY\" -H \"Content-Type: application/json\" \\\n  -d '{\"userId\":\"user-42\",\"messages\":[{\"role\":\"user\",\"content\":\"I prefer steak over sushi and my dog is named Mochi.\"}]}'\n\ncurl -X POST http://localhost:9999/mem/v1/search \\\n  -H \"apikey: $NUBASE_SERVICE_KEY\" -H \"Content-Type: application/json\" \\\n  -d '{\"userId\":\"user-42\",\"query\":\"what food do they like?\"}'\n```\n\n**Use the REST API** (after creating a `todos`\n\ntable):\n\n```\ncurl \"http://localhost:9999/rest/v1/todos?select=*\" -H \"apikey: $NUBASE_ANON_KEY\"\n\ncurl -X POST \"http://localhost:9999/rest/v1/todos\" \\\n  -H \"apikey: $NUBASE_SERVICE_KEY\" -H \"Content-Type: application/json\" \\\n  -d '{\"text\":\"Ship the first open-source release\"}'\n```\n\n[Getting started](/OtterMind/Nubase/blob/main/docs/getting-started.md)[Deploy an AI-generated app (generate → live)](/OtterMind/Nubase/blob/main/docs/deploy-ai-generated-apps.md)[Connect agents (Claude / Codex / Cursor)](/OtterMind/Nubase/blob/main/docs/agent-connect.md)[MCP & agent guide](/OtterMind/Nubase/blob/main/docs/mcp.md)[Edge Functions](/OtterMind/Nubase/blob/main/docs/edge-functions.md)·[Assets (static CDN)](/OtterMind/Nubase/blob/main/docs/assets.md)·[Scheduled Jobs (cron)](/OtterMind/Nubase/blob/main/docs/scheduled-jobs.md)[nubase_cli usage](/OtterMind/Nubase/blob/main/docs/nubase-cli-usage.md)[All-in-one Docker image](/OtterMind/Nubase/blob/main/docs/docker-all-in-one.md)[Architecture](/OtterMind/Nubase/blob/main/docs/architecture.md)[Product overview](/OtterMind/Nubase/blob/main/docs/product-overview.md)[Supabase comparison](/OtterMind/Nubase/blob/main/docs/supabase-comparison.md)\n\nNubase is early-stage but all eight modules (Database, Auth, Storage, Assets, Functions, AI Gateway, Memory, cron) plus Studio and the MCP bridge are in place. Not yet implemented: **Realtime** and operational extras like backups/PITR, HA, and enterprise SSO/SCIM. Review the admin/management endpoints before exposing a server to the public internet.\n\nContributions and issues are welcome — see [CONTRIBUTING.md](/OtterMind/Nubase/blob/main/CONTRIBUTING.md) and [SECURITY.md](/OtterMind/Nubase/blob/main/SECURITY.md). This is an early public release, so feedback shapes what comes next. 🙌", "url": "https://wpnews.pro/news/nubase-an-open-source-back-end-deploy-layer-for-ai-written-apps", "canonical_source": "https://github.com/OtterMind/Nubase", "published_at": "2026-06-16 09:11:36+00:00", "updated_at": "2026-06-16 09:18:46.126935+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-infrastructure", "ai-agents"], "entities": ["Nubase", "Claude Code", "Codex", "PostgreSQL", "Redis", "Docker", "MCP"], "alternates": {"html": "https://wpnews.pro/news/nubase-an-open-source-back-end-deploy-layer-for-ai-written-apps", "markdown": "https://wpnews.pro/news/nubase-an-open-source-back-end-deploy-layer-for-ai-written-apps.md", "text": "https://wpnews.pro/news/nubase-an-open-source-back-end-deploy-layer-for-ai-written-apps.txt", "jsonld": "https://wpnews.pro/news/nubase-an-open-source-back-end-deploy-layer-for-ai-written-apps.jsonld"}}