add-backend
Installation
SKILL.md
Add a backend (resources, data sources & presets)
The app is backend-agnostic by design: it reaches data and auth only through two seams, so adding a resource, swapping one resource's data source, or re-pointing the whole app at a different backend are all localized operations.
Routing rule: use add-backend whenever a screen needs its own data (a new
entity/table, or a different backend); use add-component when composing UI on top
of data that already exists.
| Concern | Seam | Default preset | Swap point |
|---|---|---|---|
| Business data (resources) | Repository<T, TInput> (@/infra/data/repository) |
Postgres via drizzleRepository; in-memory when no DB |
each resource's server.ts binding |
| Auth (server) | AuthProvider (@/lib/auth-provider) |
better-auth (betterAuthProvider) |
the authProvider binding |
| Auth (browser) | @/lib/auth-client |
better-auth React client | reimplement that one file |
Zero-config (bun dev, no DATABASE_URL) already runs on in-memory presets, so you
can build UI before wiring a real backend. Full guides: docs/data-adapters.md,
docs/backends.md.