Home
Softono
i

ixartz

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
4

Software by ixartz

Next-js-Boilerplate
Open Source

Next-js-Boilerplate

# Boilerplate and Starter for Next.js 16+, Tailwind CSS 4, and TypeScript. <p align="center"> <a href="https://demo.nextjs-boilerplate.com"> <img src="public/assets/images/nextjs-starter-banner.png?raw=true" alt="Next js starter banner" style="max-width: 100%; height: auto;" /> </a> </p> πŸš€ Boilerplate and Starter for Next.js with App Router, Tailwind CSS, and TypeScript ⚑️ Prioritizing developer experience first: Next.js, TypeScript, ESLint, Prettier, Lefthook (replacing Husky), Lint-Staged, Vitest (replacing Jest), Testing Library, Playwright, Commitlint, VSCode, Tailwind CSS, Authentication with [Clerk](https://clerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate), Database with DrizzleORM (PostgreSQL, SQLite, and MySQL), Local database with PGlite and production with [Neon](https://get.neon.com/BMFYNtx), Error Monitoring with [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo), Logging with LogTape (replacing Pino.js) and Log Management, Monitoring as Code, Storybook, Multi-language (i18n), AI-powered code reviews with CodeRabbit, Secure with [Arcjet](https://launch.arcjet.com/Q6eLbRE) (Bot detection, Rate limiting, Attack protection, etc.), and more. Clone this project and use it to create your own Next.js project. You can check out the live demo at [Next.js Boilerplate](https://demo.nextjs-boilerplate.com), which includes a working authentication system. ## Sponsors <table width="100%"> <tr height="187px"> <td align="center" width="33%"> <a href="https://clerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> <img alt="Clerk – Authentication & User Management for Next.js" src="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/coderabbit-logo-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/coderabbit-logo-light.svg?raw=true"> <img alt="CodeRabbit" src="public/assets/images/coderabbit-logo-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/sentry-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/sentry-dark.png?raw=true"> <img alt="Sentry" src="public/assets/images/sentry-dark.png?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://launch.arcjet.com/Q6eLbRE"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/arcjet-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/arcjet-light.svg?raw=true"> <img alt="Arcjet" src="public/assets/images/arcjet-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://l.crowdin.com/next-js"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/crowdin-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/crowdin-dark.png?raw=true"> <img alt="Crowdin" src="public/assets/images/crowdin-dark.png?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/better-stack-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/better-stack-dark.png?raw=true"> <img alt="Better Stack" src="public/assets/images/better-stack-dark.png?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://posthog.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://posthog.com/brand/posthog-logo-white.svg"> <source media="(prefers-color-scheme: light)" srcset="https://posthog.com/brand/posthog-logo.svg"> <img alt="PostHog" src="https://posthog.com/brand/posthog-logo.svg"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/checkly-logo-dark.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/checkly-logo-light.png?raw=true"> <img alt="Checkly" src="public/assets/images/checkly-logo-light.png?raw=true"> </picture> </a> </td> <td align="center" style=width="33%"> <a href="https://nextjs-boilerplate.com/pro-saas-starter-kit"> <img src="public/assets/images/nextjs-boilerplate-saas.png?raw=true" alt="Next.js SaaS Boilerplate with React" /> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="mailto:[email protected]"> Add your logo here </a> </td> </tr> </table> ### Demo **Live demo: [Next.js Boilerplate](https://demo.nextjs-boilerplate.com)** | Sign Up | Sign In | | --- | --- | | [![Next.js Boilerplate SaaS Sign Up](public/assets/images/nextjs-boilerplate-sign-in.png)](https://demo.nextjs-boilerplate.com/sign-up) | [![Next.js Boilerplate SaaS Sign In](public/assets/images/nextjs-boilerplate-sign-in.png)](https://demo.nextjs-boilerplate.com/sign-in) | ### Features Developer experience first, extremely flexible code structure and only keep what you need: - ⚑ [Next.js](https://nextjs.org) with App Router support - πŸ”₯ Type checking [TypeScript](https://www.typescriptlang.org) - πŸ’Ž Integrate with [Tailwind CSS](https://tailwindcss.com) - πŸ€– AI coding agent instructions for Claude Code, Codex, Cursor, OpenCode, Copilot, and more - βœ… Strict Mode for TypeScript and React 19 - πŸ”’ Authentication with [Clerk](https://clerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate): Sign up, Sign in, Sign out, Forgot password, Reset password, and more. - πŸ‘€ Passwordless Authentication with Magic Links, Multi-Factor Auth (MFA), Social Auth (Google, Facebook, Twitter, GitHub, Apple, and more), Passwordless login with Passkeys, User Impersonation - πŸ“¦ Type-safe ORM with DrizzleORM, compatible with PostgreSQL, SQLite, and MySQL - πŸ’½ Offline and local development database with PGlite - ☁️ Remote and production database with [Neon](https://get.neon.com/BMFYNtx) - 🌐 Multi-language (i18n) with next-intl and [Crowdin](https://l.crowdin.com/next-js) - ♻️ Type-safe environment variables with T3 Env - ⌨️ Form handling with React Hook Form - πŸ”΄ Validation library with Zod - πŸ“ Linter with Oxlint with Ultracite preset (replacing ESLint) - πŸ’– Code Formatter with Oxfmt (replacing Prettier) - 🦊 Husky for Git Hooks (replaced by Lefthook) - 🚫 Lint-staged for running linters on Git staged files - πŸš“ Lint git commit with Commitlint - πŸ““ Write standard compliant commit messages with Commitizen - πŸ” Unused files and dependencies detection with Knip - 🌍 I18n validation and missing translation detection with i18n-check - 🦺 Unit Testing with Vitest and Browser mode (replacing React Testing Library) - πŸ§ͺ Integration and E2E Testing with Playwright - πŸ‘· Run tests on pull request with GitHub Actions - πŸŽ‰ Storybook for UI development - 🐰 AI-powered code reviews with [CodeRabbit](https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025) - 🚨 Error Monitoring with [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) - πŸ” Local development error monitoring with Sentry Spotlight - β˜‚οΈ Code coverage with Codecov - πŸ“ Logging with LogTape and Log Management with [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) - πŸ–₯️ Monitoring as Code with [Checkly](https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) - πŸ” Security and bot protection ([Arcjet](https://launch.arcjet.com/Q6eLbRE)) - πŸ“Š Analytics with PostHog - 🎁 Automatic changelog generation with Semantic Release - πŸ” Visual regression testing - πŸ’‘ Absolute Imports using `@` prefix - πŸ—‚ VSCode configuration: Debug, Settings, Tasks and Extensions - πŸ€– SEO metadata, JSON-LD and Open Graph tags - πŸ—ΊοΈ Sitemap.xml and robots.txt - πŸ‘· Automatic dependency updates with Dependabot - ⌘ Database exploration with Drizzle Studio and CLI migration tool with Drizzle Kit - βš™οΈ Bundler Analyzer - 🌈 Include a FREE minimalist theme - πŸ’― Maximize lighthouse score Built-in features from Next.js: - β˜• Minify HTML & CSS - πŸ’¨ Live reload - βœ… Cache busting Optional features (easy to add): - πŸ”‘ Multi-tenancy, Role-based access control (RBAC) - πŸ” OAuth for Single Sign-On (SSO), Enterprise SSO, SAML, OpenID Connect (OIDC), EASIE - πŸ”— Web 3 (Base, MetaMask, Coinbase Wallet, OKX Wallet) ### Philosophy - Nothing is hidden from you, allowing you to make any necessary adjustments to suit your requirements and preferences. - Dependencies are regularly updated on a monthly basis - Start for free without upfront costs - Easy to customize - Minimal code - Unstyled template - SEO-friendly - πŸš€ Production-ready ### Requirements - Node.js 24+ and npm ### Getting started Run the following command on your local environment: ```shell git clone --depth=1 https://github.com/ixartz/Next-js-Boilerplate.git my-project-name cd my-project-name npm install ``` For your information, all dependencies are updated every month. Then, you can run the project locally in development mode with live reload by executing: ```shell npm run dev ``` Open http://localhost:3000 with your favorite browser to see your project. For your information, the project is already pre-configured with a local database using PGlite. No extra setup is required to run the project locally. Need advanced features? Multi-tenancy & Teams, Roles & Permissions, Shadcn UI, End-to-End Typesafety with oRPC, Stripe Payment, Light / Dark mode. Try [Next.js Boilerplate Pro](https://nextjs-boilerplate.com/pro-saas-starter-kit). Or, need a Self-hosted auth stack (Better Auth)? Try [Next.js Boilerplate Max](https://nextjs-boilerplate.com/nextjs-multi-tenant-saas-boilerplate) ### Set up authentication To get started, create a Clerk account at [Clerk.com](https://clerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate) and create a new application in the Clerk Dashboard. Then copy the `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` values and add them to your `.env.local` file (not tracked by Git): ```shell NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_pub_key CLERK_SECRET_KEY=your_clerk_secret_key ``` You now have a fully functional authentication system with Next.js, including features such as sign up, sign in, sign out, forgot password, reset password, update profile, update password, update email, delete account, and more. ### Set up remote database The project uses DrizzleORM, a type-safe ORM that is compatible with PostgreSQL, SQLite, and MySQL databases. By default, the project is configured to seamlessly work with PostgreSQL, and you have the flexibility to choose any PostgreSQL database provider of your choice. When you launch the project locally for the first time, it automatically creates a PostgreSQL database on your local machine. This allows you to work with a PostgreSQL database without Docker or any additional setup. To set up a remote and production database, you need to create a PostgreSQL database and obtain the connection string. One recommended option is to use [Neon](https://get.neon.com/BMFYNtx), which provides a free PostgreSQL database. This database is compatible and has been tested with Next.js Boilerplate. After creating your Neon account, you can get the connection string and copy it to the `DATABASE_URL` variable in your `.env.production` file. > :warning: This project works out of the box with any PostgreSQL provider. Neon is mentioned here because it offers a free tier, and the link is an affiliate link. Feel free to use any PostgreSQL provider that fits your needs. #### Create a fresh and empty database If you want to create a fresh and empty database, you just need to remove the folder `local.db` from the root of the project. The next time you run the project, a new database will be created automatically. ### Translation (i18n) setup For translation, the project uses `next-intl` combined with [Crowdin](https://l.crowdin.com/next-js). As a developer, you only need to take care of the English (or another default language) version. Translations for other languages are automatically generated and handled by Crowdin. You can use Crowdin to collaborate with your translation team or translate the messages yourself with the help of machine translation. To set up translation (i18n), create an account at [Crowdin.com](https://l.crowdin.com/next-js) and create a new project. In the newly created project, you will be able to find the project ID. You will also need to create a new Personal Access Token by going to Account Settings > API. Then, in your GitHub Actions, you need to define the following environment variables: `CROWDIN_PROJECT_ID` and `CROWDIN_PERSONAL_TOKEN`. After defining the environment variables in your GitHub Actions, your localization files will be synchronized with Crowdin every time you push a new commit to the `main` branch. ### Project structure ```shell . β”œβ”€β”€ README.md # README file β”œβ”€β”€ .github # GitHub folder β”‚ β”œβ”€β”€ actions # Reusable actions β”‚ └── workflows # GitHub Actions workflows β”œβ”€β”€ .storybook # Storybook folder β”œβ”€β”€ .vscode # VSCode configuration β”œβ”€β”€ migrations # Database migrations β”œβ”€β”€ public # Public assets folder β”œβ”€β”€ src β”‚ β”œβ”€β”€ app # Next JS App (App Router) β”‚ β”œβ”€β”€ components # React components β”‚ β”œβ”€β”€ libs # 3rd party libraries configuration β”‚ β”œβ”€β”€ locales # Locales folder (i18n messages) β”‚ β”œβ”€β”€ models # Database models β”‚ β”œβ”€β”€ styles # Styles folder β”‚ β”œβ”€β”€ templates # Templates folder β”‚ β”œβ”€β”€ types # Type definitions β”‚ β”œβ”€β”€ utils # Utilities folder β”‚ └── validations # Validation schemas β”œβ”€β”€ tests β”‚ β”œβ”€β”€ e2e # E2E tests, also includes Monitoring as Code β”‚ └── integration # Integration tests β”œβ”€β”€ drizzle.config.ts # Drizzle ORM configuration β”œβ”€β”€ eslint.config.mjs # ESLint configuration β”œβ”€β”€ next.config.ts # Next JS configuration β”œβ”€β”€ package.json # NPM dependencies and scripts β”œβ”€β”€ playwright.config.ts # Playwright configuration β”œβ”€β”€ tsconfig.json # TypeScript configuration └── vitest.config.ts # Vitest configuration ``` ### Customization You can easily configure Next js Boilerplate by searching the entire project for `FIXME:` to make quick customizations. Here are some of the most important files to customize: - `public/apple-touch-icon.png`, `public/favicon.ico`, `public/favicon-16x16.png` and `public/favicon-32x32.png`: your website favicon - `src/utils/AppConfig.ts`: configuration file - `src/templates/BaseTemplate.tsx`: default theme - `next.config.ts`: Next.js configuration - `.env`: default environment variables You have full access to the source code for further customization. The provided code is just an example to help you start your project. The sky's the limit πŸš€. ### Change database schema To modify the database schema in the project, you can update the schema file located at `./src/models/Schema.ts`. This file defines the structure of your database tables using the Drizzle ORM library. After making changes to the schema, generate a migration by running the following command: ```shell npm run db:generate ``` This will create a migration file that reflects your schema changes. After making sure your database is running, you can apply the generated migration using: ```shell npm run db:migrate ``` There is no need to restart the Next.js server for the changes to take effect. ### Commit Message Format The project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification, meaning all commit messages must be formatted accordingly. To help you write commit messages, the project provides an interactive CLI that guides you through the commit process. To use it, run the following command: ```shell npm run commit ``` One of the benefits of using Conventional Commits is the ability to automatically generate GitHub releases. It also allows us to automatically determine the next version number based on the types of commits that are included in a release. #### Commit Types Every commit message follows Conventional Commits and must begin with a type prefix (e.g., `feat: add login page`). The table below lists the available types: | Type | Description | | --- | --- | | `feat` | New feature or functionality | | `fix` | Bug fix | | `docs` | Documentation only | | `style` | Code formatting without logic changes | | `refactor` | Code restructuring without behavior changes | | `perf` | Performance improvement | | `test` | Adding or updating tests | | `build` | Build system | | `ci` | CI configuration and scripts | | `chore` | Maintenance tasks (dependencies, config) | | `revert` | Reverts a previous commit | ### CodeRabbit AI Code Reviews The project uses [CodeRabbit](https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025), an AI-powered code reviewer. CodeRabbit monitors your repository and automatically provides intelligent code reviews on all new pull requests using its powerful AI engine. Setting up CodeRabbit is simple, visit [coderabbit.ai](https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025), sign in with your GitHub account, and add your repository from the dashboard. That's it! ### Testing All unit tests are located alongside the source code in the same directory, making them easier to find. The unit test files follow this format: `*.test.ts` or `*.test.tsx`. The project uses Vitest and React Testing Library for unit testing. You can run the tests with the following command: ```shell npm run test ``` ### Integration & E2E Testing The project uses Playwright for integration and end-to-end (E2E) testing. Integration test files use the `*.integ.ts` extension, while E2E test files use the `*.e2e.ts` extension. You can run the tests with the following commands: ```shell npx playwright install # Only for the first time in a new environment npm run test:e2e ``` ### Storybook Storybook is configured for UI component development and testing. The project uses Storybook with Next.js and Vite integration, including accessibility testing and documentation features. Stories are located alongside your components in the `src` directory and follow the pattern `*.stories.ts` or `*.stories.tsx`. You can run Storybook in development mode with: ```shell npm run storybook ``` This will start Storybook on http://localhost:6006 where you can view and interact with your UI components in isolation. To run Storybook tests in headless mode, you can use the following command: ```shell npm run storybook:test ``` ### Local Production Build Generate an optimized production build locally using a temporary in-memory Postgres database: ```shell npm run build-local ``` This command: - Starts a temporary in-memory Database server - Runs database migrations with Drizzle Kit - Builds the Next.js app for production - Shuts down the temporary DB when the build finishes Notes: - By default, it uses a local database, but you can also use `npm run build` with a remote database. - This only creates the build, it doesn't start the server. To run the build locally, use `npm run start`. ### Deploy to production During the build process, database migrations are automatically executed, so there's no need to run them manually. However, you must define `DATABASE_URL` in your environment variables. You can use any PostgreSQL provider, but we recommend using [Neon](https://get.neon.com/BMFYNtx), which offers a free tier and is compatible with Next.js Boilerplate. Then, you can generate a production build with: ```shell $ npm run build ``` It generates an optimized production build of the boilerplate. To test the generated build, run: ```shell $ npm run start ``` You also need to defined the environment variables `CLERK_SECRET_KEY` using your own key. This command starts a local server using the production build. You can now open http://localhost:3000 in your preferred browser to see the result. ### Error Monitoring The project uses [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) to monitor errors. #### Local development with Sentry and Spotlight In the development environment, no additional setup is required: Next.js Boilerplate comes pre-configured with Sentry and Spotlight (Sentry for Development). All errors are automatically captured by your local Spotlight instance, enabling testing without sending data to Sentry Cloud. You can inspect captured events, view stack traces, and analyze errors in the Spotlight UI at `http://localhost:8969`. #### Production setup with Sentry For production environment, you'll need to create a [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) account and a new project. Then, in `.env.production`, you need to update the following environment variables: ```shell NEXT_PUBLIC_SENTRY_DSN= SENTRY_ORGANIZATION= SENTRY_PROJECT= ``` You also need to create a environment variable `SENTRY_AUTH_TOKEN` in your hosting provider's dashboard. ### Code coverage Next.js Boilerplate relies on [Codecov](https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) for code coverage reporting solution. To enable Codecov, create a Codecov account and connect it to your GitHub account. Your repositories should appear on your Codecov dashboard. Select the desired repository and copy the token. In GitHub Actions, define the `CODECOV_TOKEN` environment variable and paste the token. Make sure to create `CODECOV_TOKEN` as a GitHub Actions secret, do not paste it directly into your source code. ### Logging The project uses LogTape for logging. In the development environment, logs are displayed in the console by default. For production, the project is already integrated with [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) to manage and query your logs using SQL. To use Better Stack, you need to create a [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) account and create a new source: go to your Better Stack Logs Dashboard > Sources > Connect source. Then, you need to give a name to your source and select Node.js as the platform. After creating the source, you will be able to view and copy your source token. In your environment variables, paste the token into the `NEXT_PUBLIC_BETTER_STACK_SOURCE_TOKEN` variable. You'll also need to define the `NEXT_PUBLIC_BETTER_STACK_INGESTING_HOST` variable, which can be found in the same place as the source token. Now, all logs will automatically be sent to and ingested by Better Stack. ### Checkly monitoring The project uses [Checkly](https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) to ensure that your production environment is always up and running. At regular intervals, Checkly runs the tests ending with `*.check.e2e.ts` extension and notifies you if any of the tests fail. Additionally, you have the flexibility to execute tests from multiple locations to ensure that your application is available worldwide. To use Checkly, you must first create an account on [their website](https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate). After creating an account, generate a new API key in the Checkly Dashboard and set the `CHECKLY_API_KEY` environment variable in GitHub Actions. Additionally, you will need to define the `CHECKLY_ACCOUNT_ID`, which can also be found in your Checkly Dashboard under User Settings > General. To complete the setup, update the `checkly.config.ts` file with your own email address and production URL. ### Arcjet security and bot protection The project uses [Arcjet](https://launch.arcjet.com/Q6eLbRE), a security as code product that includes several features that can be used individually or combined to provide defense in depth for your site. To set up Arcjet, [create a free account](https://launch.arcjet.com/Q6eLbRE) and get your API key. Then add it to the `ARCJET_KEY` environment variable. Arcjet is configured with two main features: bot detection and the Arcjet Shield WAF: - [Bot detection](https://docs.arcjet.com/bot-protection/concepts) is configured to allow search engines, preview link generators e.g. Slack and Twitter previews, and to allow common uptime monitoring services. All other bots, such as scrapers and AI crawlers, will be blocked. You can [configure additional bot types](https://docs.arcjet.com/bot-protection/identifying-bots) to allow or block. - [Arcjet Shield WAF](https://docs.arcjet.com/shield/concepts) will detect and block common attacks such as SQL injection, cross-site scripting, and other OWASP Top 10 vulnerabilities. Arcjet is configured with a central client at `src/libs/Arcjet.ts` that includes the Shield WAF rules. Additional rules are applied when Arcjet is called in `proxy.ts`. ### Useful commands ### Code Quality and Validation The project includes several commands to ensure code quality and consistency. You can run: - `npm run lint` to check for linting errors - `npm run lint:fix` to automatically fix fixable issues from the linter - `npm run check:types` to verify type safety across the entire project - `npm run check:deps` help identify unused dependencies and files - `npm run check:i18n` ensures all translations are complete and properly formatted #### Bundle Analyzer Next.js Boilerplate includes a built-in bundle analyzer. It can be used to analyze the size of your JavaScript bundles. To begin, run the following command: ```shell npm run build-stats ``` By running the command, it'll automatically open a new browser window with the results. #### Database Studio The project is already configured with Drizzle Studio to explore the database. You can run the following command to open the database studio: ```shell npm run db:studio ``` Then, you can open https://local.drizzle.studio with your favorite browser to explore your database. ### VSCode information (optional) If you are VSCode user, you can have a better integration with VSCode by installing the suggested extension in `.vscode/extension.json`. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience. With the plugins installed in your VSCode, ESLint and Prettier can automatically fix the code and display errors. The same applies to testing: you can install the VSCode Vitest extension to automatically run your tests, and it also shows the code coverage in context. Pro tips: if you need a project wide-type checking with TypeScript, you can run a build with <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> on Mac. ### Contributions Everyone is welcome to contribute to this project. Feel free to open an issue if you have any questions or find a bug. Totally open to suggestions and improvements. ### License Licensed under the MIT License, Copyright Β© 2026 See [LICENSE](LICENSE) for more information. ## Sponsors <table width="100%"> <tr height="187px"> <td align="center" width="33%"> <a href="https://clerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> <img alt="Clerk – Authentication & User Management for Next.js" src="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/coderabbit-logo-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/coderabbit-logo-light.svg?raw=true"> <img alt="CodeRabbit" src="public/assets/images/coderabbit-logo-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/sentry-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/sentry-dark.png?raw=true"> <img alt="Sentry" src="public/assets/images/sentry-dark.png?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://launch.arcjet.com/Q6eLbRE"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/arcjet-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/arcjet-light.svg?raw=true"> <img alt="Arcjet" src="public/assets/images/arcjet-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://l.crowdin.com/next-js"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/crowdin-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/crowdin-dark.png?raw=true"> <img alt="Crowdin" src="public/assets/images/crowdin-dark.png?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/better-stack-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/better-stack-dark.png?raw=true"> <img alt="Better Stack" src="public/assets/images/better-stack-dark.png?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://posthog.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://posthog.com/brand/posthog-logo-white.svg"> <source media="(prefers-color-scheme: light)" srcset="https://posthog.com/brand/posthog-logo.svg"> <img alt="PostHog" src="https://posthog.com/brand/posthog-logo.svg"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/checkly-logo-dark.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/checkly-logo-light.png?raw=true"> <img alt="Checkly" src="public/assets/images/checkly-logo-light.png?raw=true"> </picture> </a> </td> <td align="center" style=width="33%"> <a href="https://nextjs-boilerplate.com/pro-saas-starter-kit"> <img src="public/assets/images/nextjs-boilerplate-saas.png?raw=true" alt="Next.js SaaS Boilerplate with React" /> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="mailto:[email protected]"> Add your logo here </a> </td> </tr> </table> --- Made with β™₯ by [CreativeDesignsGuru](https://creativedesignsguru.com) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40Ixartz)](https://twitter.com/ixartz) Looking for a custom boilerplate to kick off your project? I'd be glad to discuss how I can help you build one. Feel free to reach out anytime at [email protected]! [![Sponsor Next JS Boilerplate](https://cdn.buymeacoffee.com/buttons/default-red.png)](https://github.com/sponsors/ixartz)

