~ 2 min read
Claude Start CF — TanStack Start + Cloudflare Workers Template
I’ve been building a lot of applications on Cloudflare Workers lately, and the developer experience is phenomenal when you get the stack right. Today I’m open-sourcing claude-start-cf — a production-ready template that pairs TanStack Start (React SSR) with Cloudflare’s edge infrastructure.
This isn’t a minimal starter. It’s a fully-configured, battle-tested template with working demos for every major pattern you’ll need: server functions, D1 databases, R2 storage, environment variables, markdown processing, SEO optimization, and LLM-friendly pages.
Why This Stack?
TanStack Start is React’s best SSR framework. It has:
- File-based routing (like Next.js)
- Server functions that compile to RPC
- Built-in streaming, code splitting, and hydration
- First-class TypeScript support
- No Node.js lock-in
Cloudflare Workers is where I want to run everything:
- Global edge deployment (200+ regions)
- Instant cold start
- No containers, no servers to manage
- Pay-per-request pricing
- Access to D1 (serverless SQLite), R2 (S3-compatible storage), KV, and more
Quick Start
npx degit morrisonak/claude-start-cf my-app
cd my-app
npm install
wrangler d1 create my-db
wrangler r2 bucket create my-bucket
npm run deploy
That’s it. Your app is live on the edge.
Key Patterns
Server Functions — Write once, works everywhere. Client: fetch(). SSR: direct call.
D1 Database — Serverless SQLite. Your database runs in the same Cloudflare region as your code.
R2 Storage — S3-compatible with zero egress fees. Perfect for uploads, images, backups.
Environment Variables — Three clear layers: wrangler.jsonc, secrets, and VITE_ client vars.
Markdown + Collections — Build-time processing with YAML frontmatter.
Real-World Example
Built MetaV Advisors (consulting + SaaS) on this template. Handles marketing, auth, D1, R2 uploads, email, analytics. Everything on the edge. No Node.js. No ops.
Repository: https://github.com/morrisonak/claude-start-cf
Live Demo: https://claude-start-cf.jmorrison.workers.dev
Go build something on the edge.