Repolode
FlareStarter

FlareStarter/flarestarter

An edge-native SaaS starter on TanStack Start and Cloudflare Workers, with auth, Stripe billing, email, i18n and an admin console.

Stars
460
Forks
84
Open issues
2
Last commit
3 months ago

What is it?

FlareStarter is a full-stack starter template for building SaaS products that run on Cloudflare Workers. It uses TanStack Start with React 19 for the frontend and server functions, and stores data in Cloudflare D1 (SQLite) through Drizzle ORM, with KV and R2 available for caching and file storage.

The template covers the common pieces a SaaS needs before any product logic: email and password sign-up with verification, Google and GitHub OAuth via better-auth, and Stripe subscriptions, one-time lifetime purchases and a customer portal. Email is sent through Resend, with messages logged to the console when no API key is set. Locale routing supports English and Chinese, along with per-locale sitemaps, hreflang tags and an admin console with roles, bans and impersonation.

Optional integrations such as Turnstile, Sentry and Cloudflare Web Analytics are turned off when their keys are left blank, so local development works without external accounts. Vitest covers both Node unit tests and Workers/D1 integration tests.

Key features

  • 01Email and password auth with verification, plus Google and GitHub OAuth via better-auth.
  • 02Stripe subscriptions, one-time lifetime purchase, customer portal and plan-gated routes.
  • 03D1 database with Drizzle ORM and migrations, with KV and R2 wired in.
  • 04Path-based English and Chinese routing with per-locale SEO tags.
  • 05Admin console with user roles, bans, impersonation and a stats dashboard.
  • 06Waitlist, changelog, feedback and sponsor pages included as example feature slices.

Use cases

  • Launching a subscription SaaS product on Cloudflare Workers with billing already wired up.
  • Building a bilingual English and Chinese product with localized pages and SEO.
  • Studying a complete TanStack Start and Cloudflare D1 project structure as a reference.
  • Starting a side project at near-zero hosting cost on Cloudflare's free tiers.

Quick start

  1. 1

    Install dependencies

    pnpm install
  2. 2

    Create your local Wrangler config from the template

    cp wrangler.example.jsonc wrangler.jsonc
  3. 3

    Create the local environment file from the example

    cp .dev.vars.example .dev.vars
  4. 4

    Create the local D1 schema and run the dev server

    pnpm db:migrate:local && pnpm dev

Things to know

  • Requires a Cloudflare account and relies on Cloudflare Workers, D1 and KV.
  • Requires Node.js 22 or newer and pnpm 9 or newer.

In collections

Topics

FAQ

What is flarestarter?
An edge-native SaaS starter on TanStack Start and Cloudflare Workers, with auth, Stripe billing, email, i18n and an admin console. FlareStarter is a full-stack starter template for building SaaS products that run on Cloudflare Workers. It uses TanStack Start with React 19 for the frontend and server functions, and stores data in Cloudflare D1 (SQLite) through Drizzle ORM, with KV and R2 available for caching and file storage.
Is flarestarter free to use? What license does it have?
flarestarter is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is flarestarter still maintained?
Updated within 6 months. The last commit to flarestarter was on Aug 7, 2026.
What can I use flarestarter for?
Launching a subscription SaaS product on Cloudflare Workers with billing already wired up. Building a bilingual English and Chinese product with localized pages and SEO. Studying a complete TanStack Start and Cloudflare D1 project structure as a reference. Starting a side project at near-zero hosting cost on Cloudflare's free tiers.
How do I install flarestarter?
Install dependencies: pnpm install Create your local Wrangler config from the template: cp wrangler.example.jsonc wrangler.jsonc Create the local environment file from the example: cp .dev.vars.example .dev.vars Create the local D1 schema and run the dev server: pnpm db:migrate:local && pnpm dev
Where can I get flarestarter?
The source code and installation instructions are on GitHub: https://github.com/FlareStarter/flarestarter

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects