For the complete documentation index, see llms.txt. Prefer markdown by appending.mdto documentation URLs or sendingAccept: text/markdown.
Introduction
A standalone SaaS starter for Cloudflare, with TanStack Start, authentication, billing, data, email, and an AI app foundation ready to customize.
Welcome to the TurboStarter Edge Kit documentation. Edge Kit gives you a complete starting point for a SaaS product on Cloudflare, from the public website to customer accounts, payments, and the application dashboard.
What's inside?
TanStack Start provides full-stack React for your SaaS - pages, routing, and server logic in one application. Cloudflare Workers runs that application globally and connects it to managed database, storage, email, queue, and AI services.
Your app deploys as one Worker, with the interface and server logic in the same project. The architecture guide explains how those pieces fit together, and the tech stack introduces the libraries behind them.
Demo
Explore the marketing site, sign-in, account settings, billing, and streaming AI example in the live demo.
Principles
Edge Kit follows the same principles as the rest of TurboStarter:
- Simplicity: familiar React patterns, with the interface and server logic in one application.
- Few dependencies: a focused set of libraries with clear responsibilities, keeping the stack easier to understand and maintain.
- Performance: lightweight components, server rendering, and a runtime designed for global delivery.
Features
Edge Kit connects the infrastructure and customer flows that most SaaS products need. Each guide explains what's included and how to adapt it to your product.
Authentication
Email and password
Registration, email verification, sign-in, and password recovery with Better Auth.
Social sign-in
Google, GitHub, and Cloudflare integrations for familiar sign-in options.
Anonymous access
A session-based starting point for experiences customers can try before registering.
Account management
Profile details, avatars, linked accounts, security settings, and active sessions.
Billing
Subscriptions and checkout
Stripe checkout, recurring plans, monthly and yearly prices, and optional trials.
Plans and discounts
A shared catalog for your pricing interface, plan features, and promotion codes.
Customer portal
Billing settings and Stripe's hosted portal for customer subscription management.
Paid feature access
Webhook-synchronized subscriptions and server-side checks for plan-based access.
Database
Cloudflare D1
A managed SQL database connected to authentication, billing, and your application.
Drizzle ORM
Type-safe schemas and queries, with migrations for local and production databases.
Server
Server functions
Type-safe TanStack Start operations alongside HTTP endpoints for files, streams, and webhooks.
Protected calls
Reusable session checks and input validation for your product's private operations.
Data fetching
TanStack Query integration for page data, client caching, mutations, and loading states.
KV caching
Connected key-value storage for reusable server values, with expiration and invalidation guidance.
Storage
File uploads
Cloudflare R2 infrastructure and upload validation to build on for images, files, and documents.
Private file access
Authenticated delivery, ownership checks, and deletion patterns for customer-owned files.
AI
AI app foundation
Model access, streaming, conversation state, and progressive Markdown rendering with TanStack AI.
Model integration
Cloudflare AI Gateway and Workers AI options behind a shared streaming experience.
Internationalization
Localized experience
English and Spanish, localized routes, language detection, and a language switcher.
Type-safe translations
Paraglide catalogs for interface copy and emails, ready to extend with your own languages.
Emails
React Email templates
Localized account and marketing templates with shared branding and a preview workflow.
Cloudflare delivery
Email sending connected to your Worker, ready for account flows and product notifications.
Marketing and content
Marketing website
Landing sections, pricing, and a contact form connected to your customer application.
Blog and legal pages
Localized MDX content with validated metadata and typed Content Collections.
SEO and sharing
Page metadata, canonical URLs, social previews, sitemaps, and crawler configuration.
Web analytics
Cloudflare Web Analytics integration for understanding traffic to your public site.
Customization
Branding
Your product identity across the public website, application, and email templates.
Themes and styling
Tailwind CSS, shared design tokens, typography, and light and dark mode.
UI components
Kumo React components and reusable views for building a consistent interface.
Forms and validation
TanStack Form, Zod validation, accessible feedback, and translated submission states.
Feature flags
Typed flags
Flagship evaluation with typed values and fallbacks for unavailable remote configuration.
Gradual rollouts
Targeting guidance for introducing a feature to selected customers before a wider release.
Background jobs
Cloudflare Queues
Typed jobs and Worker processing for tasks that can continue after a request finishes.
Delays and retries
Delayed delivery, retry handling, and processing logs for background work.
Security and monitoring
Bot protection
Turnstile for protected forms and Cloudflare rate limiting connected to authentication.
Request logs and traces
Request identifiers, Worker logs, source maps, and queue diagnostics for investigating failures.
Testing
Unit tests
Vitest for application logic and tests that exercise Worker bindings.
End-to-end tests
Playwright for real customer journeys across Chromium, Firefox, and WebKit.
Deployment
Cloudflare Workers
One application deployment with connected database, storage, email, queues, and AI services.
GitHub integration
Automatic deployments from your repository and preview deployments for pull requests.
Building blocks
You own the code. Use the complete starting product or adapt the pieces your customers need. Authentication, billing, data, email, and UI are already connected, giving your own features a foundation to build on.
- Your design: shared styles and components carry your branding across the website, application, and emails.
- Reusable infrastructure: the same account, storage, and server patterns can support new product workflows.
- Custom features: extend the existing structure with your own pages, data, and business rules.
- Ongoing maintenance: shared conventions and a documented update workflow help you maintain the project as it grows.
The customization guides cover the look and feel, the feature recipe connects a new workflow, and the update guide explains how to bring in future kit improvements.
Other kits
Additional platforms
Core Kit combines a Next.js web app, Expo mobile apps, and browser extensions around a shared backend. Its guides cover that stack when your product needs those platforms.
Scope of this documentation
These guides cover the TanStack Start and Cloudflare application included in Edge Kit: configuration, local development, customization, product features, testing, and deployment. You can follow them from your first setup through production without reading another kit's documentation.
The focus is on how the pieces work together in your app. Each guide links to the underlying libraries' official documentation for their full APIs and additional options. Your Cloudflare account and connected provider accounts supply the resources and credentials for your deployment.
Explore the tech stack for an overview of the tools, the FAQ for common questions, and extras for supporting tools and community resources.
Setup
- Create a project with the CLI or clone the repository.
- Complete local development to connect configuration and prepare the database.
- Apply your branding and design, then build your first feature.
- Follow deployment to connect production resources and publish your app.
Before launch, work through the production checklist to verify the customer journeys with your own domain, accounts, and offer.
Support
The troubleshooting guides cover common setup and deployment issues. For help with your project, feedback, or product updates, connect with us:
- Private Discord community, included with your purchase.
- Product updates on X.
- Repositories and issues on GitHub.
- Email support.
Tech stack
Explore the libraries behind Edge Kit and find the guides for TanStack Start server functions, Cloudflare bindings, D1, authentication, and Stripe.
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.
Extras
AI-assisted development tools, project conventions, and private community access included with Edge Kit.
FAQ
Find quick answers about Edge Kit's runtime, auth scope, database, server boundaries, and development, with links to the practical guides.
How is this guide?
Last updated on