Skip to content

AlexLms/Next.js-starter

Repository files navigation

Next.js boilerplate

Create React apps with next.js but without pain.

Next.js starter pack

Use ready made solutions and build your application on top of it eeeeeasyly.

Installation

  1. Clone the branch you need

  2. cd to Next.js-starter folder.

  3. Install all dependencies via npm npm i or yarn yarn install.

  4. Start your web server yarn start || npm run start.

File location and stuff

.
├── actions             # Redux actions used api/ functions
├── api                 # Axios requests logic
├── components/         # All components used in the project
├── constants/          # Redux constants used in actions/
├── layout/             # Laout the entire app is stored in one place
├── lib/                # HOC for redux store, to check if current status is the server or client
├── pages/              # Pages that use components/ + next logic
├── reducers/           # Redux reducers
├── store/              # Redux store with initial state
├── static/             # Used to store fonts, icons, images, css
└── ...

Build production

To build a production version of your app you need to type

npm run build || yarn build

This will create dist folder where everything will be compressed and minified.

The idea behind the example

This example shows how to integrate Redux, styled-components, linter in Next.js.

Also remind me stuff :D