Cloudflare product template
Ship the plumbing.
Build the product.
Workers + Hono, D1 via Drizzle, Better Auth (sessions for humans, API keys for agents), server-rendered HTMX, and a CLI over the same API. One API, many clients. Replace the example item slice with your product.
01 / One API
Web, CLI, and agents share it
Every capability is a service function exposed on the JSON API. The HTMX UI and the CLI are both just clients — an agent can drive the product end to end with an API key.
02 / Auth built in
Sessions + API keys
Better Auth handles email/password for humans and long-lived API keys for agents. One middleware resolves either. scrypt hashing runs in-process — no sidecar worker.
03 / Deploy-ready
Provision and ship
D1 migrations, a safe deploy script with backups, code + data rollback, and a built-in feedback loop. Everything an agent needs to launch on Cloudflare from zero.