Turn AI-written code into real apps — an open-source, self-hostable backend with Database, Auth, Storage, Memory, Functions, Assets, AI Gateway, and cron built for AI coding agents.
Nubase is an AI-native backend platform that closes the gap between AI-generated code and a deployed application. Where most AI coding sessions produce a demo that still requires weeks of infrastructure work, Nubase gives a coding agent — or a human developer — a single self-hostable service that provides all eight primitives a modern app needs: Database, Auth, Storage, Assets, Functions, AI Gateway, Memory, and scheduled cron jobs. Each project in Nubase gets its own isolated PostgreSQL database, JWT secret, and role system, so teams can spin up and tear down AI projects without cross-contamination.
The Memory module is Nubase’s most distinctive contribution: instead of bolting a vector store onto an existing platform, Nubase treats durable memory as a first-class pillar alongside Auth and the database. Memory entries are written through an LLM-powered fact-extraction pipeline that decides for each candidate whether to ADD, UPDATE, DELETE, or ignore it, and retrieved via a custom score-fusion algorithm that blends pgvector cosine similarity with PostgreSQL full-text BM25 rankings and optional entity boosts — closely mirroring the design of the mem0 open-source memory library but implemented natively in Java with tight transactional guarantees.
For AI coding agents specifically, Nubase exposes an MCP bridge (the nubase_cli npm package) that gives agents structured tools for inspecting schema, executing SQL, managing auth, deploying edge functions, publishing static frontends to the built-in CDN, scheduling cron jobs, and reading or writing memory — all scoped to a project token. This means an agent running inside Claude Code or Codex can build, deploy, and manage a full-stack application end to end without touching external hosting accounts. The all-in-one Docker image bundles PostgreSQL, Redis, the Spring Boot backend, and the Next.js Studio dashboard into a single container that can be production-ready in one command.
Built on Spring Boot 3.2 with a PostgREST-compatible REST layer, Supabase-style Auth (signup, MFA/TOTP, OTP, magic links, OAuth, SAML SSO), S3-compatible object storage, and a Cloudflare Workers–compatible edge function executor, Nubase targets self-hosters and AI product teams who want Supabase-grade primitives without the single-project limitation of the Supabase self-hosted stack.
/rest/v1 REST API for full CRUD and filtering/mem/v1 APIanon/authenticated/service_role roles/functions/v1/** (local executor or Cloudflare Workers for Platforms) and publish generated frontends to a per-project CDN at /assets/v1/** with Cache-Control and ETag semanticsnubase_cli exposes tools for schema inspection, SQL execution, RLS export, memory read/write, function deploy, asset publish, and cron management — letting agents operate the entire platform through MCP without any separate infrastructure accounts/mem/v1 API; Nubase extracts and deduplicates facts automatically across sessionsArchitecture
Nubase follows a modular Spring Boot monolith organized into eight vertical slices (auth, postgrest, mem, functions, assets, deploy, cron, platform) each with its own controller, service, repository, and entity layers under src/main/java/ai/nubase/. The multi-tenancy control plane lives in postgrest/multidb/ and centres on RoutingDataSource, a Spring AbstractRoutingDataSource subclass that maintains a ConcurrentHashMap of per-project HikariDataSource pools keyed by project ID from ThreadLocal context. Project database credentials are AES-encrypted at rest in the metadata database (EncryptionService). Every inbound request carries an apikey that PostgrestRequestContext resolves to a project and role before JDBC is routed to the correct per-project database — cleanly separating the metadata control plane from the isolated project data planes.
Tech Stack
The backend is Java 17 with Spring Boot 3.2 (spring-boot-starter-web, spring-boot-starter-security, spring-boot-starter-data-jpa, spring-boot-starter-data-redis). Flyway manages schema migrations; HikariCP (via Druid) handles per-project connection pools; JJWT 0.12.3 and auth0 java-jwt handle JWT signing and verification; jbcrypt covers password hashing; jsqlparser rewrites inbound PostgREST-style queries. The Memory module uses Spring AI 1.1.2 for embedding model abstraction and pgvector via native SQL. Storage talks to S3-compatible backends (AWS S3, Cloudflare R2, MinIO) using AWS SDK v2. Edge functions proxy to Deno Deploy–style local executors or Cloudflare Workers for Platforms via OkHttp3. The frontend is a Next.js (pnpm workspace) Studio dashboard. The all-in-one image is assembled with a multi-stage Dockerfile. Code formatting uses Spotless (maven plugin).
Code Quality
The test suite spans 106 test files covering unit, integration (@SpringBootTest with Spring context), and regression classes. Integration tests (*IT.java) cover Auth flows (PKCE, MFA/TOTP, magic link), PostgREST REST API, edge function invocation, cron scheduler race conditions, and memory vector serialization — using Testcontainers-style patterns against live databases. Key algorithmic classes like ScoreFusion have comprehensive pure-unit tests with boundary conditions. Spotless enforces code formatting at compile time. Error handling is explicit with typed exception handlers per module (MultiDatabaseExceptionHandler, EdgeFunctionExceptionHandler). Naming follows standard Java conventions with clear domain vocabulary.
What Makes It Unique
Nubase’s most genuinely novel characteristic is the unified Memory primitive alongside standard backend services — not a plugin, not a separate vector-store sidecar, but a transactional service where LLM-powered fact extraction and hybrid pgvector + BM25 + entity-boost score fusion operate within the same Spring transaction as the rest of the database work. The ScoreFusion class mirrors mem0’s scoring algorithm but runs natively in the JVM against the project’s own PostgreSQL, preserving full ACID guarantees. Equally distinctive is the end-to-end AI agent path: a single MCP tool surface (nubase_cli) covers schema, SQL, auth, storage, memory, function deploy, CDN publish, and cron scheduling so an AI coding agent can take a generated app from zero to live — with real auth, real persistence, and a public URL — without leaving the coding session or touching any external hosting account.
Licensing Model Apache 2.0 licensed — all features available in self-hosted deployments with no restrictions or license keys required.
Self-Hosting Restrictions
Not Yet Implemented
No Code Platforms · AI Development · Developer Tools
Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.
AI Code Assistants · AI Development
Orchestrate an army of AI coding agents—Claude Code, Codex, Gemini CLI, and more—running simultaneously in isolated git worktrees from a single Electron desktop app.
AI Code Assistants · AI Development
The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.