Compare

backlex vs Supabase

Both give you an instant backend over a real database. The difference is where it runs, how you model collections, and how AI agents reach your data.

Supabase is an excellent open-source backend built around a single managed PostgreSQL database, with PostgREST, Realtime, Auth, and Storage on top. backlex targets a different shape: one codebase that deploys to Cloudflare Workers, Vercel, Netlify, or your own server, runs on either PostgreSQL or SQLite/D1, and ships a first-class runtime MCP server so AI agents can use your backend as a tool.

backlex Supabase
License Apache-2.0 core + managed Cloud Apache-2.0 + managed cloud
Database PostgreSQL and SQLite / Cloudflare D1 (dual-dialect) PostgreSQL only
Runtimes Cloudflare Workers, Vercel & Netlify (Node 22), self-host on Bun — one codebase Managed cloud; self-host via Docker
Edge-native Runs inside the edge runtime, next to the request Regional Postgres + Deno edge functions in front
Collections / schema Managed tables (dynamic, additive-only DDL) or adopt existing tables via a metadata row — no data migration Manage Postgres schema directly (SQL / migrations / Studio)
Field types text, longtext, number, boolean, uuid, timestamp, json, relation / relation_many, i18n_text Native Postgres column types
REST API Auto-generated; filter/sort/paginate, nested-relation filters (2 hops), expand, aggregation Auto-generated via PostgREST
GraphQL Built in, auto-generated from collections Via pg_graphql extension
Realtime Live row changes streamed to clients over Server-Sent Events (SSE), permission-filtered Postgres logical replication over WebSockets
Permissions Role-based DSL: conditions + field-level allow-lists, one model across REST/GraphQL/realtime Postgres Row-Level Security (SQL policies)
Vector search Built in — pgvector (PG) or Cloudflare Vectorize (SQLite/D1); auto-embed on write Built in (pgvector)
Embedding models OpenAI, Workers AI (bge-m3), or self-hosted TEI/Ollama/vLLM Bring your own (OpenAI, etc.)
AI agents / MCP Built-in runtime MCP server — collections, vector search & admin exposed to agents, per-key tool allow-lists + read-only guards Official MCP server (project / database management from dev tools)
Storage + images Files with ACLs, signed URLs; image transforms (resize/format/fit) on Bun in-process or the Cloudflare edge Storage with image transformations
Edge functions Sandboxed functions (QuickJS / worker-thread / remote executor); http/event/cron triggers Edge Functions (Deno)
Auth providers Email/password, OAuth, magic link, email-OTP, passkeys, anonymous Email/password, OAuth, magic link, OTP
SSO SAML 2.0 (per-workspace) and LDAP/AD SAML (Pro / Enterprise)
Audit logs Built-in activity trail + opt-in sensitive-read auditing Via Postgres / log drains
Flows (automation) Visual, no-code op-chains triggered by item events Database triggers / functions (no visual builder)
Webhooks Signed webhooks on item CRUD events Database webhooks
Admin UI + SDK Admin SPA, typed client SDK, and `backlex` CLI Studio, supabase-js, CLI

Collections flow

In backlex you either let it create a managed table (dynamic schema with an additive-only DDL applier that never drops or rewrites columns) or adopt an existing table by writing a single metadata row — no data migration, foreign keys auto-detected and surfaced as relations. Every collection instantly gets permission-aware REST + GraphQL, realtime, and an admin UI. With Supabase you manage the Postgres schema yourself (SQL, migrations, or the Studio table editor) and wire RLS policies per table.

Vector search & AI

Mark a collection vectorizable and flag the text fields to embed — backlex auto-embeds on every write and runs approximate-nearest-neighbour search, using pgvector on Postgres or Cloudflare Vectorize on SQLite/D1. Embeddings come from OpenAI, Workers AI (bge-m3), or your own self-hosted model. The same vectors back the Ask-AI / RAG page and the vector.search MCP tool, so agents get semantic search for free. Supabase also offers vector search via pgvector, but you wire the embedding pipeline and any agent access yourself.

When backlex is the better fit

  • You want your backend to run at the edge (Workers / Vercel / Netlify) instead of in front of a regional database.
  • You're building AI agents and want collections, vector search, and admin actions reachable over MCP with per-key scoping.
  • You need SQLite / D1 as well as Postgres, or want to stay database-portable.
  • You prefer a permissions DSL with field-level allow-lists over hand-written SQL row-level security.
  • You want to adopt existing tables without migrating data.

When Supabase is the better fit

  • You're committed to PostgreSQL and want its large, mature ecosystem.
  • You rely on Postgres Row-Level Security and existing PostgREST tooling.
  • You want a long-established managed platform with a big community.

See the backlex documentation or the source on GitHub to get started. Self-hosting is free under Apache-2.0; the managed Cloud is optional.