Skip to content

andriyfm/next-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next Boilerplate - Starter for Next.js 12+, TailwindCSS and Typescript

Commitizen friendly

🚀 Boilerplate and Starter for newest Next.js, TailwindCSS and TypeScript ⚡️ Made with developer who has experience with Next.js, TypeScript, ESLint, Prettier, Husky, VSCode, PostCSS, TailwindCSS.

You can check the demo here.

Features

  • Next.js for Static Site Generator
  • Integrate with Tailwind CSS (JIT mode)
  • Type checking TypeScript
  • Strict Mode for TypeScript and latest React
  • Linter with ESLint (default NextJS, NextJS Core Web Vitals and Google configuration)
  • Code Formatter with Prettier
  • Husky for Git Hooks
  • VSCode configuration: Settings and extension for PostCSS, ESLint, Prettier, TypeScript
  • SEO metadata, JSON-LD and Open Graph tags with Next SEO
  • Bundler Analyzer
  • Maximize lighthouse score
  • Github Action Test for Jest and Cypress
  • Commiziten Support
  • Progressive Web App Suport

Getting Started

Run the following command on your local environment:

git clone --depth=1 git@github.com:andriyfm/next-boilerplate.git my-project-name
cd my-project-name
npm install

Then, you can run locally in development mode with live reload:

npm run dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

File Structure

.
├── README.md                # README file
├── .husky                   # Husky folder
├── .vscode                  # VSCode folder
├── public                   # Public folder
│   └── assets
├── src
│   ├── components           # Atomic layout components
│   ├── configs              # Configs folder
│   ├── contexts             # Contexts folder
│   ├── data                 # Data folder
│   ├── hooks                # Custom hooks folder
│   ├── layouts              # Layout components folder
│   ├── pages                # pages folder
│   ├── styles               # PostCSS style folder with Tailwind
│   └── utils                # Utility folder
├── .eslintrc.js             # Eslint configuration
├── .prettierrc              # Prettier configuration
├── next.config.js           # Next JS configuration
├── postcss.config.js        # PostCSS configuration
├── tailwind.config.js       # Tailwind CSS configuration
└── tsconfig.json            # TypeScript configuration

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.