Skip to content

Documentation

What backd is, and where to find things.

backd is an open-source (MIT), config-driven backend: one stateless Go service over MongoDB. You declare realms, databases and collections as files on disk (a JSON Schema per collection, optional indexes and access rules) and backd serves a schema-validated, queryable REST API for them, with built-in users and sessions, API keys, an admin API, and server-side functions for the logic clients can’t be trusted with.

Where to start

I want to…Go to
Try it in a few minutesGetting started
Build a whole app, chapter by chapterTutorial
Describe my data: schemas, indexes, realmsConfiguration
Read, write and query documentsHTTP API and the JavaScript client
Control who can do what: users, sessions, API keys, rules, administrationAuthentication
Run server-side logic: privileged changes, background jobs, cron, webhooksFunctions (start with the Quickstart)
Put it in production, back it up, harden itOperations
See complete applicationsExamples
Work on backd itselfDevelopment

What you get

  • Configuration as files. Invalid config stops startup and names the file; backd config check runs the same checks in CI.
  • Schema-validated writes, mirrored as a MongoDB validator, with field-level errors and optimistic concurrency (ETag, If-Match).
  • Queries without injection: where, order_by, pagination and counts over an allowlisted query language.
  • Users, sessions and API keys per realm, with brute-force protection, invitations, network restrictions and an audit trail; administration through an admin API and the command line, never database credentials.
  • Access rules (rules: in collection.yaml) decided per document, with read rules applied inside the database query.
  • Server-side functions in isolated Deno processes: sync calls, background jobs, cron schedules, webhooks, encrypted secrets, rate limits, idempotency and a network allowlist.
  • A production path: a tested reference deployment (TLS, least-privilege MongoDB, encrypted backups), a config fingerprint so every instance runs the same configuration, and signed releases.

Versions

  • v0.2.0 added users, single sign-on per realm, access rules and secure administration. See upgrading to v0.2.0.
  • v0.3.0 adds server-side functions, the flag-based command line, listing of jobs, and this documentation’s Functions section. See the release notes for what changed and what breaks.
  • v0.4.0 adds email (verification, password reset, address changes and invitations, through a delivery function you write or the Postmark example), hosted pages for the emailed links, custom emails from functions, erasure (deactivate by default, erase on request), Prometheus metrics with Grafana dashboards, the example attack scripts that CI runs, and the JavaScript client on npm (backd-js). See upgrading to v0.4.0.
  • v0.5.0 adds cursor pagination (after and next_cursor), API keys limited to grants (scopes), HttpOnly session cookies for browser apps, Idempotency-Key on document creates and batches, dates stored as real dates (x-backd-store: date), backd rules test, shorter sessions for administrators, a login throttle that holds across instances, and a tutorial that builds a complete app. The JavaScript client moves to 0.4.0 with the matching options. See upgrading to v0.5.0.
  • v0.6.0 adds soft delete per collection (a trash with restore and purge, retention, unique values freed by a delete), admin rights per role (admin: [users, invitations] instead of everything), Prefer: respond-async to run a sync function as a job, a tunable login throttle (login_throttle), and the matching options in the JavaScript client (0.5.0). See upgrading to v0.6.0.
  • v0.7.0 adds the admin web interface (users, invitations, API keys, secrets, audit, functions and jobs, the configuration, and a data browser with forms drawn from your schemas), a read-only admin level (admin: read, admin.read_access), an audited admin data route, a switch that turns the admin API off per instance (BACKD_ADMIN_API), and the matching methods in the JavaScript client (0.6.0). See upgrading to v0.7.0.
  • v0.8.0 adds files: documents carry files in a realm’s own S3-compatible storage (AWS S3, MinIO, Cloudflare R2 or DigitalOcean Spaces) with files: in collection.yaml, uploads through backd or straight to the bucket, signed downloads and links for apps, rules that apply to every file operation, erasure and backd storage reconcile, files in functions and in the JavaScript client (0.7.0) and the admin UI, and chapters 13 to 15 of the tutorial. It also adds schema checks (backd data check), on_complete, job steps and progress, and pausing, time zones and overlap: skip for schedules. See upgrading to v0.8.0.
  • v0.8.1 (a minor release with breaking changes, as allowed before a stable one) adds image versions (resized copies of uploaded images made by workers, served with ?version=), metadata removal from JPEG and PNG originals by default, storage quotas, multipart direct uploads of files up to 4 TiB, and checks of a change against the realm’s whole configuration. Rules now live in collection.yaml, and backd without a command prints its help. See upgrading to v0.8.1.

backd has no installed base yet: until a stable release is declared, breaking changes are allowed and are listed in the release notes.

Edit this page · Last updated 08 Oct 2026