Ship an AI SaaS with auth, billing, credits, and creations already wired
TanSaaS shows one clean way to structure public pages, AI tools, content collections, localized copy, and Cloudflare-ready product infrastructure.
- Stripe subscriptions and credit packs
- better-auth sessions and roles
- Replicate and fal execution adapters
Built with the stack teams trust
A small but complete implementation sample
The template favors clear ownership boundaries: route files stay thin, page content lives under src/pages, and cross-tool capability belongs in src/core.
Thin routes
Routes connect loaders, metadata, and page modules without owning large JSX compositions or marketing copy.
Auth boundaries
Dashboard and admin surfaces use better-auth sessions with role-aware guards and reusable account UI.
creation execution pipeline
Tool execution runs through typed provider inputs, webhooks, secure storage, and account-scoped execution records.
Billing and credits
Stripe subscriptions, one-time packs, expiring credit lots, and ledgers are modeled as replaceable product infrastructure.
Cloudflare-ready
Workers, R2, KV-friendly configuration, and build scripts keep deployment concerns visible but isolated.
Replaceable providers
Provider interfaces make it practical to swap AI, billing, storage, or email without reshaping the app shell.
Enough product surface to copy the pattern
TanSaaS is intentionally compact: it demonstrates the architecture without hiding the important files behind a framework maze.
Integrated product modules
Cloudflare Workers deployment target
Source code owned in your repository
Built for makers shipping real products
Teams use TanSaaS to skip boilerplate and focus on the features that differentiate their AI product.
“The credit system and Stripe webhooks were already wired. We added our fal models in an afternoon instead of two weeks of plumbing.”
ACAlex ChenFounder, VisualAI
“Finally a SaaS starter that treats Cloudflare Workers as first-class, not an afterthought.”
JLJordan LeeStaff engineer
“Auth, admin panel, and credit lots — all there on day one.”
SRSam RiveraIndie hacker
“Provider interfaces made swapping Replicate for fal trivial.”
MKMorgan KimML engineer
Simple, transparent pricing
Subscribe monthly for the best value, try a credit pack first, or add Volume+ when you need more.
Credits refresh monthly. Manage or cancel your subscription anytime.
Included models
- GPT
- Gemini
- Grok
- Seedream
- FLUX
- PrunaAI
- Up to 1,000 images
- Up to 3m 20s of video
- Up to 1,000 tool runs
- Standard generation queue for everyday creative work
- No watermarks on every download — clean, client-ready files
- Commercial license for ads, e-commerce, and client deliverables
- Private workspace with searchable creation history
- Email support when you need help
Secure checkout powered by Stripe
- Up to 2,500 images
- Up to 8m 20s of video
- Up to 2,500 tool runs
- Priority generation queue — faster turnaround when demand is high
- No watermarks on every download — clean, client-ready files
- Commercial license for ads, e-commerce, and client deliverables
- Private workspace with searchable creation history
- Priority email support with faster replies
Secure checkout powered by Stripe
- Up to 6,000 images
- Up to 20 min of video
- Up to 6,000 tool runs
- Highest-priority generation queue — first in line at peak hours
- No watermarks on every download — clean, client-ready files
- Commercial license for ads, e-commerce, and client deliverables
- Private workspace with searchable creation history
- Priority support for teams, agencies, and always-on workflows
Secure checkout powered by Stripe
Secure checkout by Stripe
Your card details are submitted directly to Stripe and never pass through or remain on our servers.
Payment methods for your region
Stripe shows eligible cards and local payment methods based on your region and device.
Only essential billing data
We receive only the payment result and billing details needed to activate and manage your purchase.
30-Day Money-Back Guarantee
Full refund before using paid credits; otherwise, a proportional refund for unused paid credits. Refund terms
Replaceable providers
Auth & admin guards
better-auth sessions with role-aware routes and an admin credit console.
Edge-fast delivery
Deploy on Cloudflare Workers with R2 storage, webhooks, and Redis caching at the edge.
Credit-gated creation executions
Run Replicate and fal workloads with expiring credit lots and webhook-safe billing.
Built for product teams
Dashboard, pricing, and admin flows included so you can validate monetization early.
Integrate with your favorite stack
Every module is optional and replaceable. Keep what fits, swap what doesn't without breaking your app shell.
Explore the dashboard“We went from blank repo to auth, billing, and creation executions in a weekend. The provider boundaries made it easy to plug in our own models.”
Supabase + Drizzle
Postgres schema, migrations, and typed queries ready for your domain models.
Stripe
Subscriptions, credit top-ups, webhooks, and customer portal hooks.
Replicate & fal
Swap AI providers through a shared execution ledger, webhooks, and credit gate.
Cloudflare Workers
Edge deployment with R2, Email, and a Wrangler-ready build pipeline.
Frequently asked questions
Answers about billing, credits, deployment, and customizing the TanSaaS template.
Start building your AI SaaS today
Clone the template, configure your providers, and ship subscriptions, credits, and AI workflows on Cloudflare Workers.