Web Development JavaScript Libraries & Components
13K Github Stars
Next-JS-Landing-Page-Starter-Template
Open Source

Next-JS-Landing-Page-Starter-Template

# Landing Page Template built with Next JS 14+, Tailwind CSS 3 and TypeScript [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40Ixartz)](https://twitter.com/ixartz) <p align="center"> <a href="https://creativedesignsguru.com/demo/nextjs-landing-page/"><img src="public/assets/images/nextjs-landing-page-banner.png?raw=true" alt="Next js starter banner"></a> </p> πŸš€ Landing Page theme written in Next.js, Tailwind CSS and TypeScript ⚑️ Made with developer experience first: Next.js, TypeScript, ESLint, Prettier, Husky, Lint-Staged, VSCode, Netlify, PostCSS, Tailwind CSS. Clone this project and use it to create your own [Next.js](https://nextjs.org) project. You can check a [Next js templates demo](https://creativedesignsguru.com/demo/nextjs-landing-page/). ## Sponsors <table width="100%"> <tr height="187px"> <td align="center" width="33%"> <a href="https://go.clerk.com/zGlzydF"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> <img alt="Clerk – Authentication & User Management for Next.js" src="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/coderabbit-logo-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/coderabbit-logo-light.svg?raw=true"> <img alt="CodeRabbit" src="public/assets/images/coderabbit-logo-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/sentry-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/sentry-dark.png?raw=true"> <img alt="Sentry" src="public/assets/images/sentry-dark.png?raw=true"> </picture> </a> <a href="https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/codecov-white.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/codecov-dark.svg?raw=true"> <img alt="Codecov" src="public/assets/images/codecov-dark.svg?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://launch.arcjet.com/Q6eLbRE"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/arcjet-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/arcjet-light.svg?raw=true"> <img alt="Arcjet" src="public/assets/images/arcjet-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://l.crowdin.com/next-js"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/crowdin-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/crowdin-dark.png?raw=true"> <img alt="Crowdin" src="public/assets/images/crowdin-dark.png?raw=true"> </picture> </a> </td> <td align="center" style=width="33%"> <a href="https://nextjs-boilerplate.com/pro-saas-starter-kit"> <img src="public/assets/images/nextjs-boilerplate-saas.png?raw=true" alt="Next.js SaaS Boilerplate with React" /> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="mailto:[email protected]"> Add your logo here </a> </td> </tr> </table> ### DEMO [![Nextjs Landing Page Template Screenshot](public/assets/images/nextjs-landing-page-screenshot.png?raw=true)](https://creativedesignsguru.com/demo/nextjs-landing-page/) Check out our [live demo](https://creativedesignsguru.com/demo/nextjs-landing-page/). ### Features Developer experience first: - πŸ”₯ [Next.js](https://nextjs.org) for Static Site Generator - 🎨 Integrate with [Tailwind CSS](https://tailwindcss.com) - πŸ’… PostCSS for processing Tailwind CSS and integrated to `styled-jsx` - πŸŽ‰ Type checking [TypeScript](https://www.typescriptlang.org) - βœ… Strict Mode for TypeScript and React 18 - ✏️ Linter with [ESLint](https://eslint.org) (default NextJS, NextJS Core Web Vitals and Airbnb configuration) - πŸ›  Code Formatter with [Prettier](https://prettier.io) - 🦊 Husky for Git Hooks - 🚫 Lint-staged for running linters on Git staged files - πŸ—‚ VSCode configuration: Debug, Settings, Tasks and extension for PostCSS, ESLint, Prettier, TypeScript - πŸ€– SEO metadata, JSON-LD and Open Graph tags with Next SEO - βš™οΈ [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer) - πŸ–±οΈ One click deployment with Netlify (or manual deployment to any hosting services) - 🌈 Include a FREE theme - πŸ’― Maximize lighthouse score Built-in feature from Next.js: - β˜• Minify HTML & CSS - πŸ’¨ Live reload - βœ… Cache busting ### Included Components - Navbar - Hero - Features - CTA banner - Footer Find more components in our [premium NextJS themes](https://creativedesignsguru.com/category/nextjs/). ### Philosophy - Minimal code - SEO-friendly - πŸš€ Production-ready ### Requirements - Node.js and npm ### Getting started Run the following command on your local environment (for example, in [Warp](https://go.warp.dev/nextjs-bp)): ``` git clone --depth=1 https://github.com/ixartz/Next-JS-Landing-Page-Starter-Template.git my-project-name cd my-project-name npm install ``` Then, you can run locally in development mode with live reload (for example, in [Warp](https://go.warp.dev/nextjs-bp)): ``` npm run dev ``` Open http://localhost:3000 with your favorite browser to see your project. For your information, Next JS need to take some time to compile the project for your first time. ``` . β”œβ”€β”€ README.md # README file β”œβ”€β”€ next.config.js # Next JS configuration β”œβ”€β”€ public # Public folder β”‚ └── assets β”‚ └── images # Image used by default template β”œβ”€β”€ src β”‚ β”œβ”€β”€ background # Atomic background component β”‚ β”œβ”€β”€ button # Atomic button component β”‚ β”œβ”€β”€ cta # Atomic cta component β”‚ β”œβ”€β”€ feature # Atomic feature component β”‚ β”œβ”€β”€ footer # Atomic footer component β”‚ β”œβ”€β”€ hero # Atomic hero component β”‚ β”œβ”€β”€ layout # Atomic layout component β”‚ β”œβ”€β”€ navigation # Atomic navigation component β”‚ β”œβ”€β”€ pages # Next JS pages β”‚ β”œβ”€β”€ styles # PostCSS style folder with Tailwind β”‚ β”œβ”€β”€ templates # Default template β”‚ └── utils # Utility folder β”œβ”€β”€ tailwind.config.js # Tailwind CSS configuration └── tsconfig.json # TypeScript configuration ``` ### Customization You can easily configure the theme. Please change the following file: - `public/apple-touch-icon.png`, `public/favicon.ico`, `public/favicon-16x16.png` and `public/favicon-32x32.png`: your favicon, you can generate from https://favicon.io/favicon-converter/ - `src/styles/global.css`: your CSS file using Tailwind CSS - `utils/AppConfig.ts`: configuration file - `src/pages/index.tsx`: the index page of the theme that uses the `Base` component - `src/template/Base.tsx`: the `Base` component using component blocks - `src/templates/*`: the list of component blocks - `src/*`: other folders in src are the atomic components used by components blocks Here is the layer: - the entry point: `index.tsx` in `src/pages` - the `Base` template: `Base.tsx` in `src/templates` - use component blocks from `src/templates/*` - use atomic components from `src/*` ### Deploy to production You can see the results locally in production mode with: ``` $ npm run build $ npm run start ``` The generated HTML and CSS files are minified (built-in feature from Next js). It will also removed unused CSS from [Tailwind CSS](https://tailwindcss.com). You can create an optimized production build with: ``` npm run build-prod ``` Now, your theme is ready to be deployed. All generated files are located at `out` folder, which you can deploy with any hosting service. ### Deploy to Netlify Clone this repository on own GitHub account and deploy to Netlify: [![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/ixartz/Next-JS-Landing-Page-Starter-Template) ### VSCode information (optional) If you are VSCode users, you can have a better integration with VSCode by installing the suggested extension in `.vscode/extension.json`. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience. Pro tips: if you need a project wide type checking with TypeScript, you can run a build with <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> on Mac. ### Contributions Everyone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug. ### License Licensed under the MIT License, Copyright Β© 2026 See [LICENSE](LICENSE) for more information. ## Sponsors <table width="100%"> <tr height="187px"> <td align="center" width="33%"> <a href="https://go.clerk.com/zGlzydF"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> <img alt="Clerk – Authentication & User Management for Next.js" src="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/coderabbit-logo-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/coderabbit-logo-light.svg?raw=true"> <img alt="CodeRabbit" src="public/assets/images/coderabbit-logo-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/sentry-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/sentry-dark.png?raw=true"> <img alt="Sentry" src="public/assets/images/sentry-dark.png?raw=true"> </picture> </a> <a href="https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/codecov-white.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/codecov-dark.svg?raw=true"> <img alt="Codecov" src="public/assets/images/codecov-dark.svg?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://launch.arcjet.com/Q6eLbRE"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/arcjet-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/arcjet-light.svg?raw=true"> <img alt="Arcjet" src="public/assets/images/arcjet-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://l.crowdin.com/next-js"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/crowdin-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/crowdin-dark.png?raw=true"> <img alt="Crowdin" src="public/assets/images/crowdin-dark.png?raw=true"> </picture> </a> </td> <td align="center" style=width="33%"> <a href="https://nextjs-boilerplate.com/pro-saas-starter-kit"> <img src="public/assets/images/nextjs-boilerplate-saas.png?raw=true" alt="Next.js SaaS Boilerplate with React" /> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="mailto:[email protected]"> Add your logo here </a> </td> </tr> </table> --- Made with β™₯ by [CreativeDesignsGuru](https://creativedesignsguru.com) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40Ixartz)](https://twitter.com/ixartz) [![Sponsor Next JS Boilerplate](https://cdn.buymeacoffee.com/buttons/default-red.png)](https://github.com/sponsors/ixartz)

