Built on Next.js, integrating Convex database, AuthKit authentication, and Stripe payments
next-b2b-starter-kit — Next.js SaaS Template
By workos
WorkOS's open-source Next.js B2B SaaS starter kit integrates Stripe billing, Convex database, and AuthKit authentication, with built-in marketing, pricing, dashboard, and product pages.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Includes four main pages: marketing homepage, pricing page, admin dashboard, and product page
Built-in role-based access control; admins can manage users, configure SSO and billing
Provides audit logs, accessible only with an Enterprise subscription in the default example
Synchronizes data to Convex via webhooks; entitlement synchronization is handled by WorkOS's Stripe integration
Template Details
This is a Next.js starter kit for B2B SaaS scenarios, maintained by WorkOS and licensed under MIT. It connects marketing pages, pricing pages, an admin dashboard, and product pages into a complete application flow: visitors first browse the homepage and pricing page, then during sign-up an organization is created and linked to a Stripe customer. After that, admins enter the dashboard to manage users, configure SSO and billing, and view audit logs, while non-admins are redirected to the product page.
Functionally, it covers role-based access control, audit logs, billing, and data synchronization to Convex via webhooks. Entitlement synchronization is handled by WorkOS's Stripe integration; the application side only needs to refresh the session after checkout so that new entitlements immediately appear in the access token, so there is no need to write a separate Stripe webhook for entitlements.
Before use, you need to have your own accounts for three external services: Convex, Stripe, and WorkOS, and run the setup script provided in the repository to complete initialization. When testing Stripe checkout locally or in a demo environment, use test card numbers such as 4242 4242 4242 4242. Before deploying to production, replace them with production API keys for Stripe and WorkOS.
Is it right for your project?
Use Cases
- Quickly build the page skeleton and account flow for a B2B SaaS product
- Demonstrate organization-level sign-up, Stripe subscription checkout, and entitlement refresh
- Provide admins with entry points for user management, SSO configuration, and audit logs
- Serve as a sample project for learning Next.js, Convex, WorkOS, and Stripe integration
Suitable For
- Developers who need a B2B SaaS starter template
- Teams already using or planning to use WorkOS AuthKit
- Projects that want to use Convex as the backend database
- Applications that need to integrate Stripe subscription billing
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
You need to prepare accounts for three services yourself: Convex, Stripe, and WorkOS
- 2
After cloning the repository, install dependencies with pnpm install, then run pnpm run setup to initialize
- 3
Start the development server with pnpm run dev
- 4
For local or demo environment testing of Stripe checkout, you can use test card number 4242 4242 4242 4242
- 5
Before deploying to production, replace with production API keys for Stripe and WorkOS
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not mean external services or third-party assets are free.
Must comply with when using
- You are allowed to use, modify, commercially use, and distribute the code of this version for free.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Using this template requires you to register and configure three third-party service accounts yourself: Convex, Stripe, and WorkOS; otherwise initialization and operation cannot be completed.
- Before deploying to production, you must replace with production API keys for Stripe and WorkOS, involving credential configuration for external paid services.
- In the default example, the audit log feature is accessible only after subscribing to the Enterprise plan, which is a feature limitation tied to a paid subscription.
- Demo images, fonts, icons, and other third-party assets need to be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domain, hosting, database, payment, or AI may incur additional charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
You'll need a [Convex](https://www.convex.dev/) account, a [Stripe](https://stripe.com/) account and a [WorkOS](https://workos.com/) account.
Original README
Remember to use your production API keys for both Stripe and WorkOS before deploying to production.
Original README
https://github.com/workos/next-b2b-starter-kit/blob/main/LICENSEhttps://github.com/workos/next-b2b-starter-kit/blob/main/README.mdNote that in the default example, audit logs are only accessible when subscribed to the "Enterprise" plan.
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-01. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 92 / 100
- Technologies
- Next.js · React
- Website type
- SaaS · Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-09-22
- Screenshot last checked
- 2026-10-01
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: 349f9204fb84241d4bb5a224150da46eb4f7901df755aa58ce19aa0dbaf45a37
2026-10-01T00:48:47.945Z
Source file / repository<p align="center">
<img src="./public/splash_page.jpeg" alt="Screenshot of splash page"/>
<h1 align="center">Next.js B2B Starter Kit</h1>
</p>
<p align="center">
A fully functional B2B SaaS template built with Next.js, Stripe, Convex, and WorkOS.
</p>
<p align="center">
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"/>
</a>
<a href="https://next-b2b-starter-kit.vercel.app/">
<img src="https://img.shields.io/badge/Demo-Website-blue" alt="Demo: Website"/>
</a>
</p>
<p align="center">
Demo: <a href="https://next-b2b-starter-kit.vercel.app/">https://next-b2b-starter-kit.vercel.app/</a>
</p>
<p align="center">
Read about the <a href="https://workos.com/blog/nextjs-b2b-starter-kit">Next.js B2B Starter Kit</a> on the WorkOS blog.
</p>
## Features
- Marketing splash page (`/`)
- Pricing page (`/pricing`) which allows signed in users to subscribe via Stripe Checkout
- Dashboard page (`/dashboard`) which is only accessible to admin users. Includes CRUD for users, audit logs and configuring SSO and billing
- Product page (`/product`) which is only accessible to signed in users
- Role-based access control
- Audit logs
- Billing
- Webhook syncing to Convex
> Entitlement sync is handled by WorkOS (via the [Stripe integration](https://workos.com/docs/authkit/add-ons/stripe)) — the app's only responsibility is [refreshing the session](https://workos.com/docs/user-management/entitlements) after checkout so new entitlements appear in the access token immediately. No app-side Stripe webhook is required for entitlements.
## Getting started
### Prerequisites
You'll need a [Convex](https://www.convex.dev/) account, a [Stripe](https://stripe.com/) account and a [WorkOS](https://workos.com/) account.
### Clone the repo
```bash
git clone https://github.com/workos/next-b2b-starter-kit.git
```
### Navigate to the project directory
```bash
cd next-b2b-starter-kit
```
### Install dependencies
```bash
pnpm install
```
### Run the setup script
```bash
pnpm run setup
```
### Start the development server
```bash
pnpm run dev
```
## Tech stack
- Framework: Next.js
- Database: Convex
- Authentication: AuthKit by WorkOS
- Payments: Stripe
## App flow
After viewing your marketing splash page (`/`) and pricing page (`/pricing`), users sign up before choosing a plan. This is so we can create an organization and link it to a Stripe customer.
Once signed up, users with the "admin" role can access the dashboard (`/dashboard`) where they can manage users, configure SSO and billing, and view audit logs. Note that in the default example, audit logs are only accessible when subscribed to the "Enterprise" plan.
Users without the "admin" role are instead redirected to the product page (`/product`) where they can interact with your product.
## Testing
When running locally or using the deployed [demo app](https://b2b-starter-kit.vercel.app/), use the following test card numbers for the Stripe Checkout flow:
- Card number: 4242 4242 4242 4242
- CVC: Any 3 digits
- Expiration Date: Any future date
- ZIP: Any 5 digits
## Deploying
Once you're ready to deploy your app, refer to the [Convex documentation](https://docs.convex.dev/production) for instructions on deploying to hosted solutions like Vercel.
Remember to use your production API keys for both Stripe and WorkOS before deploying to production.
## Need to Sync more data?
Learn more about the syncing system that connects [AuthKit](https://www.authkit.com/) and [Convex](https://www.convex.dev/).
We made a short video series that covers the full integration.
Check it out on [YouTube](https://youtu.be/GGwBSu0XmP0?feature=shared).
[](https://youtu.be/GGwBSu0XmP0?feature=shared)
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
