BETASDKs MIT, CLI and services Apache 2.0, schema engine BSL 1.1. Cloud is a closed beta: create an account to request access.
DATABASE

Real Postgres.

Every Supatype project is a full Postgres database. Write your TypeScript types, and Supatype generates the migrations, the API and the client types from them.

Closed beta: creating an account requests access. We email you when you are in.

schema/index.ts
export type Place = Model<{
  id: UUID
  name: MaxLength<string, 120>
  price: Money
  location: GeoPoint
  embedding: Vector<1536>
}>
$ supatype push
[supatype] Diffing against database...

1 change(s):

  [+] create_table place  (safe)

[supatype] Applying migration...
[supatype] Migration applied.
FROM YOUR TYPES

The schema is the source.

Migrations generated

Change a type and run supatype push. It diffs against the live database, shows what will change, asks before anything risky and applies it. supatype rollback undoes the last one.

A REST API

PostgREST serves a REST API over your tables, and your access rules apply to it. Self-hosted and local stacks also serve GraphQL through pg_graphql. Cloud project URLs do not serve GraphQL yet.

35+ field types

Text, numbers, money, dates, JSON, enums, geography, vectors, rich text, images and files. Each maps to a real Postgres column type. Field types

Extensions when you need them

A GeoPoint field brings PostGIS, a Vector field brings pgvector and a slug brings unaccent. The push creates them in their own extensions schema.

Row and column access

Row rules compile to Postgres row level security. Field rules hide columns per role with supatype_mask, or through generated views where it is not installed.

Bring an existing database

supatype pull drafts a schema from the tables you already have, and supatype adopt hands existing objects to Supatype.

Postgres, typed.

Cloud starts with 2 projects, 500 MB database and 1 GB storage, free and with no card. Or run the same stack on your own machine.

Closed beta: creating an account requests access. We email you when you are in.