Web Development Frontend Templates
2.1K Github Stars
Astro-boilerplate
Open Source

Astro-boilerplate

# Astro Boilerplate with TypeScript and Tailwind CSS [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40Ixartz)](https://twitter.com/ixartz) πŸš€ Astro Boilerplate is starter code for your blog or portfolio based on Astro with Tailwind CSS 3.0. ⚑️ Made with Astro, TypeScript, ESLint, Prettier, Tailwind CSS. Clone this project and use it to create your own Astro blog. You can check the [Astro templates demo](https://creativedesignsguru.com/demo/astro-boilerplate/). ## Sponsors <table width="100%"> <tr height="187px"> <td align="center" width="33%"> <a href="https://go.clerk.com/zGlzydF"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> <img alt="Clerk – Authentication & User Management for Next.js" src="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/coderabbit-logo-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/coderabbit-logo-light.svg?raw=true"> <img alt="CodeRabbit" src="public/assets/images/coderabbit-logo-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/sentry-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/sentry-dark.png?raw=true"> <img alt="Sentry" src="public/assets/images/sentry-dark.png?raw=true"> </picture> </a> <a href="https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/codecov-white.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/codecov-dark.svg?raw=true"> <img alt="Codecov" src="public/assets/images/codecov-dark.svg?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://launch.arcjet.com/Q6eLbRE"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/arcjet-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/arcjet-light.svg?raw=true"> <img alt="Arcjet" src="public/assets/images/arcjet-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://l.crowdin.com/next-js"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/crowdin-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/crowdin-dark.png?raw=true"> <img alt="Crowdin" src="public/assets/images/crowdin-dark.png?raw=true"> </picture> </a> </td> <td align="center" style=width="33%"> <a href="https://nextjs-boilerplate.com/pro-saas-starter-kit"> <img src="public/assets/images/nextjs-boilerplate-saas.png?raw=true" alt="Next.js SaaS Boilerplate with React" /> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="mailto:[email protected]"> Add your logo here </a> </td> </tr> </table> ## Features A complete Blog feature: - 🎈 Syntax Highlighting - πŸ€– SEO friendly with sitemap.xml and robots.txt - βš™οΈ RSS feed - πŸ“– Pagination - 🌈 Include a dark blog theme - ⬇️ Markdown - πŸ“¦ Image lazy loading - πŸ’Ž Responsive design Developer experience first: - πŸ”₯ Astro - 🎨 Tailwind CSS with aspect ratio and typography plugin - πŸŽ‰ TypeScript - ✏️ ESLint compatible with .astro files - πŸ›  Prettier compatible with .astro files - 🦊 Husky - 🚫 lint-staged - 🚨 Commitlint - πŸ”§ One-click deploy on Netlify (or, manual if you prefer) ESLint with: - Airbnb styled guide - TypeScript compatible - Astro compatible - Automatically remove unused imports - Import sorting - Tailwind CSS plugin ### Philosophy - Minimal code - SEO-friendly - πŸš€ Production-ready ### Requirements - Node.js and npm #### Optional - [nvm](https://github.com/nvm-sh/nvm) - [volta](https://volta.sh/) While Astro-boilerplate should work with the latest Node version, it has been tested with the versions in .nvmrc & the bottom of package.json. At current writing, that's Node v16.15.1 ### Getting started Run the following command on your local environment (for example, in [Warp](https://go.warp.dev/nextjs-bp)): ``` bash git clone --depth=1 https://github.com/ixartz/Astro-boilerplate cd my-project-name npm install ``` Then, you can run locally in development mode with live reload: ``` bash npm run dev ``` Open [http://localhost:4321](http://localhost:4321) with your favorite browser to see your project. ### Deploy to production (manual) You can create an optimized production build with: ```shell npm run build ``` Now, your blog is ready to be deployed. All generated files are located at `dist` folder, which you can deploy the folder to any hosting service you prefer. ### Deploy to Netlify Clone this repository on own GitHub account and deploy to Netlify: [![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/ixartz/Astro-boilerplate) ## 🧞 Commands All commands are run from the root of the project, from a terminal: | Command | Action | |:---------------- |:-------------------------------------------- | | `npm install` | Installs dependencies | | `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run clean` | Remove `./dist` folder | | `npm run lint` | Run ESLint and report styling error | ### Contributions Everyone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug. ### Additional Checks This README.md was linted with [markdownlint](https://github.com/igorshubovych/markdownlint-cli) ### License Licensed under the MIT License, Copyright Β© 2024 ## Sponsors <table width="100%"> <tr height="187px"> <td align="center" width="33%"> <a href="https://go.clerk.com/zGlzydF"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> <img alt="Clerk – Authentication & User Management for Next.js" src="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/coderabbit-logo-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/coderabbit-logo-light.svg?raw=true"> <img alt="CodeRabbit" src="public/assets/images/coderabbit-logo-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/sentry-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/sentry-dark.png?raw=true"> <img alt="Sentry" src="public/assets/images/sentry-dark.png?raw=true"> </picture> </a> <a href="https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/codecov-white.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/codecov-dark.svg?raw=true"> <img alt="Codecov" src="public/assets/images/codecov-dark.svg?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://launch.arcjet.com/Q6eLbRE"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/arcjet-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/arcjet-light.svg?raw=true"> <img alt="Arcjet" src="public/assets/images/arcjet-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://l.crowdin.com/next-js"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/crowdin-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/crowdin-dark.png?raw=true"> <img alt="Crowdin" src="public/assets/images/crowdin-dark.png?raw=true"> </picture> </a> </td> <td align="center" style=width="33%"> <a href="https://nextjs-boilerplate.com/pro-saas-starter-kit"> <img src="public/assets/images/nextjs-boilerplate-saas.png?raw=true" alt="Next.js SaaS Boilerplate with React" /> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="mailto:[email protected]"> Add your logo here </a> </td> </tr> </table> --- Made with β™₯ by [CreativeDesignsGuru](https://creativedesignsguru.com) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40Ixartz)](https://twitter.com/ixartz) [![Sponsor Next JS Boilerplate](https://cdn.buymeacoffee.com/buttons/default-red.png)](https://github.com/sponsors/ixartz)

