Skip to content

Guide · Open source

How to use Next-js-Boilerplate: clone, configure and start building

Updated · written with AI from the project's own documentation and checked against our catalogue data

Next-js-Boilerplate is an open-source MIT-licensed template for Next.js, written in TypeScript. Instead of wiring up TypeScript, Tailwind CSS, linting, testing and a database layer yourself, you clone the project and start from one that already includes them. This guide walks through what you need, how to get a copy, what the template contains, and how to decide which parts to keep.

Next.js Boilerplateixartz/Next-js-Boilerplate · ★ 13.1k · MIT

Quick start

  1. 1Confirm prerequisites. Make sure Git and Node.js are installed on your machine before you start.
  2. 2Clone the repository. Run the git clone command from the README to copy the project into a folder on your computer.
  3. 3Review the included tools. Read through the feature list and decide which pieces, such as Clerk, Sentry or Neon, you plan to use.
  4. 4Remove what you do not need. Delete optional tools and their configuration you will not use, then check for leftover unused dependencies.
  5. 5Set up third-party services. If you keep Clerk, Neon or Sentry, create accounts with those services and connect them to your project.
  6. 6Build your app on top. Add your pages and features, using the included linting, tests and database layer as your baseline.

What you need before you start

The project's README lists two prerequisites: Git and Node.js. Git is used to clone the repository, and Node.js is needed to build and run a Next.js project.

  • Git installed on your computer
  • Node.js installed on your computer
  • Basic familiarity with JavaScript and React, since the template includes many tools you will need to understand

Clone the repository

Copy the project to your machine with Git. The README gives this command. Run it in the folder where you want the project to live.

Because this is a clone-and-build project, you start from a copy of the template and then turn it into your own app. The README suggests cloning the project and using it to create your own Next.js project.

git clone https://github.com/ixartz/Next-js-Boilerplate.git

Know what the template includes

The README describes a developer-experience-first setup. The main pieces are Next.js with App Router support, TypeScript, Tailwind CSS, ESLint-style linting, Prettier-style formatting, Vitest and Testing Library for unit tests, Playwright for end-to-end tests, Storybook for UI work, and Commitlint for commit messages.

The template also covers a database layer with Drizzle ORM, which the README says is compatible with PostgreSQL, SQLite and MySQL. A sample sign-in flow is included, and the live demo at demo.nextjs-boilerplate.com shows a working authentication system.

  • Framework: Next.js with App Router support
  • Language and styling: TypeScript and Tailwind CSS
  • Quality: ESLint-style linting, Prettier-style formatting, Lint-Staged, Commitlint
  • Testing: Vitest, Testing Library, Playwright
  • Data: Drizzle ORM, with PGlite for local development and Neon for production
  • Auth and monitoring: Clerk for authentication, Sentry for error monitoring, Logging with LogTape

Decide what to keep and what to remove

The README says the template is built to be flexible, so you can keep only what you need. Many of the tools listed come from third-party services, and the features are optional pieces you can remove. The README's feature list includes replacements for some defaults, such as Lefthook replacing Husky, Vitest replacing Jest, and LogTape replacing Pino.js.

If you want a smaller starting point, plan time to remove unused tools and their configuration. The README does not give a step-by-step removal guide, so check each tool's files before deleting them.

  • Keep the parts you will use daily, such as TypeScript, Tailwind CSS and linting
  • Remove optional services you do not plan to use
  • Check dependencies after removal, since the feature list mentions Knip for detecting unused files and dependencies

Plan your authentication and database

Authentication is handled with Clerk in the template. The README lists sign up, sign in, sign out, forgot password and reset password, along with magic links, multi-factor auth, social login and passkeys. Clerk is a third-party service, so you need an account with it to use the full feature set.

For data, the template uses Drizzle ORM. For local development, the README mentions PGlite as an offline database. For production, it names Neon as a remote database option. Both are external pieces you should understand before you commit to the template.

  • Clerk: third-party authentication service used for the sign-in flow
  • Drizzle ORM: type-safe ORM for PostgreSQL, SQLite or MySQL
  • PGlite: local and offline development database
  • Neon: remote production database option

Check quality with linting, tests and commits

The template sets up checks that run around your development work. Lint-Staged runs linters on Git staged files, and Lefthook handles Git hooks in place of Husky. Commitlint checks commit messages, and Commitizen helps write standard-compliant ones.

For testing, Vitest handles unit tests, Playwright handles integration and end-to-end tests, and the README says tests can run on pull requests with GitHub Actions. Storybook is included for UI development.

  • Lint-Staged: lints files staged in Git
  • Lefthook: Git hooks manager that replaces Husky
  • Commitlint and Commitizen: commit message checks and helpers
  • Vitest and Playwright: unit and end-to-end tests
  • GitHub Actions: runs tests on pull requests

What people use it for

  • Starting a new SaaS-style app that needs sign-in and a database from day one
  • Setting a shared TypeScript, linting and testing baseline for a small team
  • Studying a fairly complete Next.js project structure as a learner
  • Prototyping UI components with Storybook alongside the app

Frequently asked questions

Is Next-js-Boilerplate free to use?

The project is released under the MIT licence, according to the repository details. The third-party services it integrates with, such as Clerk, Neon and Sentry, are separate products with their own terms, so check their pricing before you rely on them.

What do I need installed to use Next-js-Boilerplate?

The README lists Git and Node.js as prerequisites. You clone the repository with Git and build the project with Node.js.

Is Next-js-Boilerplate good for beginners?

It is aimed at developers who already know JavaScript and React. The number of included tools can be overwhelming for someone new to those technologies, so learning the basics first is a good idea.

Can I use Next-js-Boilerplate without Clerk?

The README presents Clerk as the authentication option, and it says the full feature set depends on third-party services. If you prefer not to use Clerk, you would need to remove or replace the authentication parts yourself, and the README does not give a guide for that.

How is Next-js-Boilerplate different from create-next-app?

create-next-app is a general starter for new Next.js projects. Next-js-Boilerplate comes with many more pre-configured tools, including TypeScript, Tailwind CSS, testing, a database layer and a sample sign-in flow. The README describes it as a ready-made project template with many optional pieces.

Is Next-js-Boilerplate suitable for a minimal Next.js setup?

Probably not. The README lists many integrated tools that may need pruning, so people wanting a minimal setup may prefer create-next-app or a smaller starter.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Next-js-Boilerplate suits developers starting a new Next.js app who want TypeScript, linting, testing, a database layer and a sample sign-in flow configured from day one, and teams wanting a shared baseline. It is less suitable if you want a minimal setup, do not want to depend on third-party services such as Clerk, Neon or Sentry, or are new to JavaScript and React.

Install options & downloads