/nextjs-boilerplate

A super powerful NextJS boilerplate developed following the Feature driven pattern

Primary LanguageTypeScriptMIT LicenseMIT

NextJS Boilerplate

project-image

A super powerful NextJS boilerplate developed following the Feature driven pattern.

πŸ”₯ Core Values

  • Always write clean code
  • Think before coding
  • Code has heart
  • Ready to teach each other
  • Responsibility for work
  • Actively discuss

πŸš€ Demo

https://nextjs-core-project.vercel.app/

Project Screenshots:

project-screenshot

🧐 Features

Here're some of the project's best features:

  • Clean folder structure
  • High scalability
  • Feature driven architecture
  • Multilingualism does not change routes
  • Validate ENV before build
  • Validate branch and commit before commit code
  • Support Storybook
  • Support Unit Test
  • Bla bla bla feature...

πŸ“‚ Folder Structure

.
β”œβ”€β”€ public (contain static files)
β”œβ”€β”€ scripts (contain script/bash)
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ __test__
β”‚   β”‚   └── setup
β”‚   β”‚       └── matchMedia.ts
β”‚   β”œβ”€β”€ app
β”‚   β”‚   β”œβ”€β”€ api
β”‚   β”‚   β”‚   └── ping
β”‚   β”‚   β”‚       └── route.ts
β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ common
β”‚   β”‚   └── features
β”‚   β”‚       β”œβ”€β”€ feature-1
β”‚   β”‚       β”‚   β”œβ”€β”€ feature-1.component.tsx
β”‚   β”‚       β”‚   β”œβ”€β”€ feature-1.constant.ts
β”‚   β”‚       β”‚   β”œβ”€β”€ feature-1.hook.tsx
β”‚   β”‚       β”‚   β”œβ”€β”€ feature-1.store.ts
β”‚   β”‚       β”‚   β”œβ”€β”€ feature-1.test.tsx
β”‚   β”‚       β”‚   └── index.tsx
β”‚   β”œβ”€β”€ pages (contain page routes)
β”‚   β”œβ”€β”€ services (contain third services: AWS, Google Cloud)
β”‚   β”œβ”€β”€ styles (contain module styles)
β”‚   └── utils
β”‚       β”œβ”€β”€ constants
β”‚       └── helpers

πŸ’‰ Commit Rules

Must create branch follow below rules:

  • build
  • chore
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Example: feat: first commit

🀟 Branch Rules

Must create branch follow below rules:

  • feat/
  • feedback/
  • hotfix/
  • revert/
  • reset/
  • force/
  • refactor/
  • fix/

Example: git checkout -b feat/feature-a

Note: Underscore to be not allow!!!

πŸ› οΈ Installation Steps:

1. Clone the project

git clone https://github.com/truongdn-it/nextjs-boilerplate

2. Go to the project directory

cd nextjs-boilerplate

3. Install dependencies

npm install

4. Start the server

npm run dev

🍰 Contribution Guidelines:

CONTRIBUTING

πŸ’» Built with

Technologies used in the project:

  • NextJS
  • Antd Design
  • React Query
  • Zustand
  • Commit lint
  • Eslint
  • Prettier
  • Storybook
  • Vitest
  • Apollo Server
  • Apollo Client

πŸ›‘οΈ License:

This project is licensed under the MIT

πŸ’–Like my work?

Donate me for crypto (USDT)

BEP20 Wallet: 0xbb861e0bd84af04cf370bcf8227537344500bd0a