Vibes DIY
Vibes DIY / Docs
creator docs · patterns

Patterns cookbook

When we asked an agent to build the platform's own social-mention bot, it picked a vibe as the production home — not a worker, not a queue, not a cron server. These are the patterns that make that choice work: each one composes stock primitives (a Fireproof database, an access.js rule, a backend.js lane, the CLI) into something you'd otherwise provision infrastructure for.

Every pattern here runs in production today, in the vibes that operate this platform's own publishing and growth loops. Most pages end with a live exemplar you can remix — remix copies code, never data, so the whole security model transfers to you and the original's credentials stay home.

The patterns

  • The write-only credential vault — a database no browser can read back, holding real API tokens. The secret store you'd otherwise pay a cloud provider for.
  • Doc-status state machines — documents walking pending → done as a message bus between your backend, your UI, and external workers. The queue you don't have to run.
  • The CI lane with a device cert — let GitHub Actions (or any script) read and write your app's data with the CLI, holding no API tokens at all.
  • Scheduled self-maintenance — apps that rotate their own credentials and clean up after themselves on a timer.
  • The operator console for free — your App.jsx is the admin dashboard, with the same access control as everything else.
  • The deploy button — database ACLs as capability grants: who may press the button is who may write the doc.

New to backends? Start with the backend.js guide, then come back — most patterns lean on the scheduled lane's identity model.