[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10115":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":15,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":46,"readmeContent":47,"aiSummary":48,"trendingCount":16,"starSnapshotCount":16,"syncStatus":49,"lastSyncTime":50,"discoverSource":51},10115,"Next-js-Boilerplate","ixartz\u002FNext-js-Boilerplate","ixartz","🚀🎉📚 Nextjs Boilerplate and Starter with App Router and Page Router support, Tailwind CSS 4 and TypeScript ⚡️ Made with developer experience first: Next.js 16 + TypeScript + ESLint + Prettier + Drizzle ORM + Husky + Lint-Staged + Vitest + Testing Library + Playwright + Storybook + Commitlint + VSCode + Sentry + PostCSS + Tailwind CSS ✨","https:\u002F\u002Fnextjs-boilerplate.com",null,"TypeScript",12978,2392,56,3,0,16,65,10,45,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"boilerplate","boilerplate-code","jamstack","javascript","js-boilerplate","netlify-template","next-js","next-theme","nextjs","nextjs-starter","nextjs-template","react","react-boilerplate","reactjs","starter-kit","starter-project","starter-template","tailwind-css","tailwindcss","typescript","2026-06-12 02:02:17","# Boilerplate and Starter for Next.js 16+, Tailwind CSS 4, and TypeScript.\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fdemo.nextjs-boilerplate.com\">\n    \u003Cimg\n      src=\"public\u002Fassets\u002Fimages\u002Fnextjs-starter-banner.png?raw=true\"\n      alt=\"Next js starter banner\"\n      style=\"max-width: 100%; height: auto;\"\n    \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n🚀 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:\u002F\u002Fclerk.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:\u002F\u002Fget.neon.com\u002FBMFYNtx), Error Monitoring with [Sentry](https:\u002F\u002Fsentry.io\u002Ffor\u002Fnextjs\u002F?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:\u002F\u002Flaunch.arcjet.com\u002FQ6eLbRE) (Bot detection, Rate limiting, Attack protection, etc.), and more.\n\nClone this project and use it to create your own Next.js project. You can check out the live demo at [Next.js Boilerplate](https:\u002F\u002Fdemo.nextjs-boilerplate.com), which includes a working authentication system.\n\n## Sponsors\n\n\u003Ctable width=\"100%\">\n  \u003Ctr height=\"187px\">\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fclerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Fixartz\u002FSaaS-Boilerplate\u002Fassets\u002F1328388\u002F6fb61971-3bf1-4580-98a0-10bd3f1040a2\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fgithub.com\u002Fixartz\u002FSaaS-Boilerplate\u002Fassets\u002F1328388\u002Ff80a8bb5-66da-4772-ad36-5fabc5b02c60\">\n          \u003Cimg alt=\"Clerk – Authentication & User Management for Next.js\" src=\"https:\u002F\u002Fgithub.com\u002Fixartz\u002FSaaS-Boilerplate\u002Fassets\u002F1328388\u002Ff80a8bb5-66da-4772-ad36-5fabc5b02c60\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fwww.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcoderabbit-logo-dark.svg?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcoderabbit-logo-light.svg?raw=true\">\n          \u003Cimg alt=\"CodeRabbit\" src=\"public\u002Fassets\u002Fimages\u002Fcoderabbit-logo-light.svg?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fsentry.io\u002Ffor\u002Fnextjs\u002F?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fsentry-white.png?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fsentry-dark.png?raw=true\">\n          \u003Cimg alt=\"Sentry\" src=\"public\u002Fassets\u002Fimages\u002Fsentry-dark.png?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr height=\"187px\">\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Flaunch.arcjet.com\u002FQ6eLbRE\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Farcjet-dark.svg?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Farcjet-light.svg?raw=true\">\n          \u003Cimg alt=\"Arcjet\" src=\"public\u002Fassets\u002Fimages\u002Farcjet-light.svg?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fl.crowdin.com\u002Fnext-js\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcrowdin-white.png?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcrowdin-dark.png?raw=true\">\n          \u003Cimg alt=\"Crowdin\" src=\"public\u002Fassets\u002Fimages\u002Fcrowdin-dark.png?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fbetterstack.com\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fbetter-stack-white.png?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fbetter-stack-dark.png?raw=true\">\n          \u003Cimg alt=\"Better Stack\" src=\"public\u002Fassets\u002Fimages\u002Fbetter-stack-dark.png?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr height=\"187px\">\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fposthog.com\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fposthog.com\u002Fbrand\u002Fposthog-logo-white.svg\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fposthog.com\u002Fbrand\u002Fposthog-logo.svg\">\n          \u003Cimg alt=\"PostHog\" src=\"https:\u002F\u002Fposthog.com\u002Fbrand\u002Fposthog-logo.svg\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fwww.checklyhq.com\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcheckly-logo-dark.png?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcheckly-logo-light.png?raw=true\">\n          \u003Cimg alt=\"Checkly\" src=\"public\u002Fassets\u002Fimages\u002Fcheckly-logo-light.png?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" style=width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fnextjs-boilerplate.com\u002Fpro-saas-starter-kit\">\n        \u003Cimg src=\"public\u002Fassets\u002Fimages\u002Fnextjs-boilerplate-saas.png?raw=true\" alt=\"Next.js SaaS Boilerplate with React\" \u002F>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr height=\"187px\">\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"mailto:contact@nextjs-boilerplate.com\">\n        Add your logo here\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n### Demo\n\n**Live demo: [Next.js Boilerplate](https:\u002F\u002Fdemo.nextjs-boilerplate.com)**\n\n| Sign Up | Sign In |\n| --- | --- |\n| [![Next.js Boilerplate SaaS Sign Up](public\u002Fassets\u002Fimages\u002Fnextjs-boilerplate-sign-in.png)](https:\u002F\u002Fdemo.nextjs-boilerplate.com\u002Fsign-up) | [![Next.js Boilerplate SaaS Sign In](public\u002Fassets\u002Fimages\u002Fnextjs-boilerplate-sign-in.png)](https:\u002F\u002Fdemo.nextjs-boilerplate.com\u002Fsign-in) |\n\n### Features\n\nDeveloper experience first, extremely flexible code structure and only keep what you need:\n\n- ⚡ [Next.js](https:\u002F\u002Fnextjs.org) with App Router support\n- 🔥 Type checking [TypeScript](https:\u002F\u002Fwww.typescriptlang.org)\n- 💎 Integrate with [Tailwind CSS](https:\u002F\u002Ftailwindcss.com)\n- 🤖 AI coding agent instructions for Claude Code, Codex, Cursor, OpenCode, Copilot, and more\n- ✅ Strict Mode for TypeScript and React 19\n- 🔒 Authentication with [Clerk](https:\u002F\u002Fclerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate): Sign up, Sign in, Sign out, Forgot password, Reset password, and more.\n- 👤 Passwordless Authentication with Magic Links, Multi-Factor Auth (MFA), Social Auth (Google, Facebook, Twitter, GitHub, Apple, and more), Passwordless login with Passkeys, User Impersonation\n- 📦 Type-safe ORM with DrizzleORM, compatible with PostgreSQL, SQLite, and MySQL\n- 💽 Offline and local development database with PGlite\n- ☁️ Remote and production database with [Neon](https:\u002F\u002Fget.neon.com\u002FBMFYNtx)\n- 🌐 Multi-language (i18n) with next-intl and [Crowdin](https:\u002F\u002Fl.crowdin.com\u002Fnext-js)\n- ♻️ Type-safe environment variables with T3 Env\n- ⌨️ Form handling with React Hook Form\n- 🔴 Validation library with Zod\n- 📏 Linter with Oxlint with Ultracite preset (replacing ESLint)\n- 💖 Code Formatter with Oxfmt (replacing Prettier)\n- 🦊 Husky for Git Hooks (replaced by Lefthook)\n- 🚫 Lint-staged for running linters on Git staged files\n- 🚓 Lint git commit with Commitlint\n- 📓 Write standard compliant commit messages with Commitizen\n- 🔍 Unused files and dependencies detection with Knip\n- 🌍 I18n validation and missing translation detection with i18n-check\n- 🦺 Unit Testing with Vitest and Browser mode (replacing React Testing Library)\n- 🧪 Integration and E2E Testing with Playwright\n- 👷 Run tests on pull request with GitHub Actions\n- 🎉 Storybook for UI development\n- 🐰 AI-powered code reviews with [CodeRabbit](https:\u002F\u002Fwww.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025)\n- 🚨 Error Monitoring with [Sentry](https:\u002F\u002Fsentry.io\u002Ffor\u002Fnextjs\u002F?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo)\n- 🔍 Local development error monitoring with Sentry Spotlight\n- ☂️ Code coverage with Codecov\n- 📝 Logging with LogTape and Log Management with [Better Stack](https:\u002F\u002Fbetterstack.com\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate)\n- 🖥️ Monitoring as Code with [Checkly](https:\u002F\u002Fwww.checklyhq.com\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate)\n- 🔐 Security and bot protection ([Arcjet](https:\u002F\u002Flaunch.arcjet.com\u002FQ6eLbRE))\n- 📊 Analytics with PostHog\n- 🎁 Automatic changelog generation with Semantic Release\n- 🔍 Visual regression testing\n- 💡 Absolute Imports using `@` prefix\n- 🗂 VSCode configuration: Debug, Settings, Tasks and Extensions\n- 🤖 SEO metadata, JSON-LD and Open Graph tags\n- 🗺️ Sitemap.xml and robots.txt\n- 👷 Automatic dependency updates with Dependabot\n- ⌘ Database exploration with Drizzle Studio and CLI migration tool with Drizzle Kit\n- ⚙️ Bundler Analyzer\n- 🌈 Include a FREE minimalist theme\n- 💯 Maximize lighthouse score\n\nBuilt-in features from Next.js:\n\n- ☕ Minify HTML & CSS\n- 💨 Live reload\n- ✅ Cache busting\n\nOptional features (easy to add):\n\n- 🔑 Multi-tenancy, Role-based access control (RBAC)\n- 🔐 OAuth for Single Sign-On (SSO), Enterprise SSO, SAML, OpenID Connect (OIDC), EASIE\n- 🔗 Web 3 (Base, MetaMask, Coinbase Wallet, OKX Wallet)\n\n### Philosophy\n\n- Nothing is hidden from you, allowing you to make any necessary adjustments to suit your requirements and preferences.\n- Dependencies are regularly updated on a monthly basis\n- Start for free without upfront costs\n- Easy to customize\n- Minimal code\n- Unstyled template\n- SEO-friendly\n- 🚀 Production-ready\n\n### Requirements\n\n- Node.js 22+ and npm\n\n### Getting started\n\nRun the following command on your local environment:\n\n```shell\ngit clone --depth=1 https:\u002F\u002Fgithub.com\u002Fixartz\u002FNext-js-Boilerplate.git my-project-name\ncd my-project-name\nnpm install\n```\n\nFor your information, all dependencies are updated every month.\n\nThen, you can run the project locally in development mode with live reload by executing:\n\n```shell\nnpm run dev\n```\n\nOpen http:\u002F\u002Flocalhost: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.\n\nNeed advanced features? Multi-tenancy & Teams, Roles & Permissions, Shadcn UI, End-to-End Typesafety with oRPC, Stripe Payment, Light \u002F Dark mode. Try [Next.js Boilerplate Pro](https:\u002F\u002Fnextjs-boilerplate.com\u002Fpro-saas-starter-kit).\n\nOr, need a Self-hosted auth stack (Better Auth)? Try [Next.js Boilerplate Max](https:\u002F\u002Fnextjs-boilerplate.com\u002Fnextjs-multi-tenant-saas-boilerplate)\n\n### Set up authentication\n\nTo get started, create a Clerk account at [Clerk.com](https:\u002F\u002Fclerk.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):\n\n```shell\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_pub_key\nCLERK_SECRET_KEY=your_clerk_secret_key\n```\n\nYou 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.\n\n### Set up remote database\n\nThe 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.\n\nWhen 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.\n\nTo 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:\u002F\u002Fget.neon.com\u002FBMFYNtx), which provides a free PostgreSQL database. This database is compatible and has been tested with Next.js Boilerplate.\n\nAfter creating your Neon account, you can get the connection string and copy it to the `DATABASE_URL` variable in your `.env.production` file.\n\n> :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.\n\n#### Create a fresh and empty database\n\nIf 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.\n\n### Translation (i18n) setup\n\nFor translation, the project uses `next-intl` combined with [Crowdin](https:\u002F\u002Fl.crowdin.com\u002Fnext-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.\n\nTo set up translation (i18n), create an account at [Crowdin.com](https:\u002F\u002Fl.crowdin.com\u002Fnext-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`.\n\nAfter 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.\n\n### Project structure\n\n```shell\n.\n├── README.md                       # README file\n├── .github                         # GitHub folder\n│   ├── actions                     # Reusable actions\n│   └── workflows                   # GitHub Actions workflows\n├── .storybook                      # Storybook folder\n├── .vscode                         # VSCode configuration\n├── migrations                      # Database migrations\n├── public                          # Public assets folder\n├── src\n│   ├── app                         # Next JS App (App Router)\n│   ├── components                  # React components\n│   ├── libs                        # 3rd party libraries configuration\n│   ├── locales                     # Locales folder (i18n messages)\n│   ├── models                      # Database models\n│   ├── styles                      # Styles folder\n│   ├── templates                   # Templates folder\n│   ├── types                       # Type definitions\n│   ├── utils                       # Utilities folder\n│   └── validations                 # Validation schemas\n├── tests\n│   ├── e2e                         # E2E tests, also includes Monitoring as Code\n│   └── integration                 # Integration tests\n├── drizzle.config.ts               # Drizzle ORM configuration\n├── eslint.config.mjs               # ESLint configuration\n├── next.config.ts                  # Next JS configuration\n├── package.json                    # NPM dependencies and scripts\n├── playwright.config.ts            # Playwright configuration\n├── tsconfig.json                   # TypeScript configuration\n└── vitest.config.mts               # Vitest configuration\n```\n\n### Customization\n\nYou 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:\n\n- `public\u002Fapple-touch-icon.png`, `public\u002Ffavicon.ico`, `public\u002Ffavicon-16x16.png` and `public\u002Ffavicon-32x32.png`: your website favicon\n- `src\u002Futils\u002FAppConfig.ts`: configuration file\n- `src\u002Ftemplates\u002FBaseTemplate.tsx`: default theme\n- `next.config.ts`: Next.js configuration\n- `.env`: default environment variables\n\nYou 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 🚀.\n\n### Change database schema\n\nTo modify the database schema in the project, you can update the schema file located at `.\u002Fsrc\u002Fmodels\u002FSchema.ts`. This file defines the structure of your database tables using the Drizzle ORM library.\n\nAfter making changes to the schema, generate a migration by running the following command:\n\n```shell\nnpm run db:generate\n```\n\nThis will create a migration file that reflects your schema changes.\n\nAfter making sure your database is running, you can apply the generated migration using:\n\n```shell\nnpm run db:migrate\n```\n\nThere is no need to restart the Next.js server for the changes to take effect.\n\n### Commit Message Format\n\nThe project follows the [Conventional Commits](https:\u002F\u002Fwww.conventionalcommits.org\u002F) 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:\n\n```shell\nnpm run commit\n```\n\nOne 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.\n\n#### Commit Types\n\nEvery 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:\n\n| Type | Description |\n| --- | --- |\n| `feat` | New feature or functionality |\n| `fix` | Bug fix |\n| `docs` | Documentation only |\n| `style` | Code formatting without logic changes |\n| `refactor` | Code restructuring without behavior changes |\n| `perf` | Performance improvement |\n| `test` | Adding or updating tests |\n| `build` | Build system |\n| `ci` | CI configuration and scripts |\n| `chore` | Maintenance tasks (dependencies, config) |\n| `revert` | Reverts a previous commit |\n\n### CodeRabbit AI Code Reviews\n\nThe project uses [CodeRabbit](https:\u002F\u002Fwww.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.\n\nSetting up CodeRabbit is simple, visit [coderabbit.ai](https:\u002F\u002Fwww.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!\n\n### Testing\n\nAll 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:\n\n```shell\nnpm run test\n```\n\n### Integration & E2E Testing\n\nThe project uses Playwright for integration and end-to-end (E2E) testing. Integration test files use the `*.spec.ts` extension, while E2E test files use the `*.e2e.ts` extension. You can run the tests with the following commands:\n\n```shell\nnpx playwright install # Only for the first time in a new environment\nnpm run test:e2e\n```\n\n### Storybook\n\nStorybook is configured for UI component development and testing. The project uses Storybook with Next.js and Vite integration, including accessibility testing and documentation features.\n\nStories are located alongside your components in the `src` directory and follow the pattern `*.stories.ts` or `*.stories.tsx`.\n\nYou can run Storybook in development mode with:\n\n```shell\nnpm run storybook\n```\n\nThis will start Storybook on http:\u002F\u002Flocalhost:6006 where you can view and interact with your UI components in isolation.\n\nTo run Storybook tests in headless mode, you can use the following command:\n\n```shell\nnpm run storybook:test\n```\n\n### Local Production Build\n\nGenerate an optimized production build locally using a temporary in-memory Postgres database:\n\n```shell\nnpm run build-local\n```\n\nThis command:\n\n- Starts a temporary in-memory Database server\n- Runs database migrations with Drizzle Kit\n- Builds the Next.js app for production\n- Shuts down the temporary DB when the build finishes\n\nNotes:\n\n- By default, it uses a local database, but you can also use `npm run build` with a remote database.\n- This only creates the build, it doesn't start the server. To run the build locally, use `npm run start`.\n\n### Deploy to production\n\nDuring 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:\u002F\u002Fget.neon.com\u002FBMFYNtx), which offers a free tier and is compatible with Next.js Boilerplate.\n\nThen, you can generate a production build with:\n\n```shell\n$ npm run build\n```\n\nIt generates an optimized production build of the boilerplate. To test the generated build, run:\n\n```shell\n$ npm run start\n```\n\nYou also need to defined the environment variables `CLERK_SECRET_KEY` using your own key.\n\nThis command starts a local server using the production build. You can now open http:\u002F\u002Flocalhost:3000 in your preferred browser to see the result.\n\n### Error Monitoring\n\nThe project uses [Sentry](https:\u002F\u002Fsentry.io\u002Ffor\u002Fnextjs\u002F?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo) to monitor errors.\n\n#### Local development with Sentry and Spotlight\n\nIn 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.\n\nYou can inspect captured events, view stack traces, and analyze errors in the Spotlight UI at `http:\u002F\u002Flocalhost:8969`.\n\n#### Production setup with Sentry\n\nFor production environment, you'll need to create a Sentry account and a new project. Then, in `.env.production`, you need to update the following environment variables:\n\n```shell\nNEXT_PUBLIC_SENTRY_DSN=\nSENTRY_ORGANIZATION=\nSENTRY_PROJECT=\n```\n\nYou also need to create a environment variable `SENTRY_AUTH_TOKEN` in your hosting provider's dashboard.\n\n### Code coverage\n\nNext.js Boilerplate relies on [Codecov](https:\u002F\u002Fabout.codecov.io\u002Fcodecov-free-trial\u002F?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.\n\nMake sure to create `CODECOV_TOKEN` as a GitHub Actions secret, do not paste it directly into your source code.\n\n### Logging\n\nThe project uses LogTape for logging. In the development environment, logs are displayed in the console by default.\n\nFor production, the project is already integrated with [Better Stack](https:\u002F\u002Fbetterstack.com\u002F?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:\u002F\u002Fbetterstack.com\u002F?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.\n\nAfter 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.\n\nNow, all logs will automatically be sent to and ingested by Better Stack.\n\n### Checkly monitoring\n\nThe project uses [Checkly](https:\u002F\u002Fwww.checklyhq.com\u002F?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.\n\nTo use Checkly, you must first create an account on [their website](https:\u002F\u002Fwww.checklyhq.com\u002F?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.\n\nTo complete the setup, update the `checkly.config.ts` file with your own email address and production URL.\n\n### Arcjet security and bot protection\n\nThe project uses [Arcjet](https:\u002F\u002Flaunch.arcjet.com\u002FQ6eLbRE), a security as code product that includes several features that can be used individually or combined to provide defense in depth for your site.\n\nTo set up Arcjet, [create a free account](https:\u002F\u002Flaunch.arcjet.com\u002FQ6eLbRE) and get your API key. Then add it to the `ARCJET_KEY` environment variable.\n\nArcjet is configured with two main features: bot detection and the Arcjet Shield WAF:\n\n- [Bot detection](https:\u002F\u002Fdocs.arcjet.com\u002Fbot-protection\u002Fconcepts) 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:\u002F\u002Fdocs.arcjet.com\u002Fbot-protection\u002Fidentifying-bots) to allow or block.\n- [Arcjet Shield WAF](https:\u002F\u002Fdocs.arcjet.com\u002Fshield\u002Fconcepts) will detect and block common attacks such as SQL injection, cross-site scripting, and other OWASP Top 10 vulnerabilities.\n\nArcjet is configured with a central client at `src\u002Flibs\u002FArcjet.ts` that includes the Shield WAF rules. Additional rules are applied when Arcjet is called in `proxy.ts`.\n\n### Useful commands\n\n### Code Quality and Validation\n\nThe project includes several commands to ensure code quality and consistency. You can run:\n\n- `npm run lint` to check for linting errors\n- `npm run lint:fix` to automatically fix fixable issues from the linter\n- `npm run check:types` to verify type safety across the entire project\n- `npm run check:deps` help identify unused dependencies and files\n- `npm run check:i18n` ensures all translations are complete and properly formatted\n\n#### Bundle Analyzer\n\nNext.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:\n\n```shell\nnpm run build-stats\n```\n\nBy running the command, it'll automatically open a new browser window with the results.\n\n#### Database Studio\n\nThe project is already configured with Drizzle Studio to explore the database. You can run the following command to open the database studio:\n\n```shell\nnpm run db:studio\n```\n\nThen, you can open https:\u002F\u002Flocal.drizzle.studio with your favorite browser to explore your database.\n\n### VSCode information (optional)\n\nIf you are VSCode user, you can have a better integration with VSCode by installing the suggested extension in `.vscode\u002Fextension.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.\n\nWith 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.\n\nPro tips: if you need a project wide-type checking with TypeScript, you can run a build with \u003Ckbd>Cmd\u003C\u002Fkbd> + \u003Ckbd>Shift\u003C\u002Fkbd> + \u003Ckbd>B\u003C\u002Fkbd> on Mac.\n\n### Contributions\n\nEveryone 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.\n\n### License\n\nLicensed under the MIT License, Copyright © 2026\n\nSee [LICENSE](LICENSE) for more information.\n\n## Sponsors\n\n\u003Ctable width=\"100%\">\n  \u003Ctr height=\"187px\">\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fclerk.com?utm_source=github&utm_medium=sponsorship&utm_campaign=nextjs-boilerplate\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Fixartz\u002FSaaS-Boilerplate\u002Fassets\u002F1328388\u002F6fb61971-3bf1-4580-98a0-10bd3f1040a2\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fgithub.com\u002Fixartz\u002FSaaS-Boilerplate\u002Fassets\u002F1328388\u002Ff80a8bb5-66da-4772-ad36-5fabc5b02c60\">\n          \u003Cimg alt=\"Clerk – Authentication & User Management for Next.js\" src=\"https:\u002F\u002Fgithub.com\u002Fixartz\u002FSaaS-Boilerplate\u002Fassets\u002F1328388\u002Ff80a8bb5-66da-4772-ad36-5fabc5b02c60\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fwww.coderabbit.ai?utm_source=next_js_starter&utm_medium=github&utm_campaign=next_js_starter_oss_2025\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcoderabbit-logo-dark.svg?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcoderabbit-logo-light.svg?raw=true\">\n          \u003Cimg alt=\"CodeRabbit\" src=\"public\u002Fassets\u002Fimages\u002Fcoderabbit-logo-light.svg?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fsentry.io\u002Ffor\u002Fnextjs\u002F?utm_source=github&utm_medium=paid-community&utm_campaign=general-fy25q1-nextjs&utm_content=github-banner-nextjsboilerplate-logo\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fsentry-white.png?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fsentry-dark.png?raw=true\">\n          \u003Cimg alt=\"Sentry\" src=\"public\u002Fassets\u002Fimages\u002Fsentry-dark.png?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr height=\"187px\">\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Flaunch.arcjet.com\u002FQ6eLbRE\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Farcjet-dark.svg?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Farcjet-light.svg?raw=true\">\n          \u003Cimg alt=\"Arcjet\" src=\"public\u002Fassets\u002Fimages\u002Farcjet-light.svg?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fl.crowdin.com\u002Fnext-js\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcrowdin-white.png?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcrowdin-dark.png?raw=true\">\n          \u003Cimg alt=\"Crowdin\" src=\"public\u002Fassets\u002Fimages\u002Fcrowdin-dark.png?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fbetterstack.com\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fbetter-stack-white.png?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fbetter-stack-dark.png?raw=true\">\n          \u003Cimg alt=\"Better Stack\" src=\"public\u002Fassets\u002Fimages\u002Fbetter-stack-dark.png?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr height=\"187px\">\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fposthog.com\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fposthog.com\u002Fbrand\u002Fposthog-logo-white.svg\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fposthog.com\u002Fbrand\u002Fposthog-logo.svg\">\n          \u003Cimg alt=\"PostHog\" src=\"https:\u002F\u002Fposthog.com\u002Fbrand\u002Fposthog-logo.svg\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fwww.checklyhq.com\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=next-js-boilerplate\">\n        \u003Cpicture>\n          \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcheckly-logo-dark.png?raw=true\">\n          \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"public\u002Fassets\u002Fimages\u002Fcheckly-logo-light.png?raw=true\">\n          \u003Cimg alt=\"Checkly\" src=\"public\u002Fassets\u002Fimages\u002Fcheckly-logo-light.png?raw=true\">\n        \u003C\u002Fpicture>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" style=width=\"33%\">\n      \u003Ca href=\"https:\u002F\u002Fnextjs-boilerplate.com\u002Fpro-saas-starter-kit\">\n        \u003Cimg src=\"public\u002Fassets\u002Fimages\u002Fnextjs-boilerplate-saas.png?raw=true\" alt=\"Next.js SaaS Boilerplate with React\" \u002F>\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr height=\"187px\">\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Ca href=\"mailto:contact@nextjs-boilerplate.com\">\n        Add your logo here\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\nMade with ♥ by [CreativeDesignsGuru](https:\u002F\u002Fcreativedesignsguru.com) [![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl\u002Fhttps\u002Ftwitter.com\u002Fcloudposse.svg?style=social&label=Follow%20%40Ixartz)](https:\u002F\u002Ftwitter.com\u002Fixartz)\n\nLooking 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 contact@nextjs-boilerplate.com!\n\n[![Sponsor Next JS Boilerplate](https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fdefault-red.png)](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fixartz)\n","Next-js-Boilerplate 是一个基于 Next.js 16+、Tailwind CSS 4 和 TypeScript 的项目模板和启动器。它集成了 App Router 和 Page Router 支持，提供了一套完整的开发工具链，包括 ESLint、Prettier、Vitest、Playwright 等，以确保代码质量和开发效率。此外，该项目还支持多种数据库（如 PostgreSQL、SQLite 和 MySQL），并提供了身份验证、错误监控、日志管理和多语言等功能。适用于需要快速搭建高质量、可维护的 Next.js 应用场景，特别是对于注重开发者体验和技术栈现代化的团队来说是一个理想的选择。",2,"2026-06-11 03:26:39","top_topic"]