Skip to content

Getting Started

Introduction

Rebase is the open-source backend for PostgreSQL, with an admin panel for your team, built with React and TypeScript. It gives you everything you need to build a production-ready application on PostgreSQL:

  • Schema as Code — Declare your Postgres tables in TypeScript, each with a required row-level security posture. Rebase generates the tables and their policies, REST API endpoints, a typed SDK and a full CRUD UI from that single source of truth.
  • Instant Admin Panel — A beautiful, fast React-based panel with spreadsheet tables, lists, forms, Kanban boards, inline editing, and real-time sync.
  • Integrated Backend — Authentication (passwords, magic links, one-time codes, MFA, API keys and twelve OAuth/OIDC providers), file storage (local, S3 or GCS), Row Level Security, entity history, and WebSocket real-time — all built in.
  • Radically Extensible — If you can build it in React, you can add it to Rebase. Custom fields, custom views, plugins, and full access to internal hooks.

Rebase is a backend and an admin panel that share a server. Start from the one you came for:

I want… Start here What you get
A backend and an admin panel Quickstart Tables in TypeScript, a generated CRUD UI, a REST API, auth, storage and realtime
Just the API, over my own database Backend only A headless REST API and SDK over your existing PostgreSQL — no admin panel, no table files

Neither is a one-way door: a headless project grows an admin panel by adding a frontend, which renders every table the backend serves, and either can write its tables down in backend/schema/ when it wants them in code.

┌──────────────────────────────────────────────────────┐
│ Client Applications │
│ ┌──────────────┐ ┌───────────────────────────────┐ │
│ │ Your App │ │ Rebase CMS + Studio │ │
│ │ (Any Tech) │ │ Tables / Lists / Kanban │ │
│ └──────┬───────┘ └──────────────┬────────────────┘ │
└─────────┼──────────────────────────┼─────────────────┘
│ HTTP + WebSocket │
▼ ▼
┌──────────────────────────────────────────────────────┐
│ Rebase Backend (Node.js + Hono) │
│ ┌─────────┐ ┌──────┐ ┌─────────┐ ┌───────────────┐ │
│ │ REST API│ │ Auth │ │ Storage │ │ WebSocket RT │ │
│ └────┬────┘ └──┬───┘ └────┬────┘ └──────┬────────┘ │
└───────┼─────────┼──────────┼─────────────┼───────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌──────────────────────────────────────────────────────┐
│ PostgreSQL (Drizzle ORM) │
└──────────────────────────────────────────────────────┘
pnpm dlx @rebasepro/cli init my-app
cd my-app

init generates a ready-to-run .env for you — no editing needed. Then:

pnpm install
pnpm run dev

That is the whole first run. There is no database to install and no schema step: with no DATABASE_URL set, rebase dev starts a managed PostgreSQL (PGlite) in the project directory, generates the schema from your tables, and creates the tables at boot.

Read the URLs from the output. rebase dev picks a free port per project rather than fixed ones, so they differ between projects and between machines. The first account you register becomes the admin — on your machine. A production deployment names its admin instead, with REBASE_ADMIN_EMAIL and REBASE_ADMIN_PASSWORD (see Configuration).

To use your own Postgres instead, uncomment DATABASE_URL in .env and run pnpm run dev again.

→ Follow the full Quickstart guide for a complete walkthrough, including how to connect your own database.

Feature Description
Spreadsheet Views Fast, virtualized table with inline editing, filtering, sorting, and text search
List View Clean, responsive vertical list view for any table
Kanban Board Drag-and-drop board view grouped by any enum column
Relations One-to-one, one-to-many, many-to-many with junction tables and multi-hop joins
Row Level Security Postgres RLS policies compiled from the rls every table must declare
Authentication JWT + refresh tokens, twelve OAuth/OIDC providers, magic links, one-time codes, TOTP MFA, scoped API keys, role-based access control
File Storage Local filesystem, S3-compatible or Google Cloud Storage, with upload fields and browser
Real-time Sync WebSocket-powered live updates across all connected clients
Entity History Full audit trail for every create, update, and delete
REST API Auto-generated CRUD endpoints for every table
Data Import/Export CSV, JSON, and Excel import with field mapping; CSV/JSON export
Typed SDK Type-safe JavaScript SDK for your frontend apps
Plugin System Extend every part of the UI — toolbar, forms, fields, home page
AI Data Enhancement LLM-powered autocompletion for text fields
Cron Jobs Scheduled background tasks with monitoring, logging, and Studio dashboard
Custom Functions File-based Hono routes with DB access, public by default: the caller’s token is read when sent, and requireAuth guards a route
Email Service Built-in SMTP for password reset, verification, and transactional emails
Database Branching Instant isolated copies of your database for dev, staging, or testing
Webhooks HMAC-signed outbound notifications on INSERT, UPDATE, DELETE
Broadcast Channels WebSocket channels for real-time messaging between connected clients
Presence Tracking Track online users and sync shared state across participants
  • Quickstart — Get running in 2 minutes
  • Backend only — The headless API over a database you already have
  • Project Structure — Understand the generated code, and the words the rest of these pages assume
  • Tables — Define your data schema
  • Backend — Configure auth, storage, and the API
  • Architecture — Understand how it all fits together