Uses the Next.js App Router and divides routes into two groups: (auth) private routes and (unauth) public routes
nextjs-boilerplate — Next.js Starter Template
By nhanluongoe
A starter template based on the Next.js App Router, with built-in TypeScript, TailwindCSS, NextAuth, and engineering tooling such as ESLint, Prettier, and Husky, plus a scalable directory structure grouped by authenticated and public routes.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Provides a scalable directory structure: project-level shared content is placed under src, while app is organized by domain/feature with components, types, hooks, and route handler
components/ui holds atomic components such as Button and Tag, while composite components such as Header and Footer are placed outside it
Integrates NextAuth, with GitHub as the example login provider
Includes ESLint 9, Prettier, Husky, lint-staged, and Commitlint; checks staged files before commits and requires conventional commits commit messages
Includes robots.ts and sitemap.ts to generate robots.txt and sitemap.xml, and supports absolute imports via the @ alias
Template Details
This is a starter template for Next.js projects, intended to eliminate repetitive initial setup when starting a new project. It uses the App Router and divides routes into two groups: (auth) and (unauth). The former contains pages that require login (the example is profile), while the latter contains public pages (the examples are the home page and products).
In terms of directory organization, project-level shared content is placed under src, including components, types, styles, utils, and api. Within that, components/ui holds atomic components such as Button and Tag, while composite components such as Header and Footer are placed outside ui. The app directory is organized by domain/feature, and each feature can include its own components, types, hooks, and route handler. The template also provides absolute imports via the @ alias, as well as robots.ts and sitemap.ts to generate robots.txt and sitemap.xml.
For authentication, NextAuth is integrated. The example uses GitHub as the login provider, and you must create your own GitHub OAuth app and configure the AUTH_SECRET, AUTH_GITHUB_ID, and AUTH_GITHUB_SECRET environment variables before it will run properly. For engineering standards, ESLint 9 works with eslint-config-next and typescript-eslint, Prettier handles formatting, Husky and lint-staged run checks on staged files before commits, and Commitlint requires commit messages to follow conventional commits.
To use it, clone the repository or click Use this template to generate a new repository, install dependencies, and run the development command. The template is released under the MIT license and may be used, modified, used commercially, and distributed for free, but the copyright and license notice must be retained. Third-party assets in the demo, such as images, fonts, and icons, as well as external services such as hosting and databases, require separate verification of licensing and costs.
Is it right for your project?
Use Cases
- Quickly setting up a new Next.js project with separate groups for login and public pages
- Wanting a new project to start with unified directory conventions and component layering
- Needing preset code checks, formatting, and commit message standards for a team project
- Needing to configure a GitHub-based login entry for a Next.js project
- Needing to prepare robots.txt, sitemap.xml, and a basic SEO metadata structure for a site
Suitable For
- Developers starting a Next.js application from scratch who want to reduce initial configuration work
- Team projects that accept the App Router and domain-based directory organization
- Projects that need a basic toolchain such as TypeScript, TailwindCSS, and ESLint/Prettier
- Projects planning to use NextAuth and configure an OAuth provider themselves
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Clone the repository or click Use this template to create a new repository, then run npm install and npm run dev
- 2
Before running, configure NextAuth: create a GitHub OAuth app and set AUTH_SECRET, AUTH_GITHUB_ID, and AUTH_GITHUB_SECRET in .env
- 3
Commit messages must follow conventional commits, otherwise Commitlint will block them
- 4
The template is released under the MIT license; when distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice
- 5
Third-party assets in the demo, such as images, fonts, and icons, as well as external services such as domains, hosting, and databases, require you to verify licensing and costs yourself
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis listing covers the free version in a public repository under the MIT license; the free scope is the code of that version and does not mean external services or third-party assets are free.
Must comply with when using
- You may use, modify, use commercially, and distribute the code of this version for free.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Before use, you must configure NextAuth yourself: create a GitHub OAuth app and set the authentication-related environment variables in .env (AUTH_SECRET, AUTH_GITHUB_ID, AUTH_GITHUB_SECRET), otherwise the project will not run properly; this depends on external GitHub services and accounts.
- Commit messages must follow the conventional commits specification, otherwise Commitlint will block them; this is a usage restriction set by the project.
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
Make sure you config your NextAuth before running the project. For this boilerplate, it uses Github as the authentication provider so you need to create a Github OAuth app and set the `GITHUB_ID` and `GITHUB_SECRET` environment variables in your `.env` file.
Original README
https://github.com/nhanluongoe/nextjs-boilerplate/blob/main/LICENSEhttps://github.com/nhanluongoe/nextjs-boilerplate/blob/main/README.mdCommit messages must follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-03. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 92 / 100
- Technologies
- Next.js · React
- Website type
- Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-08-12
- Screenshot last checked
- 2026-10-03
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: 219a2fee33f1ef750ffffada9e356c0f6e58190ef8ece179b1fee24cc51d1767
2026-10-03T00:39:17.303Z
Source file / repository# Next.js Boilerplate and Starter-Kit. Minimal yet scalable setup for Next.js projects A Next.js 16 boilerplate that helps you jump right into building your app without having to set up everything from scratch every time you start a new project. It comes with a minimal yet scalable setup that includes Next.js 16 with Turbopack, React 19, TypeScript, TailwindCSS, ESLint 9, Prettier, Husky, Lint-staged, Commitlint, and SEO-friendly features. ## Live Demo Check out the live demo of this boilerplate in action: [https://nextjs-boilerplate-oe.vercel.app](https://nextjs-boilerplate-oe.vercel.app) ## Features - [x] [Next.js 16](https://nextjs.org): Full-fledged framework for React apps with Turbopack - [x] [Typescript](https://typescriptlang.org): Type checking and better code quality - [x] [TailwindCSS](https://tailwindcss.com/): Utility-first CSS framework - [x] [ESLint 9](https://eslint.org): Modern pluggable linting utility for JavaScript - [x] [Prettier](https://prettier.io): Opinionated code formatter - [x] [Husky](https://typicode.github.io/husky): Git hooks made easy - [x] [Lint-staged](https://github.com/lint-staged/lint-staged): Run linters on git staged files - [x] [Commitlint](https://commitlint.js.org/): Lint commit messages - [x] [NextAuth](https://authjs.dev/): Powerful authentication for Next.js - [x] SEO-friendly: Meta tags, Open Graph, sitemap.xml and robots.txt - [x] Absolute imports: Import directories and files using the @ alias - [x] Route grouping: Group routes for auth and public pages ## Use this boilerplate You can either clone this repository using command line or clicking on the "Use this template" button to create a new repository with the same directory structure. ```sh git clone --depth=1 https://github.com/nhanluongoe/nextjs-boilerplate.git project-name cd project-name npm install npm run dev ``` Make sure you config your NextAuth before running the project. For this boilerplate, it uses Github as the authentication provider so you need to create a Github OAuth app and set the `GITHUB_ID` and `GITHUB_SECRET` environment variables in your `.env` file. You can find more information about how to do this in the [NextAuth documentation](https://authjs.dev/guides/configuring-github). Basically your .env file should look like this: ```env AUTH_SECRET="yourAuthSecret" AUTH_GITHUB_ID=yourGithubClientId AUTH_GITHUB_SECRET=yourGithubClientSecret ``` ## Project Structure - All common things (project-wide, global) are placed in the `src` directory. This includes components, types, styles, and utility functions. This is where we put things that are shared across the project. - In the project wide components, we have `ui` directory that contains atomic design components like `Button`, `Tag`. Outside of the `ui` directory, there are components composed of atomic components like `Header`, `Footer`. - In the `app` directory we have domains/features. This includes components, types, hooks, api (route handler) ... that are only used in that domain/feature. Basically these directories include things similar to the global things but are only used in the domain/feature. - The project uses Next.js App Router to handle routing. The router is divided into two groups: `auth` and `unauth`. The `auth` group contains routes that require authentication, while the `unauth` group contains public routes. ``` |-- public # Static files |-- src # Next.js source directory | |-- app # Next.js App Router | | |-- (auth) # (Group) Private routes | | | |-- layout.tsx # Authenticated layout | | | |-- profile # (Module) Profile page | | | | `-- page.tsx | | |-- (unauth) # (Group) Public routes | | | |-- layout.tsx # Unauthenticated layout | | | |-- page.tsx # Unauthenticated index page | | | `-- products # (Module) Product page | | | |-- components # Components for the product page | | | | `-- ProductCard.tsx | | | |-- layout.tsx | | | `-- page.tsx | | |-- layout.tsx # App layout | | |-- robots.ts # Robots.txt | | `-- sitemap.ts # Sitemap.xml | |-- components # Global components | | |-- Footer.tsx | | |-- Header.tsx | | `-- ui # Atomic design components | | |-- Button.tsx | | `-- Tag.tsx | |-- api # Global API route handlers | | `-- auth | |-- styles | | `-- global.css # Global styles | |-- types # Global types | | `-- global.ts | |-- libs # 3rd-party libraries | | `-- auth.ts | `-- utils # Global utility functions | `-- helpers.ts |-- tailwind.config.ts # TailwindCSS configuration |-- .eslintrc.json # ESLint configuration |-- .prettierrc # Prettier configuration |-- LICENSE |-- README.md |-- commitlint.config.ts # Commitlint configuration |-- lint-staged.config.js # Lint-staged configuration |-- next-env.d.ts |-- next.config.mjs |-- package-lock.json |-- package.json |-- postcss.config.mjs # PostCSS configuration `-- tsconfig.json # Typescript configuration ``` ## Commit message convention - The project uses Husky and Lint-staged to run ESLint and Prettier on staged files before committing. - Commit messages must follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). ## Eslint configuration - The project uses modern ESLint 9 configuration compatible with Next.js 16. The configuration is based on the following packages: - [eslint-config-next](https://www.npmjs.com/package/eslint-config-next): Next.js ESLint configuration. - [typescript-eslint v8](https://typescript-eslint.io/): Enables ESLint to lint TypeScript code. ## Contributing If you have a question or have found a bug, or have any suggestions for improvement, feel free to create an issue or a pull request. Everyone is welcome. ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Explore similar templates
Compare previews and descriptions within the same stack and category.

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

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

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

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

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

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