GenerateSaaS

Introduction

Start building on the GenerateSaaS Next.js boilerplate with a shared Hono backend and flag-gated features.

GenerateSaaS is a production-ready SaaS boilerplate: this Next.js 16 frontend (apps/web-next) runs on a shared Hono backend (@repo/api), and every feature is gated by a flag in the config object in packages/config/src/index.ts. Pick the features you need, flip them on, ship.

Features

Each capability ships as a @repo/* package behind a config flag.

Auth & access

Billing

Messaging

Storage & data

Backend & platform

Content & growth

Integrations

AI & ops

Config-flag philosophy

The config object in packages/config/src/index.ts is the single source of truth for what your app exposes, read by both the frontend and the backend. Most features are a discriminated union { enabled: false } | { enabled: true; ... }; flip the flag and routes, sidebar entries, UI, and API surface appear or disappear together.

Flag stateBehavior
enabled: trueFeature renders, its routes mount, its @repo/* package runs.
enabled: falseUI hidden, routes skipped, backend paths short-circuit - no setup required, no dead code to remove.

Shipped defaults: nearly everything is on - payment (stripe), storage (s3), sms (twilio), email (smtp), newsletter (listmonk), captcha (turnstile), plus notifications, blog, apiKeys, apiDocs, and tenancy.multiTenant. The only feature off by default is waitlist (the lone top-level boolean shipped as false; signups create real accounts).

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 (e.g. umami, crisp). email has no off switch - it is always on; you only pick its provider. Swappable vendors (payment, storage, email, sms, newsletter, captcha) are chosen via the provider value plus matching env vars.

These docs are AI context

This /docs tree does double duty: it renders as the Fumadocs site (apps/docs, gated by config.docs.enabled) and ships into every generated project as AI-agent context. Cited config keys, @repo/* names, and file paths are real, so a coding agent can act on them directly.

Frequently asked questions

Can I use one feature without the others? Yes. Each capability is an independent @repo/* package behind its own config flag - enable only what you need.

What's the difference between config.payment and config.tenancy? config.payment toggles billing (Stripe or Polar); config.tenancy.multiTenant toggles organizations and team membership. They're independent flags.

Where do I change which features are on? Edit packages/config/src/index.ts. See Configuration for every flag and its options.

Getting started

On this page