Skip to content

Latest commit

 

History

History
96 lines (67 loc) · 2.3 KB

README.md

File metadata and controls

96 lines (67 loc) · 2.3 KB

Next.JS Boilerplate

CircleCI codecov GitHub

Motivation

I am an avid user of Next.js, their repo contains tons of useful examples for integarting with isolated tooling or features, often I spent a lot of time glueing together different tooling in what ended up being a tedious setup process, so I created this boilerplate including:

  • Typescript for type safety
  • Jest for tests
  • Typescript-ESLint for linting
  • Prettier for code formatting
  • Styled-components for styling and theming along with polished
  • Docker
  • Storybook
  • circleci config
  • percy for visual snapshot testing
  • codecov for code coverage reports

This project also includes some tooling, templates, and acts as a sandbox for me testing features and integrations

How to use

node version

node version is defined at the .nvmrc file and can be loaded using nvm by running nvm use command

Install dependencies

npm i
# or
yarn

Or build with docker:

# build
docker build -t next-app .

Run it locally

Development server:

npm run dev
# or
yarn dev

Run it with docker:

docker run --rm -it \
  -p 3000:3000 \
  next-app

Tests

npm run test
# or
yarn test

storybook

npm run storybook
# or
yarn storybook

Deployment:

Deploy it to the cloud with now (download) with docker

now --docker

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Upcoming

  • apollo and graphql setup
  • redux for state management

Buy Me A Coffee