The full-stack starter kit for Cloudflare

TanStack Start renders every page at the edge, server functions replace the API, and D1 holds the data. One Worker, one deploy command.

Get lifetime access

  • TanStack
  • React 19
  • TypeScript
  • Cloudflare
  • Bun
  • Better Auth
  • Resend
  • Claude
  • Cursor

guardrails your AI agents followso their code fits the repository boundaries

the app your customers log intoit runs the minute you clone it

sign-up, teams, payments, emailworking on day one, not stubbed

your productthe only part left to build

one repo with the boring parts already finishedso you start on what makes your product different

What actually goes wrong.

Agents don't break your codebase in one commit.

They break it gradually: reading context nobody maintained, inventing a route through the code, and passing every check on the way to a regression you find two weeks later.

  • An AGENTS.md file last updated eight months ago, behind a terminal showing recent commits that changed the code since
    Someone wrote the context file months ago. Your agent is still working from it.
  • The same invoices feature created three times in three different directories: features, domains, and lib
    There's no established route for how features get built, so every agent takes a different one.
  • A pull request reporting 33 successful checks, overlaid by two production error reports
    The run comes back green and the PR looks right, but a regression shows up two weeks later.

A first task for your coding agent

“Add a subscriber-only reports page.”

Your agent has a server function to follow, a subscription check to reuse, and tests for what happens when a customer cancels. It can run those tests against D1 before you deploy.

Keep billing decisions on the server

apps/start/AGENTS.md

Do not grant billing access from anything but a verified webhook.

Your agent can reuse the subscription state the Worker already checks.

Put the change in the right place

apps/start/docs/architecture.md

The guide shows where to validate a request, check team permissions, and read from D1.

Check who gets access

apps/start/tests/billing.test.ts

Run the existing tests for duplicate webhooks, canceled subscriptions, and expired plans.

Catch a database mismatch

pnpm typecheck

The app checks that its query types match the migrations, then checks the TypeScript that uses them.

A working SaaS on one Worker.

Your customers can create an account, invite a teammate, and manage a subscription. The pages and server functions for those flows ship together.

Sign-in and accounts

  • Offer password, magic link, or Google sign-in
  • Verify email and revoke sessions on password reset

Subscriptions

  • Choose one provider for checkout
  • Reject invalid signatures and ignore duplicate events

Teams and permissions

personal + team

  • Create a personal workspace at sign-up
  • Invite teammates, assign roles, and transfer ownership

Server functions

  • Validate submitted data
  • Check the session and team before accessing records

Database migrations

  • Keep related writes in one atomic batch
  • Apply pending migrations during deployment

Transactional email

  • Send verification links and team invitations
  • Test email flows locally without a provider key

Request security

on by default

  • Set a content security policy
  • Check server functions for cross-site requests

Rate limiting

Workers bindings

  • Limit sign-in attempts by IP
  • Limit changes per signed-in user

Scheduled cleanup

  • Expire old sessions and invites
  • Run cleanup on the same Worker as the app

UI components

  • Build screens with keyboard-accessible controls
  • Customize the shared design tokens

Automated tests

  • Exercise team permissions against local D1
  • Check webhook replay and out-of-order events

Marketing site

  • Publish a fast static site in your own brand
  • Includes a sitemap and Markdown pages

Get the TanStack Start source

Customize the app and use it for every product you own.

Compare licenses

How the app fits together.

Pages and server functions share a Worker. Follow a form submission from the React screen to the D1 query that saves it.

framework

TanStack Start + React 19

Render pages on the server and call typed server functions directly from the app.

contracts

TypeScript + Zod

Validate submitted data with shared schemas so forms and server functions agree on the input.

runtime

Cloudflare Workers

One Worker handles page requests, billing webhooks, and nightly cleanup.

database

D1 + Kysely

Query D1 with typed SQL. Atomic batches keep related writes together.

tests

Vitest

Run tests in the Workers runtime against local D1 with the same migrations you deploy.

Deploy to Cloudflare in one command.

Once your Cloudflare account and D1 database are configured, pnpm deploy:worker builds the app, applies its migrations, and publishes the Worker.

What runs on CloudflareWrangler

pieceruns onconfigured in
pagesWorkers, server-renderedsrc/routes
server functionsWorkers, same requestsrc/functions
auth + webhooksWorkers server routessrc/routes/api
cronCron Triggerswrangler.jsonc
databaseD1db/migrations
rate limitsWorkers bindingswrangler.jsonc
Verified live The reference app runs on Workers with a remote D1 database.Still to verify Deployment on a custom domain.

One license for every product you own.

Pay once for the source. Buy as an individual or cover your whole company, with no per-developer fees or runtime royalties.

TanStack Start

40% off

For a server-rendered web product on Cloudflare Workers and D1.

One-time price

$149Standard price $249

  • Full source for this edition
  • Your own branded project from the CLI
  • Credit toward All-access if you upgrade

First 50 licenses at this price. Then $199.

Buy TanStack Start

All-access

38% off

React + Hono, TanStack Start, and Expo.

One-time price

$249Standard price $399

  • Full source for all three editions
  • Private GitHub repo for releases and issues
  • Save $99 over buying Expo and TanStack Start separately

First 50 licenses at this price. Then $329.

Buy All-access

Both licenses include updates while we maintain and distribute your editions. Already own an edition? Use the one-time code in your license email for credit toward All-access, with at least $49 to pay. The license excludes client work and source redistribution. Read the full license.

FAQ

When should I choose TanStack Start?

Choose it when you want server-rendered pages and app logic on Cloudflare. React + Hono suits a dashboard with a separate API and Postgres.

What should I know about D1?

Cloudflare manages the database. D1 uses SQLite and supports atomic batches for related writes. If your product needs interactive transactions or Postgres extensions, choose React + Hono.

Which agent tools come with this edition?

You get repo instructions, an architecture guide, and tests that run against local D1. The evaluation harness and optional MCP server come with the React + Hono foundation.

How do I get the source after checkout?

Your receipt includes a license key. Run pnpm dlx superslate@latest my-app and enter the key. The tool verifies the release, applies your brand, and installs the project on your machine.

Can I use it for multiple products or client work?

One license covers one person or company and unlimited products that buyer owns. Your whole development team can use it. Separate companies need their own licenses, and client delivery is outside the license.

Is there a public site for my product?

Yes. Every edition includes an Astro marketing site that shares the app’s colors and typography. Change the sample copy, add your terms, and publish it separately on Cloudflare.

Can I get a refund after downloading the source?

Sales are final once source access is delivered, subject to your statutory rights. If delivery fails or you see a duplicate charge, contact support with your order ID.

Start your next app with one command.

Get your license key at checkout. Then run pnpm dlx superslate@latest my-app to create a project with your name on it.

Buy TanStack Start for $149Read the setup guide