The open-source (MIT) Cloudflare SaaS starter — TanStack Start + Hono for your product, paired with an independent Astro site for SEO and GEO.
Ship accounts, Stripe billing, integer credits, R2 storage, Workers AI, and D1 or PostgreSQL on Cloudflare Workers — with a separate Astro content site that publishes and deploys without touching your app. An open-source alternative to commercial TanStack SaaS boilerplates like TanStarter.
Quickstart · Live SaaS Demo · Live Guides Demo · Comparison · Documentation
SaaS App (apps/saas) |
Content Site (apps/content) |
|---|---|
![]() |
![]() |
Requires Node 22.23.4+, Git, and pnpm 12.16.1 (npm i -g [email protected]).
pnpm create sextant my-saas --yes
cd my-saas
pnpm dev:saas # SaaS app at http://localhost:3000
pnpm dev:content # Content site at http://localhost:4321 (run in a second terminal)Local startup installs dependencies, generates a fresh auth secret, applies local D1 migrations, and uses a built-in test email provider — no Cloudflare account or external API keys required to explore locally.
Pick a focused starting preset when creating your project:
pnpm create sextant my-tool --preset free-tool # Public tools + waitlist, minimal backend
pnpm create sextant my-app --preset subscription-saas # Auth, Stripe subscriptions, files, blog
pnpm create sextant my-ai --preset ai-credit # Full AI credit packs + Workers AI playgroundSee Project Creation for --dry-run, --resume, and custom branding flags.
Contributor note: A plain
git cloneretains the template's demo configuration and deployment identifiers. Always usepnpm create sextantwhen starting a real product.
- Open source & MIT-licensed: Full source code for auth, Stripe billing, credit ledgers, R2 storage, Workers AI, and deployment tooling — free under the MIT license, with zero vendor lock-in.
- Product and content evolve independently:
apps/saas(TanStack Start + Hono) owns accounts, billing, and private data.apps/content(Astro) owns guides, sitemaps,llms.txt, RSS, and Pagefind search. Deploy either Worker without risking the other. - D1 or PostgreSQL (Hyperdrive): Choose Cloudflare D1 (SQLite) for zero-ops edge simplicity or PostgreSQL via Hyperdrive behind one typed
AppStorecontract. - Built for real Cloudflare Workers operations: Signature-verified & deduplicated Stripe webhooks, integer minor-unit credit ledgers, atomic R2 quota enforcement, durable Queues for email/AI tasks, and reviewed upstream template updates (
pnpm project:update). - Optional growth stack: Local content and zero tracking by default. Enable Ghost CMS import, consent-gated PostHog conversion tracking, Chatwoot/Crisp chat, or Cloudflare/GA4/Plausible/Umami analytics via config.
| Starter | License / Price | Stack | Content & SEO | Database | Key Strength |
|---|---|---|---|---|---|
| Sextant | MIT (Free) | TanStack Start + Hono + Astro | Dedicated Astro Worker (guides, Pagefind, RSS, llms.txt) |
D1 or PostgreSQL (Hyperdrive) | Decoupled SEO/SaaS Workers + dual DB adapters + MIT license |
| TanStarter | Commercial ($199) | TanStack Start | Content Collections inside SaaS app | D1 (Drizzle) | Polished commercial kit with AI & multi-payment integrations |
| Saasflare | MIT (Free) | TanStack Web + Hono API | Single web app | D1 (oRPC + Alchemy) | Separate Web and API Workers |
| Makerkit Cloudflare | Commercial | React / Vite on Cloudflare | Built-in marketing pages | PostgreSQL (Hyperdrive) | Team workspaces & organizations out of the box |
| Open SaaS | MIT (Free) | Wasp (React + Node/Prisma) | Integrated blog & docs | PostgreSQL (Node server) | Mature batteries-included Wasp ecosystem (non-Workers) |
Read the sourced breakdown in the starter selection guide and TanStarter alignment notes.
| Area | Capabilities | Guide |
|---|---|---|
| Authentication & Admin | Better Auth (email/password, Google & GitHub OAuth), email verification, password reset, private profile avatars, role/ban/session admin panel | Development |
| Billing & Credits | Stripe subscriptions, credit packs, customer portal, signature-verified & deduplicated webhooks, integer credit ledger | Commerce |
| Databases & Storage | Drizzle ORM on D1 or PostgreSQL (Hyperdrive), private R2 uploads with per-plan atomic quotas and cursor pagination | Storage |
| AI Playground | Durable owner-scoped jobs with atomic credit reservations for text, translation, taglines, speech, image generation/editing, and web search | Capabilities |
| SEO / GEO Content Site | Static Astro pages, validated publishing lifecycle, automatic 301 aliases, RSS, sitemap.xml, robots.txt, llms.txt, and Pagefind search |
SEO and GEO |
| Operations & CLI | Durable email/job queues, Cron recovery, pnpm deploy:setup, pnpm project:launch, and 3-way reviewed pnpm project:update |
Operations |
| Optional Growth | Consent-controlled PostHog conversion handoff, build-time Ghost CMS import, Chatwoot/Crisp chat, IndexNow proofs | Growth Roadmap |
flowchart LR
Reader[Readers and crawlers] --> Content["Content Worker · Astro"]
Content -->|Product CTAs| SaaS["SaaS Worker · TanStack Start + Hono"]
User[App users] --> SaaS
Shared["Shared config, SEO & analytics packages"] -.-> Content
Shared -.-> SaaS
SaaS --> DB["D1 or PostgreSQL via Hyperdrive"]
SaaS --> Services["R2 · KV · Queues · Workers AI"]
Ghost["Optional Ghost CMS"] -.->|Build-time import| Content
apps/
content/ Astro content site, guides, Pagefind search, sitemap & llms.txt
saas/ TanStack Start UI, Hono API, Better Auth, Stripe, R2 & Workers AI
packages/
site-config/ Shared brand identity, navigation, SEO defaults & capability flags
seo/ Sitemap, robots, JSON-LD & llms.txt generators
analytics/ Browser analytics & consent-gated cross-origin handoff
email/ Resend / Cloudflare Email wrapper & escaped templates
deploy-cli/ project:create, deploy:setup, project:launch & project:update
create-sextant/ Published npm CLI (`pnpm create sextant`)
deploy/ Deployment verification & discovery audit helpers
content-trigger/ Optional signed Ghost webhook Worker
guides-search/ Optional hostname-scoped guide search Worker
monitor/ Optional Durable Object alarm health monitor
Each app builds and deploys independently. See Architecture and Boundaries for dependency rules enforced by pnpm check:boundaries.
- Brand & capabilities: Edit
packages/site-config/src/site.tsfor your app name, tagline, domains, navigation, and enabled modules. - Plans & content: Define Stripe pricing and credit packs in
apps/saas/src/config/commerce.ts, and author guides inapps/content/src/data/publications.ts(or connect Ghost). - Provision & deploy: Follow Deployment Profiles and Launch Configuration to provision Cloudflare resources, set custom domains, and switch Stripe from test mode to live mode.
CI runs formatting, ESLint, license verification, workspace import-boundary checks, TypeScript checks, Vitest unit tests, Worker integration tests (D1 & PostgreSQL), and Playwright E2E acceptance suites.
pnpm format:check && pnpm lint && pnpm check:boundaries && pnpm typecheck && pnpm test && pnpm buildSee Documentation Index for all guides and docs/archive/ for historical verification records.
Contributions are welcome — start with CONTRIBUTING.md and open an issue to align on scope before sending a PR. See SUPPORT.md for help and SECURITY.md for vulnerability reports.
Licensed under MIT. Third-party dependency notices are tracked in THIRD_PARTY_NOTICES.md.

