Nextjs With Chakra UI Boilerplate screenshot

Nextjs With Chakra UI Boilerplate

Author Avatar Theme by Lukazovic
Updated: 12 Jun 2021
54 Stars

Next.js with Chakra UI boilerplate. PWA ready with storybook and tests configured.

Categories

Overview

The Next.js with Chakra-ui Boilerplate is a project template that combines several technologies to create a web application. It includes Next.js, TypeScript, Chakra-ui, PWA, Jest, React Testing Library, Storybook, Eslint, and Prettier. This boilerplate provides a starting point for developers to quickly set up a project with these technologies.

Features

  • Next.js: A framework for building server-side rendered and static websites with React.
  • TypeScript: A typed superset of JavaScript that compiles to plain JavaScript.
  • Chakra-ui: A simple and customizable component library for building React applications.
  • PWA: Progressive Web App functionality for the application.
  • Jest: A JavaScript testing framework for unit testing React components.
  • React Testing Library: A simple and intuitive library for testing React components.
  • Storybook: A development environment for building UI components in isolation.
  • Eslint: A customizable tool for identifying and reporting on patterns in JavaScript code.
  • Prettier: An opinionated code formatter that ensures consistent formatting within the project.
  • Husky: A tool that allows running scripts before committing or pushing code, for example, running tests or linters.

Installation

To create a project from this boilerplate, follow these steps:

  1. Clone the repository: git clone https://github.com/your/repository.git
  2. Install dependencies: npm install
  3. Run the development server: npm run dev
  4. Open http://localhost:3000 in your browser to see the application.
  5. Start editing the page by modifying pages/index.js. The page will auto-update as you edit the file.

Additional commands available:

  • npm run build: Creates the production build version.
  • npm start: Starts a simple server with the build production code.
  • npm run lint: Runs the linter in all components and pages.
  • npm run test: Runs Jest to test all components and pages.
  • npm run test:watch: Runs Jest in watch mode.
  • npm run typecheck: Checks TypeScript types.
  • npm run generate: Creates a component scaffold.
  • npm run storybook: Runs Storybook on http://localhost:6006.
  • npm run build-storybook: Creates the build version of Storybook.

Summary

The Next.js with Chakra-ui Boilerplate is a project template that includes Next.js, TypeScript, Chakra-ui, PWA, Jest, React Testing Library, Storybook, Eslint, and Prettier. It provides a starting point for developers to quickly set up a web application using these technologies. The boilerplate comes with various commands for development, testing, linting, and building, making it a comprehensive toolkit for building web applications.