Next Js Boilerplate

screenshot of Next Js Boilerplate
nextjs
react
chakra-ui

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

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.
nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

chakra-ui
Chakra UI

Chakra UI is a popular open-source React component library that provides a set of accessible and customizable UI components to help developers create modern web applications.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

framer-motion
Framer Motion

Alpine.js is a lightweight JavaScript framework that simplifies the process of creating dynamic, reactive user interfaces on the web. It uses a declarative syntax that offers a higher level of abstraction compared to vanilla JavaScript, while being more performant and easier to use than jQuery.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.