Production-Grade Edge SaaS Architecture
A production-ready SaaS starter on Cloudflare.
TanStack Start · Better Auth · Drizzle + D1 · shadcn/ui · i18n — typed end to end.
Cloudflare Worker SprintOn Track
2 of 4 tasks completed
ListBoardTimeline
Harden multi-tenant RBAC & org boundaries
Completed
Today
Deploy Cloudflare D1 distributed edge database
On Track
Tomorrow
Activate direct-to-R2 presigned media pipeline
In Progress
Sep 28
Integrate Midtrans / DOKU payment gateways & API keys
Completed
Done
Edge Latency
< 15ms global TTFB
Data Storage
Cloudflare D1 & R2
Design System
@shadcn/lint Enforced
What's inside
01
Auth & RBAC
Better Auth with organizations, roles, and platform admins.
02
Type-safe data
Drizzle ORM on Cloudflare D1 with shared queries and zod schemas.
03
i18n-ready
react-i18next with a no-hardcoded-strings lint rule.
04
Edge-native
TanStack Start on Cloudflare Workers with health checks and CSP.
05
Background jobs & API
Cloudflare Workflows plus a typed REST/OpenAPI surface.
06
DX built in
Tests, Storybook, pre-commit hooks, seed + env preflight scripts.
Get started
1
Step 1
Copy .dev.vars.example to .dev.vars and run pnpm check:env
2
Step 2
Run migrations: pnpm --filter @repo/data-ops drizzle:migrate
3
Step 3
Seed a master admin + demo data: pnpm seed
4
Step 4
Start the app: pnpm dev