SaaS Boilerplate

Ship your SaaS in a weekend

A complete, production-ready starter: Next.js on Cloudflare Pages, a Cloudflare Worker API, D1 database, KV sessions and Polar billing. No stubs, no placeholders.

Email + password auth

PBKDF2-hashed credentials, signed session cookies (HttpOnly, Secure, SameSite) and CSRF double-submit protection.

Cloudflare D1 + KV

SQLite at the edge with D1, KV-backed rate limiting and session storage, and a daily cron cleanup job.

Polar billing

Free and Pro plans, Stripe-quality checkout, customer portal and signature-verified webhooks.

Admin & audit

Role-based access, user management, plan overrides, impersonation and a full audit log.