# Next\.js SaaS Starter

MIT\-licensed learning starter combining Next\.js, PostgreSQL, Drizzle, Stripe and shadcn/ui for a subscription application\.

ID: Q400 · Revision: 386

Type: software · License: MIT template; hosting, database and payment services remain separate\.[^license][^readme] · Status: active

Website: https://github.com/nextjs/saas-starter



Next\.js SaaS Starter is an open\-source template that combines authentication, subscription billing and a logged\-in dashboard with Next\.js, PostgreSQL, Drizzle and shadcn/ui\. The repository describes it as intentionally minimal and a learning resource\. It can give a vibecoder a concrete application skeleton to extend, but its example defaults and dependency choices need review before becoming production requirements\.[^readme][^package]

## An intentionally small application foundation

The repository gives developers an example subscription application to clone and modify rather than a hosted app\-building service\. Its documented setup includes database preparation and a seeded demonstration account and team\. Those seed values are development examples, not a production account plan\. The README's description as a learning resource is important: available pages and successful local startup do not establish that every operational feature needed by a real service has been built\.[^readme]

## Teams, membership and application records

The inspected Drizzle schema separates users, teams, team membership, invitations and activity logs\. Stripe customer and subscription identifiers are attached to teams\. That is a concrete starting data model for a team\-based subscription product, but it is not a universal tenant model: an application's intended ownership, membership and deletion behavior must be fitted to these records\. A different starter's user table cannot be assumed to import unchanged merely because both use PostgreSQL\.[^schema]

## What the authentication example actually does

The session implementation uses bcrypt helpers for passwords and signs a JWT with HS256\. It stores the result in a Secure, HttpOnly, SameSite=Lax cookie with a one\-day expiry\. Although a local variable calls it an encrypted session, the inspected operation is JWT signing; the source does not establish payload encryption\. Separate action wrappers perform input\-schema validation and authenticated\-user or team lookup\. These are implementation patterns, not a comprehensive security audit or proof of authorization for every future action\.[^session][^actions]

## Subscription defaults and webhook scope

The Stripe helper creates subscription\-mode checkout with card payment and an example fourteen\-day trial\. Its customer\-portal setup includes subscription changes and cancellation at the period end when creating a new portal configuration\. These are starter behaviors to review, not requirements for the product built on top\. The inspected webhook verifies Stripe's signature and handles subscription\-updated and subscription\-deleted events; other events fall through to logging\. An application's complete payment lifecycle must be evaluated against that actual handler instead of assuming a generic Stripe\-integration label covers every event\.[^stripe][^webhook]

## Version and maintenance decisions

The inspected main\-branch manifest pins Next\.js 15\.6\.0\-canary\.59 and React 19\.1\.0\. That is a specific dependency snapshot, not evidence that the starter follows the current stable framework release\. Its listed scripts cover development, builds and database tasks; no automated test command appears in that manifest\. This observation does not prove that every possible external test is absent, but it means a ready regression suite should not be inferred from the package scripts\. Dependency and test strategy remain adoption work\.[^package]

## Deployment and external services

The README's production path requires a production database connection, application URL, authentication secret and Stripe configuration including a production webhook\. It presents Vercel as the deployment route\. The MIT repository license grants code permissions subject to its notices, but does not supply infrastructure or payment\-service entitlements\. No deployment, account creation or transaction was performed for this article\.[^readme][^license]

## Substitution considerations

This starter can substitute for [Open SaaS](/opensaas) as the initial codebase for a subscription application when Next\.js and Drizzle are the desired stack\. Open SaaS instead uses Wasp with React, Node\.js and Prisma\. The overlap concerns starting with account, billing and dashboard patterns; it does not establish parity in all bundled features or a lossless migration between codebases\. An existing product would need deliberate adaptation of routes, data models, authentication and billing behavior\.[^readme][^schema][^open]

## Capabilities and substitutions

### Subscription app skeleton — supported

Provides sign\-in, a dashboard and Stripe integration as an intentionally minimal template\.[^readme]

Use case: Bootstrapping a code\-owned subscription application · Platforms: Next\.js development environment, Web applications · Region: Version, build and integration requirements apply

### Team data model — supported

Drizzle schema includes users, memberships, invitations, activity records and team\-level Stripe identifiers\.[^schema]

Use case: Bootstrapping a code\-owned subscription application · Platforms: Next\.js development environment, Web applications · Region: Version, build and integration requirements apply

### Complete billing lifecycle coverage — unknown

Inspected webhook route handles selected subscription events; complete application\-specific billing behavior is not established\.[^stripe][^webhook]

Use case: Bootstrapping a code\-owned subscription application · Platforms: Next\.js development environment, Web applications · Region: Version, build and integration requirements apply

### Stable\-only dependency baseline — unsupported

The inspected main\-branch manifest pins a Next\.js canary release rather than a stable\-only framework baseline\.[^package]

Use case: Bootstrapping a code\-owned subscription application · Platforms: Next\.js development environment, Web applications · Region: Version, build and integration requirements apply

### [Substitute for Open SaaS](/opensaas) — limited

Alternative starter for accounts, subscription checkout and dashboards when a Next\.js/Drizzle application is preferred to Wasp/Prisma\. Template source and schemas require adaptation\.[^readme][^schema][^open]

Use case: Bootstrapping a code\-owned subscription application · Platforms: Next\.js development environment, Web applications · Region: Version, build and integration requirements apply

## References

[^readme]: [Next\.js SaaS Starter README](<https://github.com/nextjs/saas-starter>) — Features, setup, production configuration and minimal learning\-resource scope (vendor; retrieved 2026-10-07T22:42:07Z)

[^license]: [Next\.js SaaS Starter license](<https://github.com/nextjs/saas-starter/blob/main/LICENSE>) — MIT terms (vendor; retrieved 2026-10-07T22:42:23Z)

[^package]: [Next\.js SaaS Starter package manifest](<https://github.com/nextjs/saas-starter/blob/main/package.json>) — Next 15\.6\.0\-canary\.59, React 19\.1 and scripts/dependencies (vendor; retrieved 2026-10-07T22:42:23Z)

[^session]: [Starter authentication session implementation](<https://github.com/nextjs/saas-starter/blob/main/lib/auth/session.ts>) — bcrypt password helpers; HS256 signed JWT and secure HttpOnly cookie (vendor; retrieved 2026-10-07T22:42:37Z)

[^actions]: [Starter action wrappers](<https://github.com/nextjs/saas-starter/blob/main/lib/auth/middleware.ts>) — Input\-schema validation, authenticated\-user and team wrappers (vendor; retrieved 2026-10-07T22:42:37Z)

[^schema]: [Starter database schema](<https://github.com/nextjs/saas-starter/blob/main/lib/db/schema.ts>) — Users, teams, membership, invitations, activity and Stripe identifiers (vendor; retrieved 2026-10-07T22:42:37Z)

[^stripe]: [Starter Stripe integration](<https://github.com/nextjs/saas-starter/blob/main/lib/payments/stripe.ts>) — Subscription checkout, trial defaults, customer portal and selected status handling (vendor; retrieved 2026-10-07T22:42:37Z)

[^webhook]: [Starter Stripe webhook route](<https://github.com/nextjs/saas-starter/blob/main/app/api/stripe/webhook/route.ts>) — Signature verification and subscription updated/deleted event cases (vendor; retrieved 2026-10-07T22:42:50Z)

[^open]: [Open SaaS introduction](<https://docs.opensaas.sh/>) — Wasp/React/Node/Prisma starter scope (vendor; retrieved 2026-10-07T22:40:29Z)

Source revision: https://substitutefor.net/entities/Q400?revision=386
