A Cloudflare SaaS Starter, Ready for AI Agents.
Clone the repo and run the full stack with one command. AGENTS.md explains the project to coding agents, while two independently deployed Workers, end-to-end typed RPC, and branch-isolated environments give them a working system to extend.
- MIT licensed
- 2 typed Workers
- 1 command for local full stack
- E2E typed RPC
A small set of tools that work well together.
Frontend, API, data, infrastructure, and tests live in one pnpm workspace. Every choice is visible and replaceable.
Type-safe from your
browser to the database.
Frontend and backend are independent Workers — but to you, they're one codebase. Change an oRPC input or handler mounted in Hono; TypeScript updates your TanStack components without duplicated schemas or codegen.
▍▍`pnpm dev` starts both Alchemy-managed Workers and their local Cloudflare bindings.
Hot module reload across the Worker boundary. Save your route handler; see it in the UI.
Every pull request gets a unique URL with its own D1 branch. Review changes against real data.
One branch maps to one complete Cloudflare environment.
Alchemy reads the stage and environment file, then creates the Workers, bindings, data services, domains, and cross-service URLs as one stack. You push code; the repository handles the Cloudflare topology.
Push to dev → CI deploys the isolated development stack.
Push to main → CI deploys the production stack separately.
A unique preview URL and isolated resources for this PR.
The plumbing is already connected.
The web app and API already talk to each other. Database migrations, typed RPC, file uploads, tests, and CI are included. Start with a working system, then change what you need.
AGENTS.md + rule packs
A root guide and task-specific docs explain where code belongs, how to query D1, and which project rules an agent should follow.
Two typed Workers
web on TanStack Start (:3000) and server on Hono (:4000), each with its own alchemy.run.ts, independently deployable, connected only by types.
End-to-end typed RPC
oRPC + shared Zod schemas plumb DB row → API → React Query hook; copy the ~25-line packages/api/src/todos.ts CRUD and go.
Drizzle + D1
Serverless SQLite at the edge with example users/posts/todos tables; migrations auto-generated and auto-applied on dev and deploy.
R2 / KV, wired
Every Cloudflare binding is wired and health-checked, plus a real presigned-upload flow in storage.ts with a react-dropzone UI you can copy — no server proxying, zero egress.
Alchemy IaC + CI
Pure-TypeScript IaC (no wrangler.toml) auto-computes URLs, CORS, and bindings; every PR gets a throwaway full-stack preview stage that self-destructs on close.
Your frontend can change. Your backend does not have to.
Many full-stack starters optimize one web application. Saasflare starts with two independently deployable boundaries, so the API can serve every client your product grows into.
A single Worker is a good fit for many products. Separate boundaries matter when the API, clients, and Cloudflare services need to evolve on different release cycles.
Two Workers. One local command.
Clone a working system, not a code sample. Local development starts the TanStack web app, Hono API, D1, and Cloudflare bindings together — no Cloudflare login required.
$git clone https://github.com/saasflare-dev/starter.git$cd starter$pnpm install$pnpm devQuestions you probably have.
Straight answers, no hedging.
MIT-licensed. Free forever.
Need the complete Saasflare product source? PRO includes a private GitHub repo seat and every current product, available now at the early-bird price.
- saasflare-dev/starter (AGENT.md + rule packs)
- Deploy to your own Cloudflare account
- GitHub Discussions community support
- All future starter updates — free
- Everything in STARTER
- Private GitHub repo seat + all product source code
- Notify — webhook-to-desktop alerts
- Analytics — 1KB privacy-first analytics
- Tasks — long tasks that survive reloads
- Affiliate — referral system
- Smart Wallet — stablecoin payments & payroll
- Lifetime free updates to ALL current products
- Priority email support · < 24h
- PRO — every current product, lifetime free updates
- SaaS-optimized LLC US company structure
- Wyoming LLC + EIN + registered agent
- 1-on-1 Lili US bank account opening
- 1-on-1 Stripe onboarding guidance
- VoIP US phone number
- US business address (yr 1)
- Architecture review on request
Follow what we’re building.
We’ll only email you when we have a product update or industry news genuinely worth your attention. No inbox noise—only content that’s useful to you.