TypeScript · Postgres · your editor

Schema as code.
Everything else follows.

You write tables in TypeScript. Rebase keeps the database, the API, the types and the admin panel in agreement with them. Run pnpm dlx @rebasepro/cli init, then rebase dev, and it is already up.

zsh
>pnpm dlx @rebasepro/cli init

The loop

01 / 07

Four commands, and then you are just writing TypeScript

01

rebase init

Scaffold, or adopt what exists

Creates the backend and the admin panel and wires them together. Already have a database? rebase schema introspect writes the table files from it instead.

02

rebase db push

Move the schema

Diffs your tables against the database and applies the change. db generate + db migrate when you want the SQL in version control.

03

rebase generate-sdk

Regenerate the types

Writes a typed client from your tables — or from a running backend with --from <url>, in a repo that has no schema of its own.

04

rebase dev

Run it, with no database to install

Backend and panel together with hot reload. No DATABASE_URL? A managed Postgres starts with them — nothing to install, no Docker, no compose file to maintain.

How it works

You write this file.
You don’t write the rest.

Schema, REST API, typed SDK, edit forms and every panel view come out of it, and move when it moves. Whether you write it or an agent edits it, there is no second data model to keep in sync and no CRUD screen to go and maintain when a field changes name.

App Code — products.ts
import { defineTable, col }
  from "@rebasepro/server/schema";

export const products = defineTable("products", {
  columns: {
    id:         col.uuid().primaryKey().defaultRandom(),
    name:       col.text().notNull(),
    category:   col.text({ enum: [
      "electronics", "fashion", "home",
    ] }),
    price:      col.numeric({ precision: 10, scale: 2 }),
    in_stock:   col.boolean().default(false),
    image_url:  col.text().validate({ url: true }),
    created_at: col.timestamp({ withTimezone: true }).onCreateNow(),
  },
  rls: [
    { operation: "select", access: "public" },
    { operations: ["insert", "update", "delete"],
      roles: ["admin"] },
  ],
});

→ generates DB schema · REST API · Typed SDK · entity forms · admin views

The project

02 / 07

Three folders, one definition

backend/schema/ is the only place your data model is described. The backend reads it to serve APIs and generate the Drizzle schema; the panel reads the tables the backend serves and renders itself from them.

Delete frontend/ and you have a headless backend. Nothing under backend/ imports React, and nothing about the panel lives there: a table has no presentation keys, and the panel's customizations live in frontend/src/cms/.

after rebase init
my-app/
├── backend/              # the backend: API, auth, RLS, realtime
│   ├── schema/             # the source of truth
│   │   ├── index.ts
│   │   └── orders.ts         # defineTable: columns · relations · rls · hooks
│   ├── resources.ts        # databases, buckets, topics
│   ├── functions/          # your own routes, auto-mounted
│   └── src/schema.generated.ts  # Drizzle, generated
│
├── frontend/             # the admin panel, reading the tables the backend serves
│   └── src/cms/            # customizeTable: labels, views, your components
│
└── .env                    # DATABASE_URL, JWT_SECRET, …

Your code

03 / 07

Generated does not mean closed

Every generated surface has a seam you can open: hooks around writes, your own routes on the server, your own React in the panel, and raw SQL when the abstraction is in the way.

backend/schema/orders.tshooks
export const orders = defineTable("orders", {
  columns: { /* … */ },
  rls: "admin-only",

  hooks: {
    beforeSave: async ({ values }) => {
      values.total = recalculate(values.items);
      return values;
    },
    afterSave: async ({ id, context }) => {
      // same transaction: commits with the order, or not at all
      await context.data.ledger.create({ orderId: id });
    },
  },
});

Business logic runs on the server, on every write path — including writes made from the admin panel.

backend/functions/checkout.tscustom routes
// backend/functions/checkout.ts
import { Hono } from "hono";

const app = new Hono();

app.post("/", async (c) => {
  const { user, rebase } = c.get("rebase");
  // same auth context, same RLS as every other request
  return c.json({ ok: true });
});

export default app;
// → POST /api/functions/checkout

Drop a file in functions/ and it is mounted with no registration step. It knows who is calling and reads data under their row-level security; a route is public until you guard it with requireAuth.

rebase-workspace / schema_definition.ts
Workspace Live
TypeScript Model definition
import { defineTable, col } from "@rebasepro/server/schema";

export const posts = defineTable("posts", {
  columns: {
    id: col.uuid().primaryKey().defaultRandom(),
    title: col.text(),
    status: col.text(),
  },
  rls: "admin-only",
});
Add a column, save the file, and rebase dev picks it up.
rebase devFILE CHANGED

The dev server regenerates the Drizzle schema and the SDK types from the file, then creates what is missing (a new table, a new column) before it serves again. A rename or a drop is left to rebase db push.

Server running
Watching backend/schema for changes
Renames and drops: rebase db push

Resources

04 / 07

Declare what you need. In code, once.

Databases, buckets and topics are constructors, not YAML. Each one names its own engine — Postgres; local disk, S3, GCS, Azure — and an engine we have never heard of is spelled custom: and accepted, so it fails at the call site instead of looking like a typo.

