Loading…
Loading…
Blazing fast SaaS scaffolding kit. Full-stack boilerplate built with Next.js 16, Hono.js, Cloudflare Workers, D1, Drizzle ORM, Razorpay, Google OAuth 2.0 with PKCE, NX Monorepo, and GitHub Actions CI/CD. Go from zero to production in days, not months.
One-time payment · every future update included, forever
No signup, no credit card — Core is MIT-licensed and free forever on GitHub.
SaaS LaunchKit Core is the same production-grade auth foundation — Google OAuth with PKCE, HMAC-SHA256 sessions, AES-256-GCM encrypted tokens, security headers, and a dashboard — free and MIT-licensed on GitHub. Clone it, run it locally, read every line. When you're ready to charge customers, upgrade to Pro for Razorpay payments, a product catalog, and a commercial license — no rewrite required.
You spend weeks on auth, payments, database setup, deployment configs, and testing — before writing a single line of your actual product. SaaS LaunchKit Pro is blazing fast scaffolding that eliminates that overhead. Production-grade architecture from the first commit. Go from zero to production in days, not months.
Not ideal for: Non-technical users who need a no-code solution, or projects that don't use React/Next.js.
Google OAuth 2.0 with PKCE (S256) — the gold standard for OAuth security. State parameter with constant-time XOR validation prevents CSRF. Raw tokens are never stored; every session is HMAC-SHA256 hashed. Sliding window renewal auto-extends sessions at <50% lifetime. Single-session enforcement means old sessions are deleted on new login.
Razorpay integration with order creation, signature verification (constant-time comparison), and webhook handling. Idempotent orders prevent double-charging. Amount mismatch detection catches tampered requests. Works for both authenticated and anonymous purchases.
Hono.js 4 running on Cloudflare Workers. Middleware stack: CORS with origin validation, body limit (1MB), structured JSON logging, security headers (HSTS, CSP, X-Frame-Options), KV-backed rate limiting per endpoint, and environment validation at startup.
Cloudflare D1 — serverless SQLite at the edge. Drizzle ORM for type-safe queries. 4 tables with foreign key enforcement, indexed columns, and D1 batch API for atomic operations. No SQL injection risk. Interactive migration runner included.
AES-256-GCM encryption with PBKDF2 key derivation (100K iterations, SHA-256). Random 12-byte IVs for every encryption. HMAC-SHA256 for session hashing and payment signature verification. Constant-time string comparison prevents timing attacks.
Three GitHub Actions workflows: CI (build, typecheck, lint, test, audit on every PR), auto-deploy web when apps/web/ changes, auto-deploy server when apps/server/ or any package changes. OpenNext handles Cloudflare Workers deployment.
OAuth 2.0 with Proof Key for Code Exchange. SHA-256 code challenges prevent authorization code interception.
Random 32-byte state with constant-time XOR comparison. Prevents cross-site request forgery.
Raw tokens never stored. Every token is HMAC-hashed before database lookup.
Refresh tokens encrypted with PBKDF2 (100K iterations). Random 12-byte IVs.
Old sessions deleted on new login. One active session per user.
Sessions auto-extend when <50% lifetime remaining. Seamless UX.
Session cookies: HttpOnly, Secure, SameSite=Lax, 7-day TTL.
Strict-Transport-Security with 2-year max-age and preload directive.
CSP set to default-src 'none' on API. Prevents XSS.
Clickjacking protection. Pages cannot be iframed.
Camera, microphone, geolocation all disabled. Minimal API surface.
Distributed rate limiting via Cloudflare KV. Per-endpoint limits.
Strict origin checking. Only configured domains allowed.
Request body limited. Prevents memory exhaustion.
Order input validated: length, amount > 0, integer, currency, email.
Internal errors return generic message. Stack traces never leak.
8 required env vars checked on first request. Missing vars return 500.
PRAGMA foreign_keys = ON. Cascading deletes.
Pending orders reused. Prevents duplicate charges.
Payment amount verified against database record.
XOR-based comparison prevents timing attacks.
strict-origin-when-cross-origin. Controls referrer leakage.
Origin header validation on POST /logout prevents forced logout attacks.
Unique UUID assigned per request. Enables distributed tracing and debugging.
| Method | Path | Description | Auth | Rate Limit |
|---|---|---|---|---|
| GET | /health | Health check with DB latency | — | — |
| GET | /auth/google | Initiates Google OAuth with PKCE | — | 10/min |
| GET | /auth/google/callback | OAuth callback — exchanges code, creates session | — | — |
| GET | /auth/me | Returns current user with session rotation | ✓ | 30/min |
| POST | /auth/logout | Destroys session and clears cookie | ✓ | — |
| POST | /auth/refresh | Refreshes Google OAuth tokens | ✓ | — |
| POST | /payments/create-order | Creates Razorpay order (idempotent) | — | 10/min |
| POST | /payments/verify-order | Verifies payment signature + amount | — | 20/min |
| POST | /payments/webhook | Razorpay webhook handler | — | — |
Google OAuth 2.0 helpers — PKCE, state validation, token exchange
Razorpay SDK — orders, signatures, webhooks, validation
HTTP utilities — fetch timeout, HMAC, encrypt/decrypt
Shared TypeScript types
Product catalog — centralized definitions
API route constants — type-safe URLs
User profiles from Google OAuth
OAuth accounts with encrypted tokens
HMAC-SHA256 hashed session tokens
Razorpay payment orders
apps/ ├── web/ # Next.js 16 frontend │ ├── src/app/ # App router (landing, dashboard) │ │ ├── dashboard/ # Protected dashboard │ │ └── page.tsx # Landing page │ ├── src/components/ # UI components │ │ ├── razorpay-button.tsx # Checkout component │ │ └── landing-page.tsx # Landing sections │ ├── src/config/branding.ts # Centralized branding │ ├── src/contexts/ # Auth context provider │ ├── middleware.ts # Auth guard (/dashboard) │ └── wrangler.jsonc # Cloudflare config │ ├── server/ # Hono.js API (Cloudflare Worker) │ ├── src/routes/ │ │ ├── auth.ts # OAuth + session management │ │ ├── payment.ts # Razorpay orders + webhooks │ │ └── health.ts # Health check + DB latency │ ├── src/db/ │ │ ├── schema.ts # Drizzle schema (4 tables) │ │ └── tables/ # users, accounts, sessions, orders │ ├── src/lib/ │ │ ├── crypto.ts # HMAC session hashing │ │ ├── logger.ts # Structured JSON logging │ │ └── origins.ts # CORS origin parsing │ └── wrangler.jsonc # D1 + KV bindings packages/ ├── auth/ # Google OAuth + PKCE ├── payments/ # Razorpay SDK ├── http/ # HMAC, encrypt/decrypt, fetch ├── types/ # Shared TypeScript types ├── products/ # Product catalog └── api-endpoints/ # API route constants .github/workflows/ ├── ci.yml # Build, typecheck, lint, test ├── deploy.web.yml # Auto-deploy frontend └── deploy.server.yml # Auto-deploy API
Clone the repo and install all dependencies.
Start the dev server. Hot reload. Zero config.
One command to Cloudflare. CI/CD handles the rest.
Start with Core for free. Upgrade to Pro the moment you need to charge customers. Either way, you're starting miles ahead of a blank repo.
| Feature | Core (Free) | Pro | Build from Scratch |
|---|---|---|---|
| Price | Free (MIT) | ₹1,499 one-time | $10,000+ (your time) |
| Time to production | ~1 day | Days | 3–6 months |
| Google OAuth + PKCE | ✓ | ✓ | Build yourself |
| Session management | ✓ HMAC-SHA256 | ✓ | Build yourself |
| Encrypted token storage | ✓ AES-256-GCM | ✓ | Build yourself |
| Razorpay payments + webhooks | ✓ | Build yourself | |
| Product catalog | ✓ | Build yourself | |
| DB tables | 3 (users, accounts, sessions) | 4 (+ orders) | Design yourself |
| Dashboard | Profile + security overview | Full settings, API keys, team mgmt | Build yourself |
| Lifetime updates | Community (GitHub) | ✓ Every future release, forever | N/A |
| Support | Community (GitHub Issues) | Direct — email + docs | N/A |
| License | MIT — use for anything | Commercial, unlimited projects | N/A |
This isn't a subscription. Pay ₹1,499 one time and your product key never expires — Next.js version bumps, new security hardening, bug fixes, and entirely new features all land in your dashboard at no extra cost. The changelog below moves fast; every one of those releases is already yours.
Start free. SaaS LaunchKit Core is MIT-licensed and lives on GitHub — Google OAuth, sessions, encrypted tokens, and a dashboard, no purchase required. Clone it, run it, see the code quality for yourself. When you need payments, product catalogs, or a commercial license, upgrade to Pro.
Core covers authentication end to end. Pro adds everything needed to charge people: Razorpay orders and webhooks, a product catalog, an orders table, a fuller dashboard, direct support, and a commercial license for client work. See the full comparison table above.
Yes. Pro is built on the same auth foundation as Core, so moving from one to the other is additive, not a rewrite. Buy Pro whenever you're ready to add payments.
After purchase, a lifetime-valid product key appears on your dashboard. Use it to download the full source code — every version, every update, unlimited times. You get 6 shared packages, 9 API endpoints, 4 database tables, 20+ security features, 3 CI/CD workflows, and complete documentation. You own the code.
Yes. Your product key never expires. Every future release — framework upgrades, new features, security patches — appears in your dashboard alongside every past version, at no extra cost. This is a one-time payment, not a subscription.
Yes. The commercial license allows unlimited personal and client projects. Build and deploy as many SaaS products as you want. No royalties.
Months of architecture decisions, security hardening (PKCE, HMAC-SHA256, AES-256-GCM, rate limiting, CSP headers), payment integration (Razorpay with webhooks), and deployment configs — all pre-built and tested. You start at 80%, not 0%.
Full documentation included: Architecture.md (599 lines), SETUP.md (8-step guide), LICENSES.md, and EULA.md template. For additional support, book a discovery call or email adnan@adnanbuilds.online.
100%. Every file is yours. Modify the branding config, database schema, API routes, UI components, or deployment targets. No vendor lock-in.
vs. $10,000+ and 3–6 months building it yourself
Instant access. Lifetime updates. No subscription.