More Premium Hugo Themes Premium React Themes

Next Js Boilerplate

A personal Next JS 14+ boilerplate: Typescript + Chakra UI + Prettier + ESLint + Pre-commit (Husky + Lint-staged) + Cypress (e2e + component)

Next Js Boilerplate

A personal Next JS 14+ boilerplate: Typescript + Chakra UI + Prettier + ESLint + Pre-commit (Husky + Lint-staged) + Cypress (e2e + component)

Author Avatar Theme by astroonauta
Github Stars Github Stars: 70
Last Commit Last Commit: Dec 17, 2024 -
First Commit Created: Nov 28, 2023 -
default image

Overview

This Next.js Boilerplate is a setup that includes various tools and technologies such as Typescript, Chakra UI, Eslint, Prettier, Pre-commit (Husky + lint-staged), and Cypress. It aims to provide developers with a starting point for their projects and maximize their development experience. The boilerplate supports the latest version of Node.js and is compatible with macOS, Windows (including WSL), and Linux operating systems.

Features

  • All of Next’s advantages (Live reload, SSR, SSG, native API…): The boilerplate leverages the features and benefits provided by Next.js, including live reload, server-side rendering, static site generation, and access to native APIs.
  • Styling with Chakra UI: Chakra UI is used for styling purposes, allowing developers to easily create visually appealing and responsive user interfaces.
  • Setup with dark/light theme support: The boilerplate includes support for both dark and light themes, enabling developers to create applications with customizable themes.
  • Types support by Typescript: Typescript is integrated into the boilerplate, providing type safety and improved code quality.
  • Code check and formatter by ESLint and Prettier: ESLint and Prettier are used for code checking and formatting, ensuring consistent code style and identifying potential issues.
  • Pre-commit check by Husky and Lint-staged: The boilerplate includes Husky and Lint-staged, which perform pre-commit checks to enforce code quality and prevent committing code that does not meet the defined standards.
  • E2E and Component testing with Cypress: Cypress is integrated into the boilerplate to enable end-to-end (E2E) and component testing, ensuring the quality and reliability of the application.
  • Absolute imports (~): The boilerplate supports absolute imports using the ~ symbol, simplifying the import process and improving code readability.
  • Minimal folder structure: The boilerplate follows a minimal folder structure, making it easy to navigate and organize code files.
  • SEO friendly: The boilerplate is designed to be search engine optimization (SEO) friendly, allowing for better visibility and discoverability of the application.
  • All productivity to your project: The boilerplate aims to enhance productivity by providing a set of tools and configurations that help streamline the development process.

Installation

Automatic Installation

  1. Install the create-next-js-boilerplate by running the following command:
yarn create next-js-boilerplate

OR

npx create-next-js-boilerplate
  1. Set up Husky by running the following command:
yarn husky-install

OR

npm run husky-install
  1. Run the development server with the following command:
yarn dev

OR

npm run dev

Manual Installation

  1. Clone the repository by running the following command:
git clone https://github.com/AstrOOnauta/next-js-boilerplate.git
  1. Install dependencies by running the following command:
yarn

OR

npm i
  1. Set up Husky by running the following command:
yarn husky-install

OR

npm run husky-install
  1. Run the development server with the following command:
yarn dev

OR

npm run dev

Summary

The Next.js Boilerplate is a comprehensive setup that provides developers with a foundation for building applications using Next.js. It includes features such as Typescript integration, Chakra UI for styling, ESLint and Prettier for code formatting and checking, Husky and Lint-staged for pre-commit checks, and Cypress for end-to-end and component testing. The boilerplate aims to enhance productivity and streamline the development process by offering a minimal folder structure, support for dark/light themes, and SEO-friendly configuration. Developers can choose between automatic and manual installation methods to set up the boilerplate and start building their projects with ease.