rebase resources generates the graph a host reads before it builds anything, and --check fails CI when the committed graph and your code disagree. There is no second place to declare a bucket, which is the point: two homes for one fact means one of them is silently losing.

backend/resources.tsdeclared once
// backend/resources.ts
import { database, bucket, topic } from "@rebasepro/types";

export const analytics = database("analytics", { engine: "postgres" });
export const media     = bucket("media", { engine: "s3", transport: "direct" });
export const signups   = topic<{ userId: string }>("signups");

signups.subscription("send-welcome", async (event) => {
  // durable, at-least-once, retried on its own schedule
});

await signups.publish({ userId });

Publishing inside a transaction that rolls back was never published. Each subscriber retries on its own schedule, and one that gives up is a row you can look at.

Architecture

05 / 07

Where every piece actually runs

Your browser, your server, your database. Nothing routes through us — there is no us in the request path.

Database Layer
PostgreSQL
PostgreSQL
Drizzle ORM · Pooling · Read replicas
BranchingMigrationsIntrospection
Backend coreserver
Auth & Security
Email/password · JWT · Refresh tokens · Rate limiting
12 OAuth ProvidersMFAAPI Keys
Row-Level SecurityRolesLifecycle Hooks
Realtime Engine
WebSocket server · PostgreSQL LISTEN/NOTIFY · Auto-reconnect
BroadcastPresenceTable SubsRow Subs
Storage & Files
S3-compatible: AWS, MinIO, R2, Hetzner, DO, B2, GCS
Local FSTUS UploadsImage TransformsSigned URLsMedia Manager
Compute & Services
Cron Scheduler
5-field parser, DB logs
Custom Functions
Hono routes, auth + DB
EmailWebhooksHistorySearch
API Layerauto-generated from schema
REST
CRUD, filters, sort, pagination, eager-loading
WebSocket
Subs, broadcast, presence
OpenAPI
3.0 spec + Swagger UI
Typed SDK@rebasepro/clientBrowser · Node · Serverless · Edge
Generator
database.types.ts
Enums · Relations · Nested maps
Client Modules
rebase.data.*rebase.auth.*rebase.realtime.*rebase.storage.*rebase.functions.*rebase.cron.*rebase.email.*rebase.admin.*
CLI
@rebasepro/cli
$ init
$ dev
$ schema generate
$ schema introspect
$ db push
$ db migrate
$ db branch create
$ generate-sdk
$ doctor
$ build
$ start
$ deploy
$ skills install

Orchestrates schema, migrations, SDK codegen, dev server, and builds.

Frontend Layer
Rebase Platform
Rebase Studiodev tools
SQL Console
Monaco + EXPLAIN
JS Runner
Live SDK sandbox
RLS Editor
Visual policies
Schema Viz
Interactive ERD
API Explorer
Test endpoints
Storage Mgr
File browser
Cron Jobs
Task scheduler
Logs
Real-time viewer
Branches
DB branching
Rebase CMSCMS
Collections
Table · Card · List · Kanban
Entity Forms
20+ field bindings
Rich Text
Notion-like editor
Import/Export
CSV · JSON · Excel
Custom Views
Your React pages
History
Timeline + revert
Side Panels
Slide-over editing
Home Builder
DnD dashboard
i18n
7 languages
Your Application
built with the SDK + UI Kit
React
Next.js
Remix
Astro
Vue
Svelte
Angular
Node.js
Mobile
UI Kit@rebasepro/ui
55+
components
4
views
VirtualTableKanban BoardResizable PanelsForm ControlsDialogs & SheetsData DisplayMarkdownLayout

Schema-as-Code · Git-Backed · Hot Reload · Self-Hostable · TypeScript End-to-End · 21 Packages

Ship it

06 / 07

It deploys like the Node app it is

The backend builds to a bundle and runs behind whatever you already use. The admin panel is a static SPA — serve it from the same process or from a CDN.

One process is the default and stays the default. When you outgrow it, the same bundle boots as an API, a functions tier and a worker — REBASE_ROLE per process, and which routes mount, which timers fire and who owns the schema all follow from it. Exactly one process migrates; the rest check themselves against the database and say so if they disagree.

Self-hosted, every deployment is yours: your database, your machine, your logs. Rebase Cloud, our managed hosting, runs the same bundle for you — it is in private beta today and opens in batches.

Self-hosting guide
  • DockerA Dockerfile ships with every scaffolded backend.
  • RailwayPush the repo, set DATABASE_URL, done.
  • Fly.ioOne process, one region or several.
  • Hetzner · bare metalIt is a Node server. Run it the way you run Node.
  • AWS · GCP · Azure · ScalewayA deployment guide per provider in the docs.
  • Your existing Hono appMount the backend as a sub-app instead of deploying it separately.

Your agents, too

07 / 07

Teach your coding agent Rebase

rebase skills install writes packaged instructions into Claude Code, Cursor, Windsurf or Gemini, so an agent working in your repo already knows how tables, policies and the panel fit together. The MCP server gives it tools — schema introspection, migrations, queries, storage, cron — under a scoped key that row-level security still applies to.

~rebase skills install
The agent story in full

Get started

Start the loop.

One command scaffolds the project, generates the SDK from your schema and brings the panel up beside it.

No account · No Docker · Built-in local Postgres · MIT