https://github.com/astroonauta/next-js-boilerplate
A personal Next JS 14+ boilerplate: Typescript + Chakra UI + Prettier + ESLint + Pre-commit (Husky + Lint-staged) + Cypress (e2e + component)
https://github.com/astroonauta/next-js-boilerplate
boilerplate chakraui cypress eslint frontend husky lintstaged next nextjs precommit prettier typescript
Last synced: 3 months ago
JSON representation
A personal Next JS 14+ boilerplate: Typescript + Chakra UI + Prettier + ESLint + Pre-commit (Husky + Lint-staged) + Cypress (e2e + component)
- Host: GitHub
- URL: https://github.com/astroonauta/next-js-boilerplate
- Owner: AstrOOnauta
- License: isc
- Created: 2023-05-06T16:30:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-20T20:59:09.000Z (over 1 year ago)
- Last Synced: 2025-01-21T10:47:11.634Z (over 1 year ago)
- Topics: boilerplate, chakraui, cypress, eslint, frontend, husky, lintstaged, next, nextjs, precommit, prettier, typescript
- Language: TypeScript
- Homepage: https://next-js--boilerplate.vercel.app
- Size: 1.47 MB
- Stars: 72
- Watchers: 3
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# ๐ Next.js 16 Boilerplate โ TypeScript, Chakra UI, ESLint, Prettier, Husky & Cypress
A complete **Next.js 16 starter template** configured with **TypeScript**, **Chakra UI**, **ESLint**, **Prettier**, **Husky**, and **Cypress**.
Perfect for developers who want to build fast, scalable, and modern web applications using the latest **Next.js** features.
---
## ๐งฉ About This Boilerplate
This project is a **Next.js boilerplate** built with **TypeScript**, **Chakra UI**, **ESLint**, **Prettier**, **Husky**, and **Cypress** โ designed to help you start new projects quickly and with the best development experience.
It includes:
- โ๏ธ A clean, scalable architecture;
- ๐จ Theming support (light/dark) with Chakra UI;
- ๐งช E2E and component testing with Cypress;
- โ
Automated linting, formatting, and pre-commit checks;
- ๐ SEO-friendly configuration out of the box.
**Get this starter project and maximize your experience as a developer!**
---
---
## ๐ฐ๏ธ Old Versions
- [Version 15.x](https://github.com/AstrOOnauta/next-js-boilerplate/tree/v15.x)
- [Version 14.x](https://github.com/AstrOOnauta/next-js-boilerplate/tree/v14.x)
- [Version 13.x](https://github.com/AstrOOnauta/next-js-boilerplate/tree/v13.x)
---
## ๐ง System Requirements
- Node.js **22.x or later**
- macOS, Windows (including WSL), and Linux supported
---
## ๐ป Technologies Used
- [Next.js](https://nextjs.org/)
- [TypeScript](https://www.typescriptlang.org/)
- [Chakra UI](https://chakra-ui.com/)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [Husky](https://typicode.github.io/husky/#/)
- [Lint-staged](https://github.com/okonet/lint-staged)
- [Cypress](https://www.cypress.io/)
---
## ๐ Features of the Next.js 16 Boilerplate
- โ๏ธ Full **Next.js** setup (SSR, SSG, API routes, and more)
- ๐จ Styling with **Chakra UI**
- ๐ Dark and light theme configuration
- ๐ **TypeScript** support
- ๐ Linting and formatting via **ESLint** + **Prettier**
- โ
Pre-commit hooks with **Husky** + **lint-staged**
- ๐งช E2E and component testing via **Cypress**
- โจ Absolute imports (`~`)
- ๐ Minimal and organized folder structure
- ๐ SEO-friendly configuration
- โก Ready for production deployment
---
## โ๏ธ Automatic Installation
### 1. Create a new project
```bash
yarn create next-js-boilerplate
# OR
npx create-next-js-boilerplate
```
### 2. Initialize Husky
```bash
yarn husky-install
# OR
npm run husky-install
```
### 3. Run the development server
```bash
yarn dev
# OR
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Edit `pages/index.tsx` โ the page updates automatically as you save.
---
## ๐งฐ Manual Installation
### 1. Clone the repository
```bash
git clone https://github.com/AstrOOnauta/next-js-boilerplate.git
```
### 2. Install dependencies
```bash
yarn
# OR
npm install
```
### 3. Initialize Husky
```bash
yarn husky-install
# OR
npm run husky-install
```
### 4. Run the development server
```bash
yarn dev
# OR
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) and start building!
---
## ๐งโ๐ป Terminal Commands
| Command | Description |
| --------------- | -------------------------------- |
| `dev` | Runs the app on `localhost:3000` |
| `build` | Creates the production build |
| `start` | Runs a production server |
| `prettier` | Formats all files |
| `lint` | Runs ESLint |
| `lint-staged` | Lints only staged files |
| `husky-install` | Initializes Husky |
| `type-check` | Runs TypeScript checks |
| `cypress:open` | Opens Cypress UI |
| `cypress:run` | Runs Cypress tests in CLI |
---
## ๐ก Why Use This Template?
- Save hours of setup time โ everything is pre-configured
- Enforce code quality and consistency automatically
- Start coding immediately with TypeScript + Chakra UI
- Perfect for MVPs, startups, or production-grade apps
- Compatible with macOS, Windows, and Linux
---
## ๐ค Contributing
Contributions are welcome!
Feel free to **open an issue** or **submit a pull request** to improve this Next.js boilerplate.
---
## ๐ License
This project is licensed under the [ISC License](./LICENSE.md).
---
## ๐ Keywords
`nextjs boilerplate`, `next.js starter template`, `next.js 16`, `typescript`, `chakra-ui`, `eslint`, `prettier`, `husky`, `lint-staged`, `cypress`, `react starter`, `frontend boilerplate`, `create next app`
---
Thanks for stopping by! ๐