# Backant > **Any coding agent. Any frontend. One backend standard.** Backant is a coherent backend platform combining code-first TypeScript development with visual Flow DAG orchestration, multi-tenant application authentication, BullMQ background jobs, Cloudflare R2 storage, and SSE Live Queries — designed for human engineers and AI coding agents. ## Published Packages & Releases - **CLI (`backant-cli`)**: `0.5.25` — https://www.npmjs.com/package/backant-cli · https://github.com/backant-app/backant-cli - **Desktop (`Backant.app`, macOS Apple Silicon)**: `0.5.7` — https://github.com/backant-app/backant-desktop/releases/download/v0.5.7/Backant-0.5.7-arm64.dmg - **Auth SDK (`@backant-app/auth-sdk`)**: `0.2.0` — https://www.npmjs.com/package/@backant-app/auth-sdk · https://github.com/backant-app/backant-auth-sdk - **Live Query SDK (`@backant-app/live-sdk`)**: `0.1.0` — https://www.npmjs.com/package/@backant-app/live-sdk · https://github.com/backant-app/live-sdk ## Core Architecture - **Database**: MongoDB 7 replica set (`rs0`) with multi-tenant, multi-environment `modelData` envelopes (`{ serverId, env, modelName, data, createdAt, updatedAt }`) and separate databases for `staging` and `production`. - **Workflows**: Native 10-node strict Flow DAG engine (`trigger`, `action`, `if`, `switch`, `loop`, `parallel`, `retry`, `delay`, `subflow`, `human`) with cycle-free `[FLOW-DAG-001]` validation, JEXL expressions, symmetric `ctx` capabilities (`ctx.models`, `ctx.services`, `ctx.assets`, `ctx.jobs`, `ctx.secrets`), and execution logs. - **Action Runtime & Deadlines (Contract v2 — `schemaVersion: 2`)**: Route handlers (`export default async function (ctx)`), Flow actions (`(ctx, input)`), and Jobs (`(ctx)`) share a pure, code-exportable `ctx` contract (`ctx.req`, `ctx.models`, `ctx.services`, `ctx.assets`, `ctx.jobs`, `ctx.secrets`, `ctx.json(data, status)`, `ctx.error(status, code, message)`). Legacy v1 `(req, res)`, `this.*`, and raw `ctx.db` emit `[MIGRATE-V2-*]` Tombstone diagnostics through `v0.8.0` and upgrade automatically via `backant migrate`. Synchronous HTTP actions run with a unified `AbortSignal` deadline budget (`60s` default, configurable up to `90s` via `config.ts`, `25 MB` max `fetch()` response). JSON/form bodies are capped at `5 MB` (`413 PAYLOAD_TOO_LARGE`); malformed JSON (`400 INVALID_JSON`) and unsupported encodings (`415`) return deterministic `4xx` responses. - **Background Jobs**: Redis + BullMQ durable queues (separate Redis instances for staging and production) with startup reconciliation, `300s` default / `600s` max job deadline budgets propagated to `fetch()` and `ctx.services`, worker-role isolation (`ENABLE_INTERNAL_JOB_WORKERS`), dedicated worker services, and full sandbox support (`fetch`, `Blob`, `File`, `FormData`, `ctx.assets`, `ctx.services.stt`, `ctx.services.pdf`, `ctx.secrets`). - **Storage & Media**: S3-compatible Cloudflare R2 with tenant-scoped keys (`tenants/.../assets/...`), presigned & multipart uploads (`1 GB`), zero-config wildcard/ETag CORS sync, server-side `ctx.assets.getBuffer()`/`completeUpload()`, custom-route `multipart/form-data` (`ctx.req.files`, `25 MB`/file, `50 MB` total), and built-in `ctx.services.stt.transcribe()` (Groq/OpenAI Whisper with `429` retry). Built-in HTML → PDF via `ctx.services.pdf.render({ html, format, margin, headerHtml, footerHtml })` → `{ buffer, mimeType, size }` (isolated headless-Chromium/Gotenberg sidecar; JS disabled, public `https://` assets only, `2 MB` HTML / `25 MB` PDF / `30s` limits) — no Puppeteer or external PDF API needed. Note: `auth.storage.*` requires an active `auth.login()` session (`401` otherwise); no-auth apps use Action `ctx.assets.getUploadUrl()` + `completeUpload()`. Never send binary files as base64 JSON (`5 MB` JSON cap). - **Realtime**: Server-Sent Events (SSE) Live Queries (`/api/live-query/*`) consumed via `@backant-app/live-sdk`. - **Application Auth & RBAC**: Strictly isolated from platform developer accounts. Supports four templates (`basic-auth`, `role-based`, `saas`, `advanced-access-control`), TOTP MFA, OAuth, organizations, and Bring-Your-Own-Provider (BYOP) transactional email. - **Developer & AI Workflow**: Bidirectional CLI ↔ Studio sync (`backant push` / `backant pull`), OAuth 2.1 + PKCE login (macOS Keychain), per-project account pinning (`.bestudio/targets.json`), global `SKILL.md` installation (`backant skill sync --global`), and built-in stdio MCP server (`backant mcp`). ## Security, Operational Boundaries & Current Status - **Studio Access**: Backant Cloud Studio (`https://app.backant.app`) is currently Invite-Only Early Access. CLI, SDKs, and macOS Desktop are publicly downloadable. - **Snapshot Rollback Scope**: Definition snapshots cover schemas, routes, actions, flows, jobs, services, and auth configs. Reverting a snapshot restores definitions without touching live customer records (`modelData`), application users, or uploaded R2 assets. - **Action Runtime Threat Model**: Host-side egress (DNS-pinned SSRF & 25 MB wire/decompressed stream caps), `ModelQueryPolicy` (PCRE2+RE2 safe regex & query caps), pre-operation quotas, static AST `config.ts` manifests, and `$secret:KEY` Host header injection are enforced by the platform host; migrating handler execution from in-process `vm2` to a dedicated untrusted isolate runner + `gVisor` boundary is tracked on the pre-GA roadmap. - **macOS Binary Signing**: Preview macOS DMG builds are not yet notarized with an Apple Developer ID (first launch requires removing the macOS quarantine attribute). - **Data Ownership & Export-First Design**: Project definitions are plain TypeScript and JSON (`schemaVersion: 2`) in Git, constrained to standard Express/Zod/MongoDB/BullMQ/S3 primitives with zero un-exportable runtime magic. Application records live as standard MongoDB JSON/BSON documents (exportable to NDJSON + `manifest.json` via `backant data export`) and assets live in standard S3-compatible R2 storage. Standalone code export (`backant export`) is on the active roadmap. ## Documentation & Links - [Homepage](https://backant.app/): Platform overview and interactive capability walkthroughs - [Full Machine-Readable Reference (`llms-full.txt`)](https://backant.app/llms-full.txt): Single-file complete technical reference compiled from `llms.txt` and official AI agent skills - [OpenAPI 3.1 Specification (`openapi.json`)](https://backant.app/openapi.json): Machine-readable HTTP API contract for Application Auth, Managed R2 Storage, Live Query SSE, and Health - [Developer Documentation](https://backant.app/docs/): Quickstart, architecture, security boundaries, and full CLI reference - [Backant MCP Server Guide](https://backant.app/docs/mcp.html): Official stdio MCP setup (`npx -y backant-cli mcp`) for Claude Code, Cursor, Antigravity, Codex, and Windsurf - [Auth & BYOP Email Guide](https://backant.app/docs/auth-and-email.html): Application auth templates, organizations, and BYOP email setup - [Security Architecture & VDP](https://backant.app/docs/security.html): Encryption, tenant isolation, runtime threat model, and vulnerability disclosure (`/.well-known/security.txt`) - [Backant vs. Convex, Supabase, Appwrite, Encore.ts & Firebase](https://backant.app/docs/compare.html): Objective engineering comparison, AI coding agent DX deep dive, and portability trade-offs - [Public Roadmap & Changelog](https://backant.app/docs/roadmap.html): Shipped milestones, active priorities, and pre-GA gates - [Reference Examples (`backant-examples`)](https://github.com/backant-app/backant-examples): CI-validated Contract v2 reference backends (`saas-tasks` and `ai-doc-pipeline`) - [Backant Studio](https://app.backant.app): Web control plane and visual Flow canvas