Next.js SaaS Starter
Auth, teams and Stripe subscriptions, maintained by Vercel
A reference SaaS starter using the Next.js App Router, Postgres with Drizzle, cookie based auth and Stripe Checkout with a customer portal. It covers the parts of a subscription product that are tedious rather than interesting: teams, roles, invitations and an activity log.
Best for when
- the product bills teams rather than individuals
- you want current Next.js patterns written correctly
- Stripe is a fit for the markets you sell into
Watch out for
- Stripe only, which is a real constraint in markets it does not serve well
- the marketing pages are placeholders, so the front of the site is still yours to build
- it is a reference implementation, so operational concerns like email deliverability are left to you
Install
Clone
git clone https://github.com/nextjs/saas-starterThe parts worth having
Team membership with roles and invitations is more work than it looks, and getting it wrong is a security problem rather than a bug. Having a correct implementation to read is worth more than the time it saves.
The Stripe integration covers Checkout and the customer portal, which between them handle the payment flows a subscription product actually needs, including the plan changes people forget to build.
Read it as a reference
It is a demonstration of current Next.js patterns as much as a product starter. Server actions, middleware and data access are written the way the framework team intends, which makes it a useful thing to read even if you do not adopt it.
Stripe is the only payment path, and that is the constraint to check first. If your customers are in a market Stripe does not serve well, the billing layer is the part you will be rewriting.