Built on Next.js and React, with styling developed using Tailwind CSS
saas-starter-kit — Next.js SaaS Template
By boxyhq
BoxyHQ's open-source Next.js enterprise SaaS starter template integrates authentication, team management, SAML SSO, directory sync, webhooks, audit logs, and Stripe payments, under the Apache-2.0 license.
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 3
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Integrates NextAuth.js, supporting email, GitHub, Google, Magic Link, and SAML SSO login
Built-in team management: create/delete teams, invite members, manage members and roles, update team settings
Includes directory sync (SCIM), webhooks and events, audit logs, roles and permissions, internationalization, dark mode, and other feature modules
Connects to Postgres via Prisma, with Docker Compose and Prisma Studio for local development
Uses Playwright for end-to-end tests, Stripe for payments, and Svix for webhook orchestration
Template Details
This is an open-source SaaS starter template built on Next.js and React, designed to provide a reusable foundation for enterprise SaaS application development. It pre-builds features common to most SaaS products, allowing developers to focus on the differentiating aspects of their business.
The template uses Tailwind CSS for styling, Postgres as the database, and Prisma for data modeling and access. The authentication layer is based on NextAuth.js, supporting email and GitHub login by default, with configurable Google OAuth, Magic Link, and SAML SSO. Team-related capabilities include creating and deleting teams, inviting members, managing members and roles, and updating team settings. It also includes directory sync (SCIM), webhooks and events, audit logs, internationalization, dark mode, email notifications, avatar uploads, and security response headers. Payments are integrated via Stripe, webhook orchestration is provided by Svix, the audit log service uses Retraced, end-to-end testing uses Playwright, and a Docker Compose configuration is included for local Postgres startup.
The README lists "coming soon" items including billing and subscriptions, unit and integration tests, indicating these capabilities are not yet complete in the current version. The template's deploy buttons point to Vercel, Heroku, and DigitalOcean, but actual use still requires configuring external services such as database, email, OAuth, Stripe, Svix, reCAPTCHA, and Sentry, along with the corresponding environment variables. The free scope is limited to the code in the repository under the Apache-2.0 license; external services like domain, hosting, database, payment, or AI may incur separate charges; third-party assets such as demo images, fonts, and icons must be checked against their respective licenses.
Is it right for your project?
Use Cases
- Teams needing to quickly build a foundation for an enterprise SaaS product with pre-built authentication, team, and permission modules
- Projects planning to use enterprise compliance capabilities such as SAML SSO, directory sync (SCIM), or audit logs
- SaaS applications starting with a Next.js, Prisma, and Postgres stack and requiring Stripe payment and webhook integration
- Development workflows needing to start Postgres locally via Docker Compose and run end-to-end tests with Playwright
Suitable For
- Developers with experience in Next.js, React, TypeScript, and Prisma
- SaaS projects requiring enterprise-grade authentication and team management capabilities, and willing to configure external services themselves
- Teams intending to modify and commercialize based on Apache-2.0 licensed code
- Developers who accept that some features (such as billing and subscriptions, unit and integration tests) are still incomplete
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Environment requirements: Node.js 18 or higher, PostgreSQL, NPM, and Docker Compose.
- 2
Copy .env.example to .env and configure variables such as NEXTAUTH_SECRET, SMTP_*, DATABASE_URL, APP_URL as needed.
- 3
Use the provided docker-compose.yml to start Postgres, then run npx prisma db push to sync the database schema.
- 4
External services like Stripe, Svix, reCAPTCHA, and Sentry require registering accounts and filling in corresponding keys; the webhook URL is the app domain plus /api/webhooks/stripe.
- 5
End-to-end tests use Playwright; run npm run playwright:update to install dependencies first, then execute npm run test:e2e.
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version in the public repository under the Apache-2.0 license; the free scope is limited to that version's code and does not imply that external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution are permitted; the Apache-2.0 license must be included with distributions.
- Modified files must carry prominent notices of changes, and relevant copyright, patent, trademark, and attribution notices must be retained.
- If the original project includes a NOTICE file, applicable attribution notices must be retained when distributing derivative works.
- The license includes an applicable contributor patent grant; initiating patent litigation as described in the license terminates that patent grant, and no trademark rights are granted.
- 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 the Svix webhook orchestration feature requires registering a Svix account and obtaining an API key; Svix is a third-party external service that may incur fees.
- Stripe payment functionality requires registering a Stripe account and configuring API keys and webhook signing secrets; Stripe is a third-party paid service.
- reCAPTCHA functionality requires registering a Google account and obtaining site and secret keys; it is an external service dependency.
- Sentry error monitoring requires registering a Sentry account and configuring a DSN; it is an optional external service.
- Email login requires configuring an SMTP service (such as AWS SES, Sendgrid, Resend); these are third-party services that may charge fees.
- GitHub and Google social login require creating OAuth applications in the respective developer consoles and configuring client IDs and secrets.
- Billing and subscriptions, unit and integration tests are listed as "coming soon" in the README and are not yet implemented in the current version.
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be assumed to be covered solely by the code's Apache-2.0 license.
- External services such as domain, hosting, database, payment, or AI may incur separate charges.
View Original Text Basis
no-charge, royalty-free, irrevocable copyright license
Original License Text
Create an account on [Svix](https://www.svix.com/)
Original README
Create an account on [Stripe](https://stripe.com/)
Original README
Create an account on [Google reCAPTCHA](https://www.google.com/recaptcha/admin/enterprise)
Original README
Create an account on [Sentry](https://sentry.io/), skip the onboarding and create a new Next.js project.
Original README
For email login, configure the `SMTP_*` environment variables in the `.env` file to send magic link login emails. You can use services like [AWS SES](https://aws.amazon.com/ses/), [Sendgrid](https://sendgrid.com/) or [Resend](https://resend.com/).
Original README
For social login with GitHub and Google, you need to create OAuth apps in the respective developer consoles and add the client ID and secret to the `.env` file.
Original README
https://github.com/boxyhq/saas-starter-kit/blob/main/LICENSEhttps://github.com/boxyhq/saas-starter-kit/blob/main/README.md- Billing & subscriptions - Unit and integration tests
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 · 100 / 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-07-20
- 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: 51e7d19878b999572aee2c6e13fbc69e1fd093835f12cfdc009ba42dc7f4395e
2026-10-01T01:17:25.688Z
Source file / repository<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/boxyhq/jackson/assets/66887028/871d9c0f-d351-49bb-9458-2542830d7910">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/boxyhq/jackson/assets/66887028/4073c181-0653-4d5b-b74f-e7e84fe79da8">
<img alt="BoxyHQ Banner" src="https://github.com/boxyhq/jackson/assets/66887028/b40520b7-dbce-400b-88d3-400d1c215ea1">
</picture>
# ⭐ Enterprise SaaS Starter Kit
<p>
<a href="https://github.com/boxyhq/saas-starter-kit/stargazers"><img src="https://img.shields.io/github/stars/boxyhq/saas-starter-kit" alt="Github stargazers"></a>
<a href="https://github.com/boxyhq/saas-starter-kit/issues"><img src="https://img.shields.io/github/issues/boxyhq/saas-starter-kit" alt="Github issues"></a>
<a href="https://github.com/boxyhq/saas-starter-kit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/boxyhq/saas-starter-kit" alt="license"></a>
<a href="https://twitter.com/BoxyHQ"><img src="https://img.shields.io/twitter/follow/BoxyHQ?style=social" alt="Twitter"></a>
<a href="https://www.linkedin.com/company/boxyhq"><img src="https://img.shields.io/badge/LinkedIn-blue" alt="LinkedIn"></a>
<a href="https://discord.gg/uyb7pYt4Pa"><img src="https://img.shields.io/discord/877585485235630130" alt="Discord"></a>
</p>
The Open Source Next.js SaaS boilerplate for Enterprise SaaS app development.
Please star ⭐ the repo if you want us to continue developing and improving the SaaS Starter Kit! 😀
## 📖 Additional Resources
Video - [BoxyHQ's SaaS Starter Kit: Your Ultimate Enterprise-Compliant Boilerplate](https://www.youtube.com/watch?v=oF8QIwQIhyo) <br>
Blog - [Enterprise-ready Saas Starter Kit](https://boxyhq.com/blog/enterprise-ready-saas-starter-kit)
Next.js-based SaaS starter kit saves you months of development by starting you off with all the features that are the same in every product, so you can focus on what makes your app unique.
## 🛠️ Built With
- [Next.js](https://nextjs.org)
This is a React framework that provides features such as server-side rendering and static site generation. It's used for building the user interface of your application. The main configuration for Next.js can be found in `next.config.js`.
- [Tailwind CSS](https://tailwindcss.com)
This is a utility-first CSS framework for rapidly building custom user interfaces. It's used for styling the application. The configuration for Tailwind CSS can be found in `postcss.config.js`.
- [Postgres](https://www.postgresql.org)
This is a powerful, open source object-relational database system. It's used for storing application data. The connection to Postgres is likely managed through Prisma.
- [React](https://reactjs.org)
This is a JavaScript library for building user interfaces. It's used for creating the interactive elements of your application. The React components are located in the components directory.
- [Prisma](https://www.prisma.io)
This is an open-source database toolkit. It's used for object-relational mapping, which simplifies the process of writing database queries. Prisma configuration and schema can be found in the prisma directory.
- [TypeScript](https://www.typescriptlang.org)
This is a typed superset of JavaScript that compiles to plain JavaScript. It's used to make the code more robust and maintainable. TypeScript definitions and configurations can be found in files like `next-env.d.ts` and `i18next.d.ts`.
- [SAML Jackson](https://github.com/boxyhq/jackson) (Provides SAML SSO, Directory Sync)
This is a service for handling SAML SSO (Single Sign-On). It's used to allow users to sign in with a single ID and password to any of several related systems i.e (using a single set of credentials). The implementation of SAML Jackson is primarily located within the files associated with authentication.
- [Svix](https://www.svix.com/) (Provides Webhook Orchestration)
This is a service for handling webhooks. It's used to emit events on user/team CRUD operations, which can then be caught and handled by other parts of the application or external services. The integration of Svix is distributed throughout the codebase, primarily in areas where Create, Read, Update, and Delete (CRUD) operations are executed.
- [Retraced](https://github.com/retracedhq/retraced) (Provides Audit Logs Service)
This is a service for audit logging and data visibility. It helps track user activities within the application i.e (who did what and when in the application). The usage of Retraced would be dispersed throughout the codebase, likely in the files where important actions are performed.
- [Stripe](https://stripe.com) (Provides Payments)
This is a service for handling payments. It's used to process payments for the application. The integration of Stripe is likely found in the files associated with billing and subscriptions.
- [Playwright](https://playwright.dev) (Provides E2E tests)
This is a Node.js library for automating browsers. It's used to run end-to-end tests on the application. The Playwright configuration and tests can be found in the tests directory.
- [Docker](https://www.docker.com) (Provides Docker Compose)
This is a platform for developing, shipping, and running applications. It's used to containerize the application and its dependencies. The Docker configuration can be found in the Dockerfile and docker-compose.yml.
- [NextAuth.js](https://next-auth.js.org) (Provides Authentication)
This is a complete open-source authentication solution for Next.js applications. It's used to handle user authentication and authorization. The NextAuth.js configuration and providers can be found in the `pages/api/auth/[...nextauth].ts` file.
## 🚀 Deployment
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fboxyhq%2Fsaas-starter-kit&env=NEXTAUTH_SECRET,SMTP_HOST,SMTP_PORT,SMTP_USER,SMTP_PASSWORD,SMTP_FROM,DATABASE_URL,APP_URL">
<img width="90" alt="Deploy with Vercel" src="https://vercel.com/button" />
</a>
<a href="https://heroku.com/deploy" alt="Deploy to Heroku">
<img alt="Deploy to Heroku" src="https://www.herokucdn.com/deploy/button.svg" />
</a>
<a href="https://cloud.digitalocean.com/apps/new?repo=https://github.com/boxyhq/saas-starter-kit/tree/main" alt="Deploy to DO">
<img width="200" alt="Deploy to DO" src="https://www.deploytodo.com/do-btn-blue-ghost.svg" />
</a>
## ✨ Getting Started
Please follow these simple steps to get a local copy up and running.
### Prerequisites
- Node.js (Version: >=18.x)
- PostgreSQL
- NPM
- Docker compose
### Development
#### 1. Setup
- [Fork](https://github.com/boxyhq/saas-starter-kit/fork) the repository
- Clone the repository by using this command:
```bash
git clone https://github.com/<your_github_username>/saas-starter-kit.git
```
#### 2. Go to the project folder
```bash
cd saas-starter-kit
```
#### 3. Install dependencies
```bash
npm install
```
#### 4. Set up your .env file
Duplicate `.env.example` to `.env`.
```bash
cp .env.example .env
```
#### 5. Create a database (Optional)
To make the process of installing dependencies easier, we offer a `docker-compose.yml` with a Postgres container.
```bash
docker-compose up -d
```
#### 6. Set up database schema
```bash
npx prisma db push
```
#### 7. Start the server
In a development environment:
```bash
npm run dev
```
#### 8. Start the Prisma Studio
Prisma Studio is a visual editor for the data in your database.
```bash
npx prisma studio
```
#### 9. Testing
We are using [Playwright](https://playwright.dev/) to execute E2E tests. Add all tests inside the `/tests` folder.
Update `playwright.config.ts` to change the playwright configuration.
##### Install Playwright dependencies
```bash
npm run playwright:update
```
##### Run E2E tests
```bash
npm run test:e2e
```
_Note: HTML test report is generated inside the `report` folder. Currently supported browsers for test execution `chromium` and `firefox`_
## ⚙️ Feature configuration
To get started you only need to configure the database by following the steps above. For more advanced features, you can configure the following:
### Authentication with NextAuth.js
The default login options are email and GitHub. Configure below:
1. Generate a secret key for NextAuth.js by running `openssl rand -base64 32` and adding it to the `.env` file as `NEXTAUTH_SECRET`.
2. For email login, configure the `SMTP_*` environment variables in the `.env` file to send magic link login emails. You can use services like [AWS SES](https://aws.amazon.com/ses/), [Sendgrid](https://sendgrid.com/) or [Resend](https://resend.com/).
3. For social login with GitHub and Google, you need to create OAuth apps in the respective developer consoles and add the client ID and secret to the `.env` file. The default is email login and For GitHub, follow the instructions [here](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app). For Google, follow the instructions [here](https://support.google.com/cloud/answer/6158849?hl=en).
### Svix Webhooks
1. Create an account on [Svix](https://www.svix.com/)
2. The authenticaton token and add `SVIX_API_KEY` to the `.env` file.
### Stripe Payments
1. Create an account on [Stripe](https://stripe.com/)
2. Add the [Stripe API secret key](https://dashboard.stripe.com/apikeys) to the `.env` file as `STRIPE_SECRET_KEY`.
3. Create a webhook in the [Stripe dashboard](https://dashboard.stripe.com/webhooks). The URL is your app hostname plus `/api/webhooks/stripe`. If you want to set this up locally you will need to use the [Stripe CLI forwarder](https://docs.stripe.com/webhooks#test-webhook).
4. Once created, add the signing secret to the `.env` file as `STRIPE_WEBHOOK_SECRET`.
### Recaptcha
1. Create an account on [Google reCAPTCHA](https://www.google.com/recaptcha/admin/enterprise). This will create a Google Cloud account if you don't have one.
2. From the Key Details in the [Google Cloud Console](https://console.cloud.google.com/security/recaptcha), add the reCAPTCHA ID to the `.env` file as `RECAPTCHA_SITE_KEY`.
3. Click Key Details > Integration then click Use legacy key to get the secret key and add it to the `.env` file as `RECAPTCHA_SECRET_KEY`.
### Sentry
1. Create an account on [Sentry](https://sentry.io/), skip the onboarding and create a new Next.js project.
2. At the bottom of the page, get the DSN and add it to the `.env` file as `SENTRY_DSN`. The other variables are optional.
#### Fully customizable boilerplate out of the box, see images below 👇👇👇

## 🥇 Features
- Create account
- Sign in with Email and Password
- Sign in with Magic Link
- Sign in with SAML SSO
- Sign in with Google [[Setting up Google OAuth](https://support.google.com/cloud/answer/6158849?hl=en)]
- Sign in with GitHub [[Creating a Github OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app)]
- Directory Sync (SCIM)
- Update account
- Create team
- Delete team
- Invite users to the team
- Manage team members
- Update team settings
- Webhooks & Events
- Internationalization
- Audit logs
- Roles and Permissions
- Dark mode
- Email notifications
- E2E tests
- Docker compose
- Prisma Studio
- Update member role
- Directory Sync Events
- Avatar Upload
- SAML SSO
- Audit Log
- Webhook
- Payments
- Security Headers
## ➡️ Coming Soon
- Billing & subscriptions
- Unit and integration tests
## ✨ Contributing
Thanks for taking the time to contribute! Contributions make the open-source community a fantastic place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please try to create bug reports that are:
- _Reproducible._ Include steps to reproduce the problem.
- _Specific._ Include as much detail as possible: which version, what environment, etc.
- _Unique._ Do not duplicate existing opened issues.
- _Scoped to a Single Bug._ One bug per report.
[Contributing Guide](https://github.com/boxyhq/saas-starter-kit/blob/main/CONTRIBUTING.md)
## 🤩 Community
- [Discord](https://discord.gg/uyb7pYt4Pa) (For live discussion with the Open-Source Community and BoxyHQ team)
- [Twitter](https://twitter.com/BoxyHQ) / [LinkedIn](https://www.linkedin.com/company/boxyhq) (Follow us)
- [Youtube](https://www.youtube.com/@boxyhq) (Watch community events and tutorials)
- [GitHub Issues](https://github.com/boxyhq/saas-starter-kit/issues) (Contributions, report issues, and product ideas)
## 🌍 Contributors
<a href="https://github.com/boxyhq/saas-starter-kit/graphs/contributors">
<img src="https://contrib.rocks/image?repo=boxyhq/saas-starter-kit" />
</a>
Made with [contrib.rocks](https://contrib.rocks).
## 🛡️ License
[Apache 2.0 License](https://github.com/boxyhq/saas-starter-kit/blob/main/LICENSE)
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
