Compare

Backlex vs Firebase

Firebase gives you a fast, proprietary NoSQL backend on Google Cloud. Backlex gives you an open-source, SQL-backed backend with dynamic collections you can run anywhere and own end to end.

Firebase is Google's Backend-as-a-Service: a NoSQL document database (Firestore), realtime listeners, auth, and hosting, all managed inside Google Cloud. Backlex is an open-source (Apache-2.0) alternative on a relational database (PostgreSQL or SQLite/D1), with dynamic collections, REST + GraphQL, a permissions DSL, realtime, built-in vector search, and a runtime MCP server for AI agents — running on your own server (Bun, Node, or Deno), Cloudflare Workers, Vercel, Netlify, AWS Lambda, Google Cloud & Azure Functions, or Deno Deploy.

Backlex Firebase
License Apache-2.0 core + managed Cloud Proprietary (Google)
Self-host 9 runtimes — Cloudflare Workers, Vercel, Netlify, AWS Lambda, Google Cloud & Azure Functions, Deno Deploy, or self-host on Bun/Node/Deno No — Google-hosted only
Data model Relational: PostgreSQL or SQLite / D1 NoSQL document store (Firestore)
Collections / schema Managed tables (dynamic, additive-only DDL) or adopt existing tables — relational, with relations & constraints Schemaless document collections
Schema versions Snapshots, diff between two points, branching, scheduled auto-snapshots Schemaless — no schema snapshots or diff
Database import Import from PostgreSQL, MySQL, a SQLite file, MongoDB, Firestore or DynamoDB — plan → run, resume/cancel, `--since` delta re-sync Firestore import/export; other sources via custom scripts
Query API REST + GraphQL, SQL-backed; filter/sort/paginate, nested-relation filters, aggregation SDK queries against documents
Client SDKs 11 first-party SDKs — TS, Python, Go, Rust, Swift, Kotlin, Dart, Java, .NET, Ruby, PHP Web, iOS/Android & Flutter clients + Admin SDKs (Node, Python, Go, Java, .NET)
Realtime Live row changes streamed to clients over Server-Sent Events (SSE), permission-filtered Realtime document listeners
Permissions Role-based DSL: conditions + field-level allow-lists Security Rules language
Multi-tenancy First-class — workspaces with isolated data, end-users, auth, SSO & email; one deployment serves many, sessions pinned per tenant Auth tenants via Identity Platform (paid); data isolation is DIY
Vector search Built in — pgvector or Cloudflare Vectorize; auto-embed on write Firestore vector search + Genkit (embeddings via extension)
Embedding models OpenAI, Workers AI (bge-m3), or self-hosted TEI/Ollama/vLLM Gemini / Vertex AI
AI agent runtime Built in — define agents that reason over your data and call your tools (DSL-scoped) in a persisted thread, with per-thread vector memory + live step streaming Genkit — agent/flow toolkit (separate SDK you host and wire up)
MCP server Built-in runtime MCP server — ~149 tools (protocol 2025-11-25) over collections, vector & admin; OAuth 2.1 for hosted clients (no API key) or a bearer `pak_` key for headless agents, per-key tool allow-lists MCP via Genkit / Firebase MCP
Storage + images Files with ACLs, signed URLs; image transforms on Bun in-process or the Cloudflare edge Cloud Storage; image resize via extension
Functions Sandboxed edge functions; http/event/cron triggers Cloud Functions
Flows (automation) Visual, no-code op-chains on item events Cloud Functions / Extensions (no visual builder)
Extensions Install admin panels, field editors & hooks from npm or an upload; hooks run sandboxed on events or the cron tick Firebase Extensions (marketplace, backed by Cloud Functions); the console itself isn't pluggable
Dashboards / BI Insights — dashboards over collections, six chart types, grouping, public iframe embed token Analytics dashboards; BI via BigQuery export + Looker Studio
Spreadsheet grid + Kanban Editable grid — cell selection, copy/paste, fill-down, undo — plus Kanban grouped by status Console document browser (no grid or Kanban editing)
Live collaboration Presence + field-level awareness on the item form and rows table, optimistic-concurrency guard on PATCH Realtime listeners as a primitive; build presence yourself
Public forms Drag-block, multi-step form builder — share link or embed script, anonymous uploads via signed tickets, conditions + per-locale copy; submissions land in a collection Not built in (third-party form tools)
Content localization Per-field translations sidecar (any field type), side-by-side locale editing, compare mode, AI auto-translate of missing keys Not built in (DIY locale fields)
Advisor Schema, permissions & config linter with a score and deep links to each fix Security Rules simulator + Google Cloud recommenders
Tracing + usage metering W3C `traceparent`, an admin Traces panel, OTLP export; per-key usage ledger with limits Performance Monitoring + Cloud Trace; usage & quotas in the console
Auth providers Email/password, OAuth, magic link, email-OTP, passkeys Firebase Auth (many providers)
SSO SAML 2.0 + LDAP/AD (per workspace) SAML / OIDC (Identity Platform)
Messaging (push + SMS) Built in — FCM/APNs/Web Push + SMS (Twilio/Amazon SNS), per-tenant credentials, registries & templates FCM push; SMS for phone-auth only
Batch / transactional writes Bulk + opt-in atomic writes over REST and GraphQL Batched writes + transactions (Firestore)
Background jobs Durable queue — retry, dead-letter, delayed/scheduled — built in Cloud Tasks / Cloud Functions (separate services)
Resumable uploads TUS 1.0.0 chunked/resumable, native R2 / S3 multipart Resumable uploads (Storage SDK)
Draft / publish Built-in draft↔published status + scheduled publishing Not built in (DIY)
Feature flags / remote config Built in — rollout-% + permission-DSL targeting Remote Config
Offline-first sync Changefeed + tombstones + client store / offline write queue — your DB, open protocol First-class offline persistence (Firestore SDK)
Auth hardening Per-IP rate-limiting + account lockout, 2FA/TOTP, email verification App Check + abuse protection
Vendor lock-in None — open core, portable, multi-runtime High — tied to Google Cloud
Pricing model Free self-host; flat Cloud plans Usage-based (reads/writes/egress)

Collections flow

Backlex models data as relational collections. Let it create a managed table (dynamic schema, additive-only DDL that never drops columns) or adopt an existing table with a metadata row — foreign keys are auto-detected and become relations you can filter and expand. That's a different model from Firestore's schemaless documents: you get typed fields, relations, constraints, and SQL queries instead of denormalised document trees.

Vector search & AI

Semantic search is built into the data layer: flag a collection's text fields and Backlex auto-embeds on every write and runs ANN search via pgvector (Postgres) or Cloudflare Vectorize (SQLite/D1), with embeddings from OpenAI, Workers AI, or your own model. The vectors power the Ask-AI / RAG page and the vector.search MCP tool. Firebase offers Firestore vector search with Genkit, but the embedding and agent wiring lives in your application code.

When Backlex is the better fit

  • You want a real SQL database and relational queries instead of a document store.
  • You want to avoid vendor lock-in and keep the option to self-host.
  • You prefer predictable pricing over per-read/per-write metering.
  • You're building AI agents and want native MCP access to collections and vector search.
  • You want REST and GraphQL without a proprietary client SDK.

When Firebase is the better fit

  • You're deep in the Google Cloud ecosystem and want tight integration.
  • A NoSQL document model fits your data better than relational tables.
  • You want Google's mobile SDKs (iOS/Android) and analytics out of the box.

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.