/frontend-next-boilerplate

A React advanced boilerplate using NextJS, TypeScript, Styled Components and PWA support

Primary LanguageTypeScript

React Next Boilerplate

What's inside it?

Dependencies

  • Node js => v10

Up and Running

  • Install dependencies yarn (or npm i)
  • Run yarn dev (or npm dev) to run next development server (it will be available in http://localhost:3000
  • Run yarn generate [ComponentName] to create a new component structure automatically (the result will be generated in src/components/[ComponentName])

Available scripts

  • yarn dev (or npm dev): Run next development server
  • yarn build (or npm run build): Generate next production build
  • yarn start (or npm start): Run next production server
  • yarn test (or npm run test): Run tests
  • yarn test:watch (or npm run test): Run tests in watch mode

Components structure

├── /src/
│   ├── /components/
│       ├── /[ComponentName]/
            ├── /index.tsx/   # Component file
            ├── /styles.ts/   # Component styled-components styles
            ├── /test.tsx/    # Component test file

How to use it?

Run yarn create next-app -e https://github.com/rodrigowpl/frontend-next-boilerplate

Enjoy it :)