Examples
Example applications built on backd, and what each one shows.
The repository includes example configurations under examples/config, and example applications built with the JavaScript client:
| Example | Realm | Shows |
|---|---|---|
| Blog | blog | Sign-up, sessions, public posts and private drafts, ownership, posts signed with the writer’s own email, filters, conflict-free edits, and a sample function for counts a reader can’t compute themselves |
| Expenses without functions | expenses | Shared data between users, invitations by email, and the limits of access rules: what they can enforce, and the holes only a server-side function can close |
| Functions cookbook | workshop | A small shop with six tested functions: a sync call as the caller, a privileged idempotent refund, a background report job, a nightly cleanup and a daily digest on cron schedules, and a payment webhook |
| Workshop tour | workshop | A guided walk through the cookbook’s functions with an inspector that shows every call the page makes: request, answer, the function’s own log and a curl command. Demo accounts for a customer, staff and an operator |
| Mailbox | workshop | The emails the workshop realm would send, captured by its email-capture function instead of delivered, with working links: a small app to read them. Local development only |
| Expenses with functions | expenses-with-functions | The same app, same layout, with those holes closed by five functions — compared side by side with what changed and why |
| Shelf (the Tutorial) | shelf | A team asset library built chapter by chapter: realms, auth, rules, invitations, functions of every mode, jobs, email, a signed webhook, API keys and audit — tour.js is its regression test |
make example serves the configurations and the applications on https://localhost:8443, with an index of the applications at /example/ (see Getting started).
A blog with public posts and private drafts: authors, ownership and filters with access rules.
Expenses without functionsA shared-expenses example: what access rules can enforce today, and the holes that need server-side functions.
Expenses with functionsThe same shared-expenses app as “expenses without functions”, with its four fixable holes closed by server-side functions — compared side by side.
Workshop tourA guided walk through the cookbook’s functions, with an inspector that shows every call the page makes.