Skip to main content

pgStack

PostgreSQL-native backend. Zero extra containers.

Two containers. That is it.

PostgreSQL + one proxy. No GoTrue, no PostgREST, no Realtime, no Kong, no Redis. Run docker compose up -d and your backend is ready — the proxy ships as two co-equal builds, Go or Rust, hardened to parity.

Real-time SQL queries

The pg_reactive C extension turns any SELECT into a live subscription. Delta delivery via WebSocket, column-level tracking, generation-isolated tenancy. No CDC, no polling — the database itself pushes the diff.

Auto-HTTPS & static hosting

TLS_MODE=auto provisions and renews Let's Encrypt certificates (ACME) for your domains. Serve your SPA and assets straight from the proxy, gzip-compressed. No nginx, no certbot, no extra hop.

Edge Functions — five runtimes

One /functions/v1/ endpoint, five backends: embedded JS (goja), PL/v8, PL/Python, a Deno sidecar, or a per-function HTTP container inany language. Pick per function.

PostgREST-compatible REST API

Full CRUD with PostgREST filter syntax — eq, gt,ilike, in, FK embedding, RPC. Migrate from Supabase without changing client code.

Security-first auth + RLS

Email/password (argon2id), JWT, OAuth, magic links, refresh-token rotation. Row-Level Security on every request via a two-pool least-privilege model — hardened against 26 documented trust-boundary invariants.

PostgreSQL-backed job queue

Durable background jobs and cron scheduling with no Redis or RabbitMQ. Jobs are rows. Failures are retried. Observability is a SELECT.

Studio + file storage

A built-in admin Studio — table editor, SQL editor, auth users, live logs — plus S3-compatible storage buckets, PostgreSQL-backed by default (optional disk backend). All from the same two containers.

TypeScript SDK + CLI

Supabase-compatible @pgstack/sdk with React hooks. CLI for scaffolding, migrations, type generation, and dev environments.

Coming from Supabase?

Same client code, a fraction of the moving parts — plus features Supabase doesn't have.

2 containers, not 15+

GoTrue, PostgREST, Realtime, Storage, Kong, Redis — collapsed into one PostgreSQL and one proxy.

Drop-in SDK

The PostgREST filter syntax and @pgstack/sdk are Supabase-compatible. Point your client at a new URL.

More out of the box

Database-native live queries, five edge-function runtimes, and auto-HTTPS with static hosting — no extra services to wire up.

Get started in minutes

1. Start the stack

npx pgstack init my-app
cd my-app
docker compose up -d

2. Query your data

import { createClient } from '@pgstack/sdk';

const db = createClient(
  'http://127.0.0.1:8080',
  process.env.PGSTACK_ANON_KEY,
);

const { data } = await db.from('todos')
  .select('*')
  .eq('done', false)
  .order('created_at', { ascending: false });

3. Subscribe to live updates

import { useLiveQuery } from '@pgstack/sdk/react';

function TodoList() {
  const { rows, state } = useLiveQuery('active_todos', {
    url: 'ws://127.0.0.1:8080',
    token: session.access_token,
  });
  return rows.map(r => <li>{String(r.title)}</li>);
}

4. Secure with RLS

ALTER TABLE todos ENABLE ROW LEVEL SECURITY;

CREATE POLICY "Users see own todos"
  ON todos FOR ALL
  USING (user_id = auth.uid());

-- Every REST request runs as the
-- authenticated PostgreSQL role.
-- RLS is automatic.