Next Boilerplate

screenshot of Next Boilerplate
express
nextjs
react
scss
styled-components

Minimal Next.js boilerplate

Overview

The NEXT Boilerplate is a lightweight boilerplate for the Next.js framework. It was created to address the lack of certain features in Next.js that the developers needed. This boilerplate includes a range of features such as Redux for state management, Redux Saga for handling asynchronous actions and side effects, next-routes for dynamic route handling, axios for making HTTP requests, dotenv for using environment variables, express as the server, and more. It also comes pre-configured with prettier and eslint using airbnb's styleguide for code formatting, as well as husky and lint-staged for autoformatting code before committing. Additionally, it includes styled-components, flow, and Storybook, although these can be removed if desired.

Features

  • Redux: Manages application state.
  • Redux Saga: Handles asynchronous actions and side effects.
  • next-routes: Handles dynamic route handling.
  • axios: Enables making HTTP requests.
  • dotenv: Allows the use of environment variables.
  • express: Serves as the server.
  • redux-devtools: Facilitates development by providing a tool for managing actions and state changes.
  • redux-logger: Logs actions and state changes for development purposes.
  • universal-cookie-express: Provides middleware for writing cookies easily.
  • compression: Compresses static assets.
  • babel-plugin-module-resolver: Enables importing modules related to the root directory.
  • prettier and eslint: Configured with airbnb's styleguide for code formatting.
  • husky and lint-staged: Autoformats code before commit.
  • styled-components: Allows writing actual CSS code to style components.
  • flow and Storybook: Includes flow for static type checking and Storybook for component development and testing.

Summary

The NEXT Boilerplate is a lightweight Next.js boilerplate that addresses the limitations of the Next.js framework by providing additional features and configurations. It includes popular libraries such as Redux, Redux Saga, Axios, and dotenv for managing application state, handling asynchronous actions, making HTTP requests, and using environment variables, respectively. It also comes with pre-configurations for code formatting using prettier and eslint, as well as tools for automating code formatting before committing. Additionally, it includes styled-components for styling components using CSS and flow for static type checking. Overall, the NEXT Boilerplate is a comprehensive solution for building Next.js applications with advanced features and configurations.

express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

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

scss
SCSS

SCSS is a preprocessor scripting language that extends the capabilities of CSS by adding features such as variables, nesting, and mixins. It allows developers to write more efficient and maintainable CSS code, and helps to streamline the development process by reducing repetition and increasing reusability.

styled-components
Styled Components

Styled Components is a popular library for styling React components using CSS syntax. It allows you to write CSS in your JavaScript code, making it easier to create dynamic styles that are specific to each component.

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.

Redux

Redux is a state management library for JavaScript apps that provides a predictable and centralized way to manage application state. It enables developers to write actions and reducers that update the state in response to user interactions, server responses, and other events, and can be used with a variety of front-end frameworks and back-end technologies.

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.