Frontend Templates JavaScript Libraries & Components
914 Github Stars
SaaS-Boilerplate
Open Source

SaaS-Boilerplate

# Free and Open Source SaaS Boilerplate with Tailwind CSS and Shadcn UI <p align="center"> <a href="https://react-saas.com"><img height="300" src="public/assets/images/nextjs-starter-banner.png?raw=true" alt="Next.js SaaS Template"></a> </p> πŸš€ **SaaS Boilerplate** is a powerful and fully customizable template to kickstart your SaaS applications. Built with **Next.js** and **Tailwind CSS**, and the modular UI components of **Shadcn UI**. This **Next.js SaaS Template** helps you to quickly build and launch SaaS with minimal effort. Packed with essential features like built-in **Authentication**, **Multi-Tenancy** with Team support, **Role & Permission**, Database, I18n (internationalization), Landing Page, User Dashboard, Form handling, SEO optimization, Logging, Error reporting with [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo), Testing, Deployment, Monitoring, and **User Impersonation**, this SaaS template provides everything you need to get started. Designed with developers in mind, this **Next.js Starter Kit** uses TypeScript for type safety and integrates ESLint to maintain code quality, along with Prettier for consistent code formatting. The testing suite combines Vitest and Playwright for robust unit, integration, and E2E testing. Continuous integration and deployment are managed via GitHub Actions. For user management, authentication is handled by [Clerk](https://go.clerk.com/zGlzydF). For database operations, it uses Drizzle ORM for type-safe database management across popular databases like PostgreSQL, SQLite, and MySQL. One recommended option is to use [Neon](https://get.neon.com/BMFYNtx), which provides a free PostgreSQL database that is compatible and has been tested with SaaS Boilerplate. Whether you're building a new SaaS app or looking for a flexible, **production-ready SaaS template**, this boilerplate has you covered. This free, open-source starter kit has everything you need to accelerate your development and scale your product with ease. Clone this project and use it to create your own SaaS. You can check the live demo at [SaaS Boilerplate](https://react-saas.com), which is a demo with a working authentication and multi-tenancy system. ## Sponsors <table width="100%"> <tr height="187px"> <td align="center" width="33%"> <a href="https://go.clerk.com/zGlzydF"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> <img alt="Clerk – Authentication & User Management for Next.js" src="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/coderabbit-logo-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/coderabbit-logo-light.svg?raw=true"> <img alt="CodeRabbit" src="public/assets/images/coderabbit-logo-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/sentry-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/sentry-dark.png?raw=true"> <img alt="Sentry" src="public/assets/images/sentry-dark.png?raw=true"> </picture> </a> <a href="https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/codecov-white.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/codecov-dark.svg?raw=true"> <img alt="Codecov" src="public/assets/images/codecov-dark.svg?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://launch.arcjet.com/Q6eLbRE"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/arcjet-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/arcjet-light.svg?raw=true"> <img alt="Arcjet" src="public/assets/images/arcjet-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://l.crowdin.com/next-js"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/crowdin-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/crowdin-dark.png?raw=true"> <img alt="Crowdin" src="public/assets/images/crowdin-dark.png?raw=true"> </picture> </a> </td> <td align="center" style=width="33%"> <a href="https://nextjs-boilerplate.com/pro-saas-starter-kit"> <img src="public/assets/images/nextjs-boilerplate-saas.png?raw=true" alt="Next.js SaaS Boilerplate with React" /> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="mailto:[email protected]"> Add your logo here </a> </td> </tr> </table> ### Demo **Live demo: [SaaS Boilerplate](https://react-saas.com)** | Landing Page | User Dashboard | | --- | --- | | [![Next.js Boilerplate SaaS Landing Page](public/assets/images/nextjs-boilerplate-saas-landing-page.png)](https://react-saas.com) | [![Next.js Boilerplate SaaS User Dashboard](public/assets/images/nextjs-boilerplate-saas-user-dashboard.png)](https://react-saas.com/dashboard) | | Team Management | User Profile | | --- | --- | | [![Next.js Boilerplate SaaS Team Management](public/assets/images/nextjs-boilerplate-saas-multi-tenancy.png)](https://react-saas.com/dashboard/organization-profile/organization-members) | [![Next.js Boilerplate SaaS User Profile](public/assets/images/nextjs-boilerplate-saas-user-profile.png)](https://react-saas.com/dashboard/user-profile) | | Sign Up | Sign In | | --- | --- | | [![Next.js Boilerplate SaaS Sign Up](public/assets/images/nextjs-boilerplate-saas-sign-up.png)](https://react-saas.com/sign-up) | [![Next.js Boilerplate SaaS Sign In](public/assets/images/nextjs-boilerplate-saas-sign-in.png)](https://react-saas.com/sign-in) | | Landing Page with Dark Mode (Pro Version) | User Dashboard with Dark Mode (Pro Version) | | --- | --- | | [![Next.js Boilerplate SaaS Landing Page Dark Mode](public/assets/images/nextjs-boilerplate-saas-landing-page-dark-mode.png)](https://pro-demo.nextjs-boilerplate.com) | [![Next.js Boilerplate SaaS User Dashboard Dark Mode](public/assets/images/nextjs-boilerplate-saas-user-dashboard-sidebar-dark-mode.png)](https://pro-demo.nextjs-boilerplate.com/dashboard) | | User Dashboard with Sidebar (Pro Version) | | --- | | [![Next.js Boilerplate SaaS User Dashboard Sidebar](public/assets/images/nextjs-boilerplate-saas-user-dashboard-sidebar.png)](https://pro-demo.nextjs-boilerplate.com) | ### Features Developer experience first, extremely flexible code structure and only keep what you need: - ⚑ [Next.js](https://nextjs.org) with App Router support - πŸ”₯ Type checking [TypeScript](https://www.typescriptlang.org) - πŸ’Ž Integrate with [Tailwind CSS](https://tailwindcss.com) and Shadcn UI - βœ… Strict Mode for TypeScript and React 19 - πŸ”’ Authentication with [Clerk](https://go.clerk.com/zGlzydF): Sign up, Sign in, Sign out, Forgot password, Reset password, and more. - πŸ‘€ Passwordless Authentication with Magic Links, Multi-Factor Auth (MFA), Social Auth (Google, Facebook, Twitter, GitHub, Apple, and more), Passwordless login with Passkeys, User Impersonation - πŸ‘₯ Multi-tenancy & team support: create, switch, update organization and invite team members - πŸ“ Role-based access control and permissions - πŸ‘€ Multi-Factor Auth (MFA), Social Auth (Google, Facebook, Twitter, GitHub, Apple, and more), User Impersonation - πŸ“¦ Type-safe ORM with DrizzleORM, compatible with PostgreSQL, SQLite, and MySQL - πŸ’½ Offline and local development database with PGlite - ☁️ Remote and production database with [Neon](https://get.neon.com/BMFYNtx) - 🌐 Multi-language (i18n) with [next-intl](https://next-intl-docs.vercel.app/) and [Crowdin](https://l.crowdin.com/next-js) - ♻️ Type-safe environment variables with T3 Env - ⌨️ Form with [React Hook Form](https://react-hook-form.com) - πŸ”΄ Validation library with [Zod](https://zod.dev) - πŸ“ Linter with [ESLint](https://eslint.org) (default NextJS, NextJS Core Web Vitals, Tailwind CSS and Antfu configuration) - πŸ’– Code Formatter with [Prettier](https://prettier.io) - 🦊 Lefthook for Git hooks - πŸš“ Lint git commit with Commitlint - πŸ““ Write standard compliant commit messages with Commitizen - 🦺 Unit Testing with [Vitest](https://vitest.dev) and Browser Mode - πŸ§ͺ Integration and E2E Testing with [Playwright](https://playwright.dev) - πŸ‘· Run tests on pull requests with GitHub Actions - πŸŽ‰ [Storybook](https://storybook.js.org) for UI development - 🚨 Error Monitoring with [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) - β˜‚οΈ Code coverage with [Codecov](https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) - πŸ“ Logging with LogTape and Log Management with [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) - πŸ–₯️ Monitoring as Code with [Checkly](https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) - 🎁 Automatic changelog generation with Semantic Release - πŸ” Visual regression testing - πŸ’‘ Absolute Imports using `@` prefix - πŸ—‚ VSCode configuration: Debug, Settings, Tasks and Extensions - πŸ€– SEO metadata, JSON-LD and Open Graph tags - πŸ—ΊοΈ Sitemap.xml and robots.txt - ⌘ Database exploration with Drizzle Studio and CLI migration tool with Drizzle Kit - βš™οΈ [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer) - 🌈 Include a FREE minimalist theme - πŸ’― Maximize lighthouse score Built-in features from Next.js: - β˜• Minify HTML & CSS - πŸ’¨ Live reload - βœ… Cache busting ### Philosophy - Nothing is hidden from you, allowing you to make any necessary adjustments to suit your requirements and preferences. - Dependencies are updated every month - Start for free without upfront costs - Easy to customize - Minimal code - SEO-friendly - Everything you need to build a SaaS - πŸš€ Production-ready ### Requirements - Node.js 24+ and npm ### Getting started Run the following command on your local environment: ```shell git clone --depth=1 https://github.com/ixartz/SaaS-Boilerplate.git my-project-name cd my-project-name npm install ``` For your information, all dependencies are updated every month. Then, you can run the project locally in development mode with live reload by executing: ```shell npm run dev ``` This command starts Next.js, a local PostgreSQL-compatible PGlite database, and Sentry Spotlight at the same time. Open http://localhost:3000 with your favorite browser to see your project. Need advanced features? Next.js 16 & React 19, Multi-tenancy & Teams, Roles & Permissions, Shadcn UI, End-to-End Typesafety with oRPC, Stripe Payment, Light / Dark mode. Try [Next.js Boilerplate Pro](https://nextjs-boilerplate.com/pro-saas-starter-kit). Or, need a Self-hosted auth stack (Better Auth)? Try [Next.js Boilerplate Max](https://nextjs-boilerplate.com/nextjs-multi-tenant-saas-boilerplate) ### Free vs Pro vs Max version This project offers a free open-source version and premium Pro/Max versions. Here's a detailed comparison: | Features | Free Version | Pro Version | Max Version | |---------|:------------:|:-----------:|:-----------:| | **Authentication** | βœ… | βœ… | βœ… | | **Self-Hosted Authentication (Better Auth)** | ❌ | ❌ | βœ… | | **Social Login (Google, Facebook, GitHub, etc.)** | βœ… | βœ… | βœ… | | **Multi-Factor Auth & User Impersonation** | βœ… | βœ… | βœ… | | **Multi-tenancy & Team Support** | βœ… | βœ… | βœ… | | **Role-based Access Control (RBAC)** | βœ… | βœ… | βœ… | | **Landing Page (Hero, Features, Pricing)** | βœ… | βœ… | βœ… | | **Internationalization (i18n)** | βœ… | βœ… | βœ… | | **Drizzle ORM & Dev Database** | βœ… | βœ… | βœ… | | **GitHub Actions** | βœ… | βœ… | βœ… | | **VSCode Configuration** | βœ… | βœ… | βœ… | | **Built for Humans & AI Agents (Agents.md)** | ❌ | βœ… | βœ… | | **Transactional Emails (React Email)** | ❌ | ❌ | βœ… | | **Bun: package manager** | ❌ | ❌ | βœ… | | **[Sentry Error Monitoring](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo)** | βœ… | βœ… | βœ… | | **Shadcn UI** | βœ… | βœ… | βœ… | | **Next.js** | 16 | 16 | 16 | | **React** | 19 | 19 | 19 | | **Tailwind CSS** | 4 | 4 | 4 | | **ESLint** | 10 | 10 | 10 | | **User Dashboard** | Basic | Extended | Extended | | **Code Quality Tools** | Basic | Extended | Extended | | **Testing: Unit, Integration, E2E, Visual** | Basic | Extended | Extended | | **Stripe Integration** | ❌ | βœ… | βœ… | | **Todo App Example (CRUD)** | ❌ | βœ… | βœ… | | **End-to-End Typesafe APIs (oRPC)** | ❌ | βœ… | βœ… | | **Dark Mode** | ❌ | βœ… | βœ… | | **Email support (1 year)** | ❌ | βœ… | βœ… | **Live Demos:** - Free Version: [https://react-saas.com](https://react-saas.com) - Pro Version: [https://pro-demo.nextjs-boilerplate.com](https://pro-demo.nextjs-boilerplate.com) - Max Version: [https://max-demo.nextjs-boilerplate.com](https://max-demo.nextjs-boilerplate.com) ### Set up authentication Create a Clerk account at [Clerk.com](https://go.clerk.com/zGlzydF) and create a new application in the Clerk Dashboard. Then, copy the values of `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` into the `.env.local` file (which is not tracked by Git): ```shell NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_pub_key CLERK_SECRET_KEY=your_clerk_secret_key ``` In your Clerk Dashboard, you also need to `Enable Organization` by navigating to `Organization management` > `Settings` > `Enable organization`. Now, you have a fully working authentication system with Next.js: Sign up, Sign in, Sign out, Forgot password, Reset password, Update profile, Update password, Update email, Delete account, and more. ### Set up remote database The project uses DrizzleORM, a type-safe ORM that is compatible with PostgreSQL, SQLite, and MySQL databases. By default, the project is set up to work seamlessly with PostgreSQL and you can easily choose any PostgreSQL database provider. To set up a remote and production database, you need to create a PostgreSQL database and obtain the connection string. One recommended option is to use [Neon](https://get.neon.com/BMFYNtx), which provides a free PostgreSQL database. This database is compatible and has been tested with Next.js Boilerplate. ### Translation (i18n) setup For translation, the project uses `next-intl` combined with [Crowdin](https://l.crowdin.com/next-js). As a developer, you only need to take care of the English (or another default language) version. Translations for other languages are automatically generated and handled by Crowdin. You can use Crowdin to collaborate with your translation team or translate the messages yourself with the help of machine translation. To set up translation (i18n), create an account at [Crowdin.com](https://l.crowdin.com/next-js) and create a new project. In the newly created project, you will be able to find the project ID. You will also need to create a new Personal Access Token by going to Account Settings > API. Then, in your GitHub Actions, you need to define the following environment variables: `CROWDIN_PROJECT_ID` and `CROWDIN_PERSONAL_TOKEN`. After defining the environment variables in your GitHub Actions, your localization files will be synchronized with Crowdin every time you push a new commit to the `main` branch. ### Project structure ```shell . β”œβ”€β”€ README.md # README file β”œβ”€β”€ .github # GitHub folder β”œβ”€β”€ .storybook # Storybook folder β”œβ”€β”€ .vscode # VSCode configuration β”œβ”€β”€ lefthook.yml # Git hooks configuration β”œβ”€β”€ migrations # Database migrations β”œβ”€β”€ public # Public assets folder β”œβ”€β”€ scripts # Scripts folder β”œβ”€β”€ src β”‚ β”œβ”€β”€ app # Next JS App (App Router) β”‚ β”œβ”€β”€ components # Reusable components β”‚ β”œβ”€β”€ features # Components specific to a feature β”‚ β”œβ”€β”€ libs # 3rd party libraries configuration β”‚ β”œβ”€β”€ locales # Locales folder (i18n messages) β”‚ β”œβ”€β”€ models # Database models β”‚ β”œβ”€β”€ styles # Styles folder β”‚ β”œβ”€β”€ templates # Templates folder β”‚ β”œβ”€β”€ types # Type definitions β”‚ └── utils # Utilities folder β”œβ”€β”€ tests β”‚ β”œβ”€β”€ e2e # E2E tests, also includes Monitoring as Code β”‚ └── integration # Integration tests β”œβ”€β”€ next.config.ts # Next.js configuration β”œβ”€β”€ package.json # NPM dependencies and scripts β”œβ”€β”€ playwright.config.ts # Playwright configuration └── tsconfig.json # TypeScript configuration ``` ### Customization You can easily configure Next.js SaaS Boilerplate by searching the entire project for `FIXME:` to make quick customization. Here are some of the most important files to customize: - `public/apple-touch-icon.png`, `public/favicon.ico`, `public/favicon-16x16.png` and `public/favicon-32x32.png`: your website favicon - `src/utils/AppConfig.ts`: configuration file - `src/templates/BaseTemplate.tsx`: default theme - `next.config.mjs`: Next.js configuration - `.env`: default environment variables You have full access to the source code for further customization. The provided code is just an example to help you start your project. The sky's the limit πŸš€. In the source code, you will also find `PRO` comments that indicate the code that is only available in the PRO version. You can easily remove or replace this code with your own implementation. ### Change database schema To modify the database schema in the project, you can update the schema file located at `./src/models/Schema.ts`. This file defines the structure of your database tables using the Drizzle ORM library. After making changes to the schema, generate a migration by running the following command: ```shell npm run db:generate ``` This will create a migration file that reflects your schema changes. The migration is automatically applied during the next database interaction, so there is no need to run it manually or restart the Next.js server. ### Commit Message Format The project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification, meaning all commit messages must be formatted accordingly. To help you write commit messages, the project uses [Commitizen](https://github.com/commitizen/cz-cli), an interactive CLI that guides you through the commit process. To use it, run the following command: ```shell npm run commit ``` One of the benefits of using Conventional Commits is the ability to automatically generate a `CHANGELOG` file. It also allows us to automatically determine the next version number based on the types of commits that are included in a release. ### Testing All unit tests are located alongside the source code in the same directory, making them easier to find. The project uses Vitest with browser mode for UI-oriented tests. You can run the tests with the following command: ```shell npm run test ``` ### Integration & E2E Testing The project uses Playwright for integration and end-to-end (E2E) testing. You can run the tests with the following commands: ```shell npx playwright install # Only for the first time in a new environment npm run test:e2e ``` In GitHub Actions, visual regression testing runs with Chromatic. ### Enable Edge runtime (optional) The App Router folder is compatible with the Edge runtime. You can enable it by adding the following lines `src/app/layouts.tsx`: ```tsx export const runtime = 'edge'; ``` For your information, the database migration is not compatible with the Edge runtime. So, you need to disable the automatic migration in `src/libs/DB.ts`: ```tsx await migrate(db, { migrationsFolder: './migrations' }); ``` After disabling it, you are required to run the migration manually with: ```shell npm run db:migrate ``` You also require to run the command each time you want to update the database schema. ### Deploy to production During the build process, database migrations are automatically executed, so there's no need to run them manually. However, you must define `DATABASE_URL` in your environment variables. Then, you can generate a production build with: ```shell $ npm run build ``` It generates an optimized production build of the boilerplate. To test the generated build, run: ```shell $ npm run start ``` You also need to defined the environment variables `CLERK_SECRET_KEY` using your own key. This command starts a local server using the production build. You can now open http://localhost:3000 in your preferred browser to see the result. ### Error Monitoring The project uses [Sentry](https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) to monitor errors. In the development environment, no additional setup is needed: NextJS SaaS Boilerplate is pre-configured to use Sentry and Spotlight (Sentry for Development). All errors will automatically be sent to your local Spotlight instance, allowing you to experience Sentry locally. For production environment, you'll need to create a Sentry account and a new project. Then, in `next.config.mjs`, you need to update the `org` and `project` attributes in `withSentryConfig` function. Additionally, add your Sentry DSN to `sentry.client.config.ts`, `sentry.edge.config.ts` and `sentry.server.config.ts`. ### Code coverage Next.js SaaS Template relies on [Codecov](https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) for code coverage reporting solution. To enable Codecov, create a Codecov account and connect it to your GitHub account. Your repositories should appear on your Codecov dashboard. Select the desired repository and copy the token. In GitHub Actions, define the `CODECOV_TOKEN` environment variable and paste the token. Make sure to create `CODECOV_TOKEN` as a GitHub Actions secret, do not paste it directly into your source code. ### Logging The project uses LogTape for logging. In the development environment, logs are displayed in the console by default. For production, the project is already integrated with [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) to manage and query your logs using SQL. To use Better Stack, you need to create a [Better Stack](https://betterstack.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) account and create a new source: go to your Better Stack Logs Dashboard > Sources > Connect source. Then, you need to give a name to your source and select Node.js as the platform. After creating the source, you will be able to view and copy your source token and ingesting host. In your environment variables, paste them into `NEXT_PUBLIC_BETTER_STACK_SOURCE_TOKEN` and `NEXT_PUBLIC_BETTER_STACK_INGESTING_HOST`. ### Checkly monitoring The project uses [Checkly](https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate) to ensure that your production environment is always up and running. At regular intervals, Checkly runs the tests ending with `*.check.e2e.ts` extension and notifies you if any of the tests fail. Additionally, you have the flexibility to execute tests from multiple locations to ensure that your application is available worldwide. To use Checkly, you must first create an account on [their website](https://www.checklyhq.com/?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate). After creating an account, generate a new API key in the Checkly Dashboard and set the `CHECKLY_API_KEY` environment variable in GitHub Actions. Additionally, you will need to define the `CHECKLY_ACCOUNT_ID`, which can also be found in your Checkly Dashboard under User Settings > General. To complete the setup, update the `checkly.config.ts` file with your own email address and production URL. ### Useful commands #### Bundle Analyzer Next.js SaaS Starter Kit includes a built-in bundle analyzer. It can be used to analyze the size of your JavaScript bundles. To begin, run the following command: ```shell npm run build-stats ``` By running the command, it'll automatically open a new browser window with the results. #### Database Studio The project is already configured with Drizzle Studio to explore the database. You can run the following command to open the database studio: ```shell npm run db:studio ``` Then, you can open https://local.drizzle.studio with your favorite browser to explore your database. ### VSCode information (optional) If you are VSCode user, you can have a better integration with VSCode by installing the suggested extension in `.vscode/extension.json`. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience. With the plugins installed in your VSCode, ESLint and Prettier can automatically fix the code and display errors. The same applies to testing: you can install the VSCode Vitest extension to automatically run your tests, and it also shows the code coverage in context. Pro tips: if you need a project wide-type checking with TypeScript, you can run a build with <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> on Mac. ### Contributions Everyone is welcome to contribute to this project. Feel free to open an issue if you have any questions or find a bug. Totally open to suggestions and improvements. ### License Licensed under the MIT License, Copyright Β© 2026 See [LICENSE](LICENSE) for more information. ## Sponsors <table width="100%"> <tr height="187px"> <td align="center" width="33%"> <a href="https://go.clerk.com/zGlzydF"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/6fb61971-3bf1-4580-98a0-10bd3f1040a2"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> <img alt="Clerk – Authentication & User Management for Next.js" src="https://github.com/ixartz/SaaS-Boilerplate/assets/1328388/f80a8bb5-66da-4772-ad36-5fabc5b02c60"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://www.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/coderabbit-logo-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/coderabbit-logo-light.svg?raw=true"> <img alt="CodeRabbit" src="public/assets/images/coderabbit-logo-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://sentry.io/for/nextjs/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/sentry-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/sentry-dark.png?raw=true"> <img alt="Sentry" src="public/assets/images/sentry-dark.png?raw=true"> </picture> </a> <a href="https://about.codecov.io/codecov-free-trial/?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/codecov-white.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/codecov-dark.svg?raw=true"> <img alt="Codecov" src="public/assets/images/codecov-dark.svg?raw=true"> </picture> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="https://launch.arcjet.com/Q6eLbRE"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/arcjet-dark.svg?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/arcjet-light.svg?raw=true"> <img alt="Arcjet" src="public/assets/images/arcjet-light.svg?raw=true"> </picture> </a> </td> <td align="center" width="33%"> <a href="https://l.crowdin.com/next-js"> <picture> <source media="(prefers-color-scheme: dark)" srcset="public/assets/images/crowdin-white.png?raw=true"> <source media="(prefers-color-scheme: light)" srcset="public/assets/images/crowdin-dark.png?raw=true"> <img alt="Crowdin" src="public/assets/images/crowdin-dark.png?raw=true"> </picture> </a> </td> <td align="center" style=width="33%"> <a href="https://nextjs-boilerplate.com/pro-saas-starter-kit"> <img src="public/assets/images/nextjs-boilerplate-saas.png?raw=true" alt="Next.js SaaS Boilerplate with React" /> </a> </td> </tr> <tr height="187px"> <td align="center" width="33%"> <a href="mailto:[email protected]"> Add your logo here </a> </td> </tr> </table> --- Made with β™₯ by [CreativeDesignsGuru](https://creativedesignsguru.com) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40Ixartz)](https://twitter.com/ixartz) Looking for a custom boilerplate to kick off your project? I'd be glad to discuss how I can help you build one. Feel free to reach out anytime at [email protected]! [![Sponsor Next JS Boilerplate](https://cdn.buymeacoffee.com/buttons/default-red.png)](https://github.com/sponsors/ixartz)

Web Development Website Builders
7.2K Github Stars