AnvilBase Documentation
AnvilBase is a self-hostable backend platform (BaaS). It gives you a Postgres database, auto-generated REST API, authentication, realtime subscriptions, object storage, edge functions, queues, cache, a secrets vault, and webhooks — for as many isolated projects as you want — from a single deployment and a single web console.
Forged for your infrastructure.
If you know Supabase, you already know AnvilBase: the data-plane API and the
@supabase/supabase-js client work the same way. The difference is that
AnvilBase runs many fully-isolated projects out of one stack, ships a
complete security architecture (database-per-project isolation, RLS-on-by-default,
encryption at rest, audit logs, RBAC), and runs the identical stack locally
and in production.
Start here
| If you want to… | Go to |
|---|---|
| Understand what AnvilBase is and how it’s built | Introduction → Overview |
| Get a stack running on your machine in 10 minutes | Getting Started → Installation |
| Build your first app against it | Getting Started → Quickstart |
| Connect a frontend with the SDK | Connect Your App |
| Migrate an existing Supabase project | Migrate from Supabase |
| Deploy to production | Self-Hosting → Overview |
Documentation map
Introduction
- Overview — what AnvilBase is, who it’s for
- Why AnvilBase — comparison vs Supabase / Neon / Upstash / Appwrite
- Architecture — the full system design
- Core Concepts — projects, isolation, the two API planes, keys
Getting started
- Installation — Docker Compose, secrets, health checks
- Quickstart — first project, first table, first query
- Your First Project — provisioning, keys, endpoints
- Connect Your App — JS/TS, Python, Dart, curl
Database
- Overview — Postgres 15, per-project databases
- Tables & Schema — DDL via console, CLI, API
- SQL Editor & Raw SQL —
rpc/exec_sql, saved queries, history - Extensions — pgvector, PGMQ, pg_cron, pgcrypto, and more
- Vector Search — embeddings with pgvector
- Migrations —
db push, tracking, idempotency
REST API (data plane)
- Overview — the built-in REST→SQL engine
- Reading Data — select, filter, order, paginate
- Modifying Data — insert, update, upsert, delete
- RPC & Stored Procedures — call Postgres functions over HTTP
Auth
- Overview — Better Auth per project, JWTs, scopes
- Users & Sessions — sign-up, sign-in, ban, revoke
- OAuth Providers — GitHub, Google, Apple, Discord, Microsoft
- Email & Templates — magic links, verification, SMTP
Realtime
- Overview — Phoenix Channels, the WebSocket protocol
- Postgres Changes — stream INSERT/UPDATE/DELETE
- Broadcast & Presence — pub/sub and online state
Storage
- Overview — S3-compatible object storage, per-project buckets
- Working with Objects — upload, download, list, sign
- Image Transformations — imgproxy resize/format
Edge Functions
- Overview — Deno runtime, the injected context
- Writing & Deploying — author, deploy, invoke
- Runtime & Isolation — per-project process model, worker pool, rollback
Platform features
- Queues (PGMQ) — durable Postgres-native message queues
- Cache (Valkey) — namespaced Redis-compatible cache
- Cron & Scheduling (pg_cron)
- Webhooks — database & auth events → signed HTTP delivery
- Secrets Vault — encrypted per-project secrets
Security
- Overview — the security model and trust boundaries
- Row Level Security — policies, templates, testing
- API Keys & Scopes — anon / authenticated / service_role
- Multi-Tenancy & Isolation
- RBAC & Team Management
- Encryption — at rest, in transit, secrets
- Audit Logs
- Network Security — TLS, mTLS, SSRF guards
eIDAS 2.0 (EU Digital Identity)
Self-hosting & operations
- Overview
- Docker Compose
- Kubernetes (Helm)
- Configuration Reference
- Production Checklist
- Backups & Restore
- Point-in-Time Recovery
- Monitoring
- Scaling
- Upgrades
- Disaster Recovery
CLI
- CLI Reference — every
anvilbasecommand
Tools & integrations
- MCP Server (AI tools) — drive AnvilBase from Claude, Cursor, Zed…
- SDK Compatibility — using
@supabase/supabase-js - Migrate from Supabase
Reference
- Management API —
/api/v1/* - Data-Plane API —
/v1/* - REST Query Syntax — operators, modifiers
- Configuration / Environment Variables
- Ports
- Error Codes
- Glossary
Publishing these docs
Conventions used in this documentation
<project_id>— a project’s UUID, returned when you create a project.<slug>— the human-friendly project slug (e.g.my-app).- Code samples are provided for curl, TypeScript (
@supabase/supabase-js), Python (supabase-py), and Dart/Flutter (supabase_flutter) wherever a client interaction is involved. Pick the tab/snippet for your stack. - Endpoints on the management plane are written
/api/v1/...; endpoints on the data plane are written/v1/.... They use different credentials — see Core Concepts. - Examples assume a local install reachable at
http://localhost:39001. In production, substitute your own host (TLS-terminated at Traefik).
License
AnvilBase is distributed under the Business Source License 1.1 (BSL 1.1). It is source-available and converts to Apache 2.0 four years after each release. See Glossary → License for details.