Download Template
Download as ZIP and extract to
.trellis/spec/What’s Included
| Category | Files | Coverage |
|---|---|---|
| Backend | 11 files | Hono, Drizzle/Turso, API patterns, security, storage |
| Frontend | 7 files + examples | Components, hooks, auth, design templates |
| Shared | 5 files | TypeScript, code quality, dependencies, timestamps |
| Guides | 3 files | OAuth consent flow, serverless connections |
| Pitfalls | 6 files | Workers compat, cross-layer, env config, CSS |
Template Structure
Key Topics
Backend
- Hono framework patterns (type-safe bindings, middleware, WebSocket)
- Drizzle ORM + Turso/libSQL (batch ops, N+1 prevention, Workers pitfalls)
- Cloudflare storage (R2, KV, Cache API for session caching)
- Security (token generation, timing-safe comparison, OAuth redirect validation)
- Structured JSON logging with request context
Frontend
- React 19 + React Router v7 with Vite
- Better Auth UI v3.x integration (SSR-safe, Cloudflare Workers considerations)
- shadcn/ui components + Tailwind CSS v4
- Design example templates (minimalist hero, maximalist dashboard, animations)
Guides
- OAuth 2.1 consent flow with resource selection
- Serverless connection debugging (stale connections, subrequest limits)
Common Pitfalls
- Workers Node.js compatibility (
nodejs_compatflag) - Cross-layer contract violations (data flows but never reaches client)
- Build-time vs runtime environment variables
- CSS debugging in Tailwind v4
Usage
- Download the ZIP file
- Extract to your project’s
.trellis/spec/directory - Replace generic env var names with your actual bindings
- Customize for your specific conventions
- Remove sections that don’t apply
View on GitHub
Browse the template source code