Now in early development — star us on GitHub

Define your types.
We generate your platform.

Write a TypeScript schema. Supatype generates your Postgres database, REST API, GraphQL API, auth, storage, realtime, and CMS — automatically.

One schema. Everything generated.

schema/index.ts
import type { Model, UUID, Slug, RichText, RelatedTo, Public, LoggedIn, OwnerFrom, SupatypeAuthUser } from '@supatype/types'

export type Post = Model<{
  id: UUID
  title: string
  slug: Slug
  body: RichText
  authUser: RelatedTo<SupatypeAuthUser>
}, {
  access: {
    read: Public
    create: LoggedIn
    update: OwnerFrom<'authUser'>
  }
}>
Generated for you
  • 🗄 Postgres migration + rollback
  • 🔒 Row-Level Security policies
  • 🌐 REST API via PostgREST
  • GraphQL via pg_graphql
  • 📦 S3-compatible storage bucket
  • Realtime subscription trigger
  • 🖥 Content CMS UI
  • 📘 TypeScript types + client SDK
  • 📖 OpenAPI documentation

Everything your stack is missing,
in one schema.

The tools you're stitching together today each solve one piece of the problem. Supatype solves all of it.

Supabase

Great infrastructure.
No CMS.

Supabase gives you Postgres, auth, and storage — but you still write SQL for every migration and build your own CMS for content editors.

Auth, storage, realtime
Database admin panel
Content CMS for editors
TypeScript-driven migrations
Auto-generated RLS

Payload CMS

Great CMS.
No infrastructure.

Schema-driven content management — but you're still integrating your own auth, storage, and realtime from scratch.

Content CMS, editor UI
Auth, storage, realtime
Auto-generated APIs
Multi-tenancy

Convex / Firebase

Type-safe.
Vendor lock-in.

Reactive and type-safe — but you're on a proprietary database, have no CMS, and your data isn't in Postgres.

Type safety
Real Postgres
Content CMS
Self-hostable

Supatype = Supabase infrastructure + Payload CMS + end-to-end TypeScript safety

One TypeScript schema. Your database, API, auth, storage, realtime, and CMS — all generated, all in sync, all type-safe.

Real Postgres, no lock-in
Auth, storage, realtime built in
Content CMS auto-generated
Zero SQL required
TypeScript end-to-end
Self-hostable by default
RLS generated from access rules
Migration risk analysis
Multi-tenancy built in

Everything your app needs.
Nothing you don't.

🗄

Schema-first Migrations

TypeScript is your migration file. Push your schema, get forward and rollback SQL with risk analysis showing row-level impact before you apply.

🔐

Auth & Row-Level Security

Authentication is built in. Declare access: { read: Public, create: LoggedIn, update: OwnerFrom<'authUser'> } on a model and Supatype generates the Postgres RLS policies. No SQL.

📦

Storage

Add an image or file field and a storage bucket is automatically created with the right permissions. Image transforms included.

Realtime

Every model gets a WebSocket subscription generated. React to database changes in your frontend with a single hook — no separate WebSocket infrastructure to operate.

🖥

Content CMS

A full content management UI — list views, edit forms, rich text, media library, version history, scheduled publishing, and live preview — all generated from your schema.

No separate CMS needed
🌐

REST + GraphQL API

PostgREST and pg_graphql are wired up automatically. Your schema defines the API surface with full TypeScript client generation and OpenAPI docs.

🏗

Multi-tenancy

Row-level, schema-level, or database-level isolation — declare the strategy in your config and Supatype generates the isolation logic. No custom boilerplate.

Coming soon
🔧

Schema-driven Everything

Webhooks, scheduled jobs, email templates, rate limiting, audit logging, field encryption — all declarative in your schema. One source of truth.

Coming soon
🐳

Self-hostable by Default

Develop locally with native supatype-server, or run the full stack on your own server with Docker Compose (supatype/server on Docker Hub).

Run Supatype on your machine or your server

Install the CLI, scaffold a project, and choose local development or self-hosted Docker Compose.

Local development

Native supatype-server and the schema engine run on your machine. Postgres is native by default, or you can run only Postgres in Docker.

1 · Install the CLI

npm install -g @supatype/cli

First run downloads engine, server, Postgres (native), and Deno into ~/.supatype/cache/.

2 · Create a project

mkdir my-app && cd my-app
supatype init
npm install
supatype keys

supatype init scaffolds package.json, supatype.config.ts, schema, and public/.

Add the printed keys to .env if needed.

3 · Start dev

supatype dev
supatype push

API gateway: http://localhost:54321 — REST /rest/v1/, auth /auth/v1/, storage, realtime.

Optional · Postgres in Docker only

In supatype.config.ts: database: { provider: "docker", image: "supatype/postgres:17-latest" }

Engine and supatype-server stay native; only Postgres uses Docker.

Optional · Your app at / (local dev)

Configure the app once in committed supatype.config.ts (see Deploy changes). For day-to-day coding with Vite or Next dev, use a proxy in supatype.local.config.ts (gitignored) so production can stay static:

# supatype.local.config.ts — laptop only, not on the server
export default {
  app: { mode: "proxy", upstream: "http://localhost:5173" },
}

Restart supatype dev after changing config. Routes / to your dev server; APIs stay on /rest/v1/, /auth/v1/, …

Self-host (Docker Compose)

Run the full stack on a server with Docker. Use the same project layout as local dev in your own directory.

1 · Server requirements

Ubuntu 22.04+ (or similar), Docker + Compose v2, Node.js 22+, and npm install -g @supatype/cli.

2 · Scaffold and secrets

mkdir my-app && cd my-app
supatype init
npm install
supatype keys

Set strong JWT_SECRET and URLs in .env.

3 · Start Compose

Defaults use :latest on Docker Hub (supatype/postgres:17-latest, supatype/server, supatype/storage, supatype/studio, supatype/schema-engine, supatype/functions-worker, supatype/control-plane). Realtime runs inside supatype/server. Pin via SUPATYPE_*_IMAGE in .env only if needed.

supatype self-host compose render
supatype self-host compose up -d
supatype push

Gateway: http://<your-host>:18473 — Studio at /studio/. Use a reverse proxy for HTTPS.

4 · Static app (one-time setup)

supatype app add --static ./public

Writes app.mode: "static" to supatype.config.ts — the same file local dev and self-host both read. Commit it; you do not run app add again on the server.

After the first deploy, use Deploy changes for schema and frontend updates.

Deploy changes

Local dev and self-host use the same project: one supatype.config.ts in git, plus .env for secrets on each machine. The CLI merges optional supatype.local.config.ts on top (gitignored) for laptop-only overrides such as proxying to Vite.

Configuration

  • supatype.config.ts — shared: schema path, app routing, version pins. Commit this.
  • supatype.local.config.ts — optional: overrides, dev-only app: { mode: "proxy", … }. Never required on the server.
  • .env — per machine: DATABASE_URL, JWT keys, API_EXTERNAL_URL. Not committed.

What to run when something changes

Change Local dev Self-host server
Schema (schema/index.ts) supatype push supatype push (Postgres on localhost:5432 via Compose)
Frontend build (public/ or dist/) npm run build — refresh browser (proxy serves your dev server) npm run build then supatype self-host compose render and compose up -d
supatype.config.ts (app path, versions, …) Restart supatype dev compose render + compose up -d
Secrets / URLs (.env) Edit .env, restart supatype dev Edit .env on server, compose up -d

Typical server deploy (after git pull)

cd my-app
git pull
npm install          # if package.json changed
supatype push        # schema migrations
npm run build        # static files into public/ or dist/
supatype self-host compose render
supatype self-host compose up -d

DATABASE_URL in the server .env should point at the Compose Postgres on localhost:5432 so push and Studio use the same database as the stack.

Full walkthrough · VM + GitHub Actions

Step-by-step example: scaffold locally, bootstrap a VM, add SSH deploy on push to main.

Deploy to a VM with GitHub Actions →

How Supatype stacks up

Assembled alternatives cost 50–60% more and require you to integrate incompatible systems yourself.

Feature Supatype Supabase Payload CMS Convex Firebase
TypeScript schema as source of truth
Content CMS for non-technical editors
Real Postgres
Built-in auth Plugin
Built-in storage Plugin
Realtime subscriptions
Auto-generated RLS from access rules
Migration risk analysis
Self-hostable
Multi-tenancy from schema config
Schema-driven webhooks & scheduled jobs

Be part of what we're building.

Supatype is in active development. Star the repo, join the Discord, and help shape the platform.