Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.
Copier template for Cloudflare Worker auth apps
This template generates a Cloudflare Worker app with Better Auth mounted at `/api/auth/*`, a shadcn/ui login SPA, and Cloudflare D1 backing the auth tables. It also renders the Worker config, Drizzle schema, and app files so you begin with a complete auth project rather than a blank folder.
Builders who want to generate a Cloudflare auth project with a Worker, a login SPA, and D1.
You can start from a working auth app scaffold instead of wiring the Worker, database, and UI yourself.
What it does
Worker auth endpoint
Generates a Hono Worker with Better Auth mounted at `/api/auth/*` and a `drizzle-orm/d1` adapter.
Login SPA
Includes a Vite React app with a shadcn/ui login screen, radix-lyra, and phosphor icons, served through the Worker assets binding.
D1 schema and migration
Creates the Drizzle schema and SQL migration for the Better Auth tables: user, session, account, and verification.
Cloudflare config
Renders `wrangler.jsonc` with the D1 binding, SPA fallback, and `run_worker_first` routing for API paths.
Self-hosting guides
Documents escape hatches for moving the database, runtime, or object storage off Cloudflare when needed.
How to get it
- 1Run
uvx copier copy gh:<owner>/<this-repo> ./my-auth-app # or from a local checkout: uvx copier copy path/to/this-template ./my-auth-app
README
cloudflare-better-auth-d1 (copier template)
Copier template for a Cloudflare Worker that serves Better Auth + a shadcn/ui login SPA, backed by Cloudflare D1.
Generated projects contain:
- Hono Worker with Better Auth mounted at
/api/auth/*,drizzle-orm/d1adapter - Vite React SPA (shadcn preset
buFznsW, radix-lyra, phosphor icons) served via the Worker'sassetsbinding - Generated drizzle schema + SQL migration for the four better-auth tables (user, session, account, verification)
wrangler.jsoncwith D1 binding, SPA fallback, andrun_worker_first: ["/api/*"]
Usage
uvx copier copy gh:<owner>/<this-repo> ./my-auth-app
# or from a local checkout:
uvx copier copy path/to/this-template ./my-auth-app
You'll be asked for:
project_slug— kebab-case name for the Worker and packageapp_title/app_tagline— text shown in the login cardworker_name/d1_database_name— defaults derived fromproject_slug
Post-generation, copier runs bun install, cd web && bun install && bun run build, and wrangler types. Follow the message printed afterwards to create the D1 database and deploy.
Self-hosting strategy
The default rendered project is vanilla Cloudflare + D1 — right for ~90% of projects. When it isn't, a rendered project can move selected pieces (DB, object storage, runtime) onto your own infra without a rewrite. docs/ documents each escape hatch:
docs/self-hosted-database.md— swap D1 for self-hosted Postgres reached by the Worker via Hyperdrive + a Cloudflare Tunnel (Worker stays).docs/self-hosted-runtime.md— swap the Worker for a Bun + Hono container on Dokploy serving both/api/*and the SPA.docs/self-hosted-object-storage.md— add an S3-compatible gateway (versitygw) reached by the Worker over a Workers VPCvpc_servicesbinding on the same tunnel.
Each doc describes the pattern, trade-offs, and order of operations, and links to the working reference in knowsuchagency/vpc-test for the drop-in files. See docs/README.md for the decision framework (when to reach for each).
Developing this template
The template source lives under template/. Files ending in .jinja are rendered; everything else is copied verbatim.
Regenerate into a scratch dir to smoke-test:
uvx copier copy --trust . /tmp/smoke-test --data project_slug=smoke-test
Files in the repo
- docs
- template
- .gitignore
- AGENTS.md
- CLAUDE.md
- copier.yml
- README.md
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More templates
Turn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
A self-organizing Obsidian vault that gives AI coding agents persistent memory. Claude Code, Codex CLI, Gemini CLI.
Production-grade Playwright + TypeScript Scaffold for Agentic Testing. Harness for all major AI coding agents baked in.
Omnia Vault - the all-in-one project brain: an Obsidian LLM wiki, Graphify code graphs, a living plan that triages new videos against itself, and a Claude Code ⇄ Codex relay. Everything your project knows, in one clonable vault.

🎬 Tạo video "so sánh kiến thức" ngắn tự động — HyperFrames + AI voice, 1 template nhiều chủ đề.