Choose Backend/API Stack
Add a backend when the product needs server-side coordination or trust. Do not add it because the app has forms.
Backend Is Required When
- Users share data across accounts or devices.
- You need auth, roles, invites, billing, or payments.
- You integrate with third-party APIs that require secret custody.
- You need queues, cron jobs, ingestion, webhooks, or durable background work.
- You need an admin UI or audit trail.
- You need server-side validation for business-critical workflows.
Backend Is Optional When
- Data can stay local and exportable.
- The app is single-user.
- Static generation covers the content.
- Sync can wait.
- Manual import/export is acceptable for v1.
Small Starter Shapes
| Shape | Good for | Starter |
|---|---|---|
| Go single binary plus embedded UI | Local services, dashboards, admin tools | Go API, SQLite, embedded Vite build, health route |
| PocketBase-style embedded backend | CRUD/admin/auth-heavy solo apps | SQLite, admin UI, custom routes |
| Serverless/Workers API | Small public APIs, webhook glue, protected static apps | Worker routes, bindings, minimal state |
| Traditional web app | Auth-heavy CRUD with conventional deployment | Framework, DB, migrations, jobs |
First Gates
- Schema and migration path exists.
- Auth/authorization model is explicit.
- Secrets are not in client code.
- Health check and logs exist.
- Backup/export story is named.
- Local dev and production deployment commands are known.