Documentation · Alpha
Describe your data and rules. Call the API that enforces them.
backndb is a backend-as-a-service. You declare what your app manages and who may do what; backndb runs it as a REST API, with users, access and hosting included. This page explains the model. The next two show how to authenticate and let you call the API from here.
1 · The concept
You write the why. backndb owns the how.
Generated code is cheap, but nobody controls what it allows. backndb keeps the part you must control — your data model and business rules — in a readable definition, and generates everything that executes it.
There are two layers. The definition is public: business terms a product owner can review. The execution layer is compiled from it inside backndb and never exposed. Same definition, same behaviour, every time.
Definition
Entities and their fields, then conditions, behaviors, guards and access rules.
Engine
Validates the definition, versions it on publish, and evaluates the rules on every request.
Live API
A REST API per app, with its users, its docs and its front end on one address.
2 · Building blocks
Five words describe any backend.
An entity's state is never edited directly: it is derived from its history of changes, so the rules can always tell what happened and why.
| Block | What it is | Example | Status |
|---|---|---|---|
| Entity | A kind of record your app manages, with typed fields. | listing, booking | live |
| Access | Who may read, create, change or delete — like firewall rules. No rule: public. | guest → booking → own | next |
| Condition | A named fact about a record, true or false. | arrivalWithin48h | next |
| Behavior | An action allowed only while its conditions hold. | cancel unless arrivalWithin48h | next |
| Guard | An invariant checked after every change. If it breaks, the change is refused. | price > 0 | next |
3 · Where things live
One address to build. One per app to run.
Every request names its project. Your account and API keys work across all the projects you own.
| Address | Used for | Accepts |
|---|---|---|
| auth.backndb.io/auth | Your backndb account: sign-in, API keys | magic link · session |
| api.backndb.io/api/projects | Design and run your projects: entities, publish, logs | API key only |
| <app>.backndb.io/api | Your app's live data, for your app's users | session · API key |
| <app>.backndb.io/auth | Sign-in for your app's users, on your app's domain | magic link · session |
| <app>.backndb.io/ | Your front end, served as static files | public · private |
4 · How these docs work
Docs generated from the definition.
Hand-written docs drift from the API. These are rendered from the spec backndb generates — so when a project changes, its docs change with it.
- Generated
From the spec, not by hand
Each project publishes an OpenAPI spec built from its definition, extended with what OpenAPI can't say: conditions, behaviors, guards.
- Per caller
You see what you can call
The spec depends on who asks. Load your key and the explorer lists your projects and their endpoints.
- In your browser
Your key stays with you
Requests go straight from this page to the API. Your key is kept for this tab only and sent nowhere else.
- For agents too
Readable by AI tools
The same content will be served as
llms.txt, so a coding agent can build against your API.
Next