For the complete documentation index, see llms.txt. Prefer markdown by appending.mdto documentation URLs or sendingAccept: text/markdown.
Tech stack
Explore the libraries behind Edge Kit and find the guides for TanStack Start server functions, Cloudflare bindings, D1, authentication, and Stripe.
TanStack Start
TanStack Start is the full-stack framework used as the foundation of the kit, with React. It's built on TanStack Router - file routes, server functions, and SSR stay in one codebase. We also leverage other libraries from this ecosystem (e.g. Query, AI, Store and more) to make the integrations with other services easier.
Use server functions for the kit's data-access pattern and project structure to locate routes and modules.
Vite
Vite builds and serves the app. The Cloudflare plugin runs the Worker during local development, so your environment uses the same runtime you deploy.
Follow local development to start the app and configure remote bindings.
Vite
vite.dev
Cloudflare
The app is built on Cloudflare services. Wrangler defines the bindings in wrangler.jsonc and applies them locally and in production orchestrating the different services:
- D1 for the database and its local replica
- KV for cached content and application settings, using the included key-value helpers
- R2 for file uploads, storage, and delivery
- Queues for typed background jobs, delayed delivery, and retries
- Email Service for sending rendered email templates
- Turnstile and Workers rate limits for auth abuse controls
- Workers AI for AI inference and streaming
- Flagship for the remote feature flag
- Workers observability and Web Analytics for logs, traces, and traffic
Follow binding configuration to connect these services to your account and deployment to provision production resources. The included adapters give your features a starting point for data, caching, uploads, and background work.
Cloudflare
developers.cloudflare.com
Better Auth
Better Auth handles password accounts with email verification, anonymous sessions, and Google, GitHub, and Cloudflare OAuth. Follow authentication for the shipped flows and their server authorization boundaries.
Better Auth
better-auth.com
Stripe
Checkout, payments subscriptions, and customer management go through Stripe, connected with the authentication flows. Plan catalog and billing helpers live next to auth so a purchase can unlock the same session the rest of the app reads.
Use billing for plan access and subscriptions for checkout, webhooks, and the customer portal.
Stripe
stripe.com
Tailwind CSS
Tailwind CSS is a utility-first CSS framework that helps you build custom designs without writing any CSS. Components come from Kumo, Cloudflare's React library built on Base UI.
React Email
Mail is rendered with React Email and sent through the Email Service binding. Edit and preview the email templates, then configure the sending path. The integration supports direct delivery and queued workflows, with a welcome message demonstrating delayed sending.
AI
The AI foundation uses TanStack AI with the Cloudflare adapter and AI binding for model calls and streaming. Its React client manages messages with useChat, and Streamdown renders the responses. The example connects these pieces so you can build your own AI interface.
The shipped model uses AI Gateway, so binding access alone does not configure inference. Follow AI setup for credentials, persistence, and access controls, or the model-switching recipe to change the adapter configuration. Explore AI Kit for more AI features and application templates.
Drizzle
Drizzle is the ORM on top of D1. The database client uses the DB binding, schemas stay in TypeScript, and migrations are applied with Wrangler.
Use schema changes to add tables beside the generated auth file, and migrations to apply reviewed SQL locally and remotely.
How is this guide?
Last updated on
Introduction
A standalone SaaS starter for Cloudflare, with TanStack Start, authentication, billing, data, email, and an AI app foundation ready to customize.
CLI
Bootstrap Edge Kit with @turbostarter/cli. Clone the Worker, write Wrangler bindings, seed local D1, then keep the repo in sync with project update.



