August 11, 2023

A boilerplate to be use in your project with React and Styled-components


technology technology technology technology technology

About this project

This is a boilerplate to be use in your project with tecnologies NextJS, TypeScript, Storybook, Styled-components, Jest & React-testing-library.


Run this project

# Creating your project using this boilerplate
$ yarn create next-app -e PROJECT_NAME

# Project directory

# Install dependencies
$ yarn

# Run project
$ yarn dev


  • yarn dev: run application on localhost:3000
  • yarn build: creates the production build version
  • yarn start: starts a simple server with the build production code
  • yarn lint: runs ESLint to test all components and pages
  • test: run Jest to test all components and pages
  • test:watch: run Jest to test in watch mode
  • yarn storybook: run storybook on localhost:6006
  • yarn generate: create the component structure in an automated way

Init Husky in your project

Execute command: npx husky-init && yarn

In the pre-commit file inside the .husky directory .husky/pre-commit Change line content npm test to npx --no-install lint-staged