Both wrap an existing database in an instant API and admin app. Backlex adds edge deployment, a fully Apache-2.0 core, built-in vector search, and a runtime MCP server.
Directus is a mature data platform that wraps any SQL database with a REST/GraphQL API and a polished admin app, running as a Node.js server. Backlex shares that "instant API over your database" idea but is built to run at the edge — the same codebase deploys to Cloudflare Workers, Vercel, Netlify, AWS Lambda, Google Cloud & Azure Functions, Deno Deploy, or your own server (Bun, Node, or Deno) — is fully Apache-2.0, ships built-in semantic/vector search, and exposes a first-class runtime MCP server so AI agents can use your backend as a tool.
| Backlex | Directus | |
|---|---|---|
| License | Apache-2.0 | BSL 1.1 (free under a revenue threshold) |
| Runtimes | 9 runtimes — Cloudflare Workers, Vercel, Netlify, AWS Lambda, Google Cloud & Azure Functions, Deno Deploy, or self-host on Bun/Node/Deno | Node.js (self-host or Directus Cloud) |
| Edge-native | Runs inside the edge runtime | No — Node server |
| Database | PostgreSQL and SQLite / Cloudflare D1 | PostgreSQL, MySQL, SQLite, MS SQL, and more |
| Collections / schema | Managed tables (dynamic, additive-only DDL) or adopt existing tables via a metadata row | Introspects existing databases; schema builder |
| Schema versions | Snapshots, diff between any two points, branching, and scheduled auto-snapshots | Schema snapshot / apply via CLI, with a diff on apply |
| Database import | Import from PostgreSQL, MySQL, a SQLite file, MongoDB, Firestore or DynamoDB — plan → run, resume/cancel, `--since` delta re-sync | Introspects an SQL database in place; cross-engine import is DIY |
| REST + GraphQL | Both, auto-generated; nested-relation filters, expand, aggregation | Both, auto-generated |
| Realtime | Live row changes streamed to clients over Server-Sent Events (SSE), permission-filtered | WebSockets + GraphQL subscriptions |
| Permissions | Role-based DSL: conditions + field-level allow-lists, one model across APIs + realtime | Roles + granular access policies |
| Multi-tenancy | First-class — workspaces with isolated data, end-users, auth, SSO & email; one deployment serves many, sessions pinned per tenant | DIY via roles/filters or separate instances |
| Vector search | Built in — pgvector or Cloudflare Vectorize; auto-embed on write | Not built in (external vector DB / community) |
| Embedding models | OpenAI, Workers AI (bge-m3), or self-hosted TEI/Ollama/vLLM | — |
| 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 | Admin AI Assistant for content actions; no programmable agent runtime |
| MCP server | Built-in runtime MCP server — ~149 tools (protocol 2025-11-25) over collections, vector & admin; OAuth 2.1 so hosted clients connect with no API key (bearer `pak_` keys still work for headless agents), per-key tool allow-lists + read-only guards | Official MCP server (API access) |
| Storage + images | Files with ACLs, signed URLs; image transforms on Bun in-process or the Cloudflare edge | File storage with image transformations |
| Edge functions | Sandboxed functions — http / event / cron triggers | Extensions / hooks (Node) |
| Extensions | Install admin panels, field editors & hooks from npm or an upload; hooks run sandboxed on events or on the cron tick | Extensions marketplace — interfaces, panels, hooks (run in the Node process) |
| Dashboards / BI | Insights — dashboards over collections, six chart types, grouping, public iframe embed token | Insights dashboards with panels |
| Flows (automation) | Visual, no-code op-chains on item events | Flows (no-code automation) |
| Webhooks | Signed webhooks on item events | Webhooks / flow operations |
| Auth providers | Email/password, OAuth, magic link, email-OTP, passkeys | Local, OAuth / OpenID |
| SSO | SAML 2.0 + LDAP/AD (per workspace) | SAML, LDAP (SSO) |
| Audit logs | Built-in activity trail + opt-in sensitive-read auditing + revisions | Activity log + revisions |
| Client SDKs | 11 first-party SDKs — TS, Python, Go, Rust, Swift, Kotlin, Dart, Java, .NET, Ruby, PHP | @directus/sdk (JS/TS) |
| Admin UI + CLI | Admin SPA and the `backlex` CLI (migrate, gen-types) | Directus app + CLI |
| Spreadsheet grid + Kanban | Editable grid — cell selection, copy/paste, fill-down, undo — plus a Kanban board grouped by status | Table layout with inline editing; Kanban layout available |
| Live collaboration | Presence + field-level awareness on the item form and rows table, with an optimistic-concurrency guard on PATCH | Revisions + activity trail; presence via extensions |
| Messaging (push + SMS) | Built in — FCM/APNs/Web Push + SMS (Twilio/Amazon SNS), per-tenant credentials, registries & templates | Not built in |
| Batch / transactional writes | Bulk + opt-in atomic (all-or-nothing) writes over REST and GraphQL | Batch item operations |
| Background jobs | Durable queue — retry with backoff, dead-letter, delayed/scheduled | Flows (no durable retry / dead-letter queue) |
| Resumable uploads | TUS 1.0.0 chunked/resumable, native R2 / S3 multipart | Resumable uploads (TUS) |
| Draft / publish | Built-in draft↔published status, dedicated publish permission, scheduled publishing | Draft/publish via status + content versioning |
| Content localization | Per-field translations sidecar (any field type), side-by-side locale editing, compare mode, AI auto-translate of missing keys | Translations interface backed by a translations collection |
| Public forms | Drag-block, multi-step form builder — share a link or embed script, anonymous uploads via signed tickets, conditions + per-locale copy; submissions land in a collection | Via extensions or a third-party form tool |
| Advisor | Schema, permissions & config linter with a score and deep links to each fix | Not built in |
| Tracing + usage metering | W3C `traceparent` propagation, an admin Traces panel, OTLP export; per-key usage ledger with limits | Logs + a metrics endpoint; OpenTelemetry via config |
| Feature flags / remote config | Built in — rollout-% + permission-DSL targeting, evaluated per caller | Not built in |
| Offline-first sync | Incremental changefeed + tombstones + client store (IndexedDB) + offline write queue | Not built in |
| Auth hardening | Per-IP rate-limiting + account lockout, 2FA/TOTP, email verification | Configurable rate limiting |
Like Directus, Backlex can adopt an existing database — point it at a table and it writes a metadata row, auto-detecting foreign keys as relations, with no data migration. It can also create managed tables with a dynamic, additive-only DDL applier that never drops or rewrites columns (field removal is an explicit, audited action). Either way you get permission-aware REST + GraphQL, realtime, and an admin UI immediately.
This is where Backlex pulls ahead for AI work: semantic search is
part of the backend,
not a bolt-on. Flag a collection's text fields and it auto-embeds on
write and runs ANN search via pgvector
or Cloudflare Vectorize,
with embeddings from OpenAI, Workers AI, or a self-hosted model — and
the same vectors are exposed to agents through the vector.search
MCP tool and the Ask-AI / RAG page. Directus has an official MCP server
for API access, but semantic/vector search is not built in — you bring
an external vector database.
See the Backlex documentation or the source on GitHub to get started. Backlex's core is free and open under Apache-2.0; the managed Cloud is optional.