Introduction
Production-ready SaaS boilerplate - a Next.js frontend on a shared Hono backend, with every feature gated by a flag in @repo/config.
GenerateSaaS is a production-ready SaaS boilerplate: a Next.js 16 frontend (apps/web) on a shared Hono backend (@repo/api), with every feature gated by a flag in the config object (packages/config/src/index.ts). These pages ship inside your project as AI-agent context, so every config key, package name, and path cited here is real.
Features
Each capability is a @repo/* package behind its own config flag.
Auth & access
Authentication
Email/password, social OAuth, 2FA, passkeys via Better Auth.
Projects
Per-account or per-organization project switching - config.projects.
API Keys
Per-user keys for programmatic access, rate-limited by plan.
CAPTCHA
Cloudflare Turnstile bot protection on auth and public forms.
Billing
Payments
Stripe or Polar subscriptions - config.payment.
Plans & Pricing
Tiers, prices, and currencies in pricingConfig.
Credits
Prepaid, metered usage balances on top of billing.
One-time Products
Single-purchase items with ownership checks.
Organizations
Multi-tenant teams - config.tenancy.multiTenant.
Messaging
Transactional and marketing mail - config.email.
Newsletter
Daily sync of opted-in users to Listmonk or Resend.
SMS
Twilio or Amazon SNS text messaging - config.sms.
Notifications
In-app and email channels - config.notifications.
Admin Notifications
Operator alerts to Discord, Slack, or Telegram.
Storage & data
Storage
S3-compatible file uploads - config.storage.
Database
Drizzle + Postgres schema, migrations, and auth tables.
Caching
Redis-backed cache, rate-limit store, and mutex.
Backend & platform
API
Typed Hono RPC backend - config.apiDocs serves Scalar docs.
Background Jobs
Inngest functions for billing and lifecycle.
i18n
Localized routing and messages via next-intl.
Performance Monitoring
Per-request Hono timing - method, path, status, duration.
Error Reporting
Sentry or PostHog on every surface - config.observability.
Content & growth
Content sections
Blog, alternatives roundups and the compare engine - config.content.
Marketing & SEO
Prerendered landing, structured data, sitemap, robots.
Waitlist
Pre-launch signup capture - config.waitlist.
Onboarding
Post-signup profile step and welcome email sequence.
Banners
Site-wide and dashboard announcement bars - config.banner.
Integrations
Analytics
Eight providers - Google Analytics, PostHog, Umami, Plausible, OpenPanel, DataFast, Ahrefs, Vercel - config.analytics.
Support Chat
Crisp or Chatwoot live-chat widget - config.support.
Affiliate Tracking
Referral attribution and payouts.
Cookie Consent
GDPR-aware consent banner gating third parties.
AI & ops
AI
Chat, automated runs, and capabilities - config.ai.
Audit Logs
Activity trail via @repo/audit.
CLI
Scaffold, update, eject, and license your project.
Desktop app
Cross-platform desktop app with device sign-in and AI agents.
Mobile app
Cross-platform iOS and Android app with push, universal links, and store billing.
Dashboard & Settings
Authenticated dashboard with flag-gated settings and admin.
Deployment
Vercel, Docker, and self-hosting targets.
Config flags gate everything
Most features are a discriminated union - { enabled: false } | { enabled: true; ... } - read by both the frontend and the backend, so flipping one flag moves routes, sidebar entries, UI, and API surface together.
| Flag state | Behavior |
|---|---|
enabled: true | Feature renders, its routes mount, its @repo/* package runs. |
enabled: false | UI hidden, routes skipped, backend paths short-circuit - no setup needed, no dead code to remove. |
On by default: storage (s3), notifications, adminNotifications, apiKeys, apiDocs, performanceMonitor. Set from your init answers: payment, email, observability, tenancy.multiTenant, docs, desktop, mobile, ai, revenueSharing. Off by default: waitlist, sms, newsletter, captcha, contentApi, mcpServer - set their env vars and flip the flag to turn one on.
Not every flag is enabled-shaped. apiDocs and waitlist are plain booleans, tenancy toggles on multiTenant, and analytics / support / affiliate activate by the presence of a provider key. email has no off switch - you only pick its provider.