Giter Site home page Giter Site logo

viktorbezdek / next-js-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ixartz/next-js-boilerplate

0.0 1.0 0.0 1.37 MB

๐Ÿš€ Boilerplate and Starter for Next.js 11+, Tailwind CSS 2.0 and TypeScript โšก๏ธ Made with developer experience first: Next.js + TypeScript + ESLint + Prettier + Husky + Lint-Staged + VSCode + Netlify + PostCSS + Tailwind CSS

Home Page: https://creativedesignsguru.com

License: MIT License

JavaScript 15.37% TypeScript 81.71% CSS 1.72% Shell 1.21%

next-js-boilerplate's Introduction

Boilerplate and Starter for Next JS 11+, Tailwind CSS 2.0 and TypeScript Twitter

Next js starter banner

๐Ÿš€ Boilerplate and Starter for Next.js, Tailwind CSS and TypeScript โšก๏ธ Made with developer experience first: Next.js, TypeScript, ESLint, Prettier, Husky, Lint-Staged, VSCode, Netlify, PostCSS, Tailwind CSS.

Clone this project and use it to create your own Next.js project. You can check a Next js templates demo.

Features

Developer experience first:

  • ๐Ÿ”ฅ Next.js for Static Site Generator
  • ๐ŸŽจ Integrate with Tailwind CSS (w/ JIT mode)
  • ๐Ÿ’… PostCSS for processing Tailwind CSS and integrated to styled-jsx
  • ๐ŸŽ‰ Type checking TypeScript
  • โœ… Strict Mode for TypeScript and React 17
  • โœ๏ธ Linter with ESLint (default NextJS, NextJS Core Web Vitals and Airbnb configuration)
  • ๐Ÿ›  Code Formatter with Prettier
  • ๐ŸฆŠ Husky for Git Hooks
  • ๐Ÿšซ Lint-staged for running linters on Git staged files
  • ๐Ÿ—‚ VSCode configuration: Debug, Settings, Tasks and extension for PostCSS, ESLint, Prettier, TypeScript
  • ๐Ÿค– SEO metadata, JSON-LD and Open Graph tags with Next SEO
  • โš™๏ธ Bundler Analyzer
  • ๐Ÿ–ฑ๏ธ One click deployment with Vercel or Netlify (or manual deployment to any hosting services)
  • ๐ŸŒˆ Include a FREE minimalist theme
  • ๐Ÿ’ฏ Maximize lighthouse score

Built-in feature from Next.js:

  • โ˜• Minify HTML & CSS
  • ๐Ÿ’จ Live reload
  • โœ… Cache busting

Philosophy

  • Minimal code
  • SEO-friendly
  • ๐Ÿš€ Production-ready

Nextless.js SaaS Boilerplate

Building your SaaS product faster with Nextless JS SaaS Boilerplate.

Nextless React SaaS Boilerplate

Premium Themes

Green Nextjs Landing Page Template Purple Saas Nextjs Theme
Green Nextjs Landing Page Template Blue Landing Page Nextjs Theme

Find more Nextjs Themes.

Requirements

  • Node.js and npm

Getting started

Run the following command on your local environment:

git clone --depth=1 https://github.com/ixartz/Next-js-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 favorite browser to see your project.

.
โ”œโ”€โ”€ README.md                # README file
โ”œโ”€โ”€ next.config.js           # Next JS configuration
โ”œโ”€โ”€ public                   # Public folder
โ”‚   โ””โ”€โ”€ assets
โ”‚       โ””โ”€โ”€ images           # Image used by default template
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ layout               # Atomic layout components
โ”‚   โ”œโ”€โ”€ pages                # Next JS pages
โ”‚   โ”œโ”€โ”€ styles               # PostCSS style folder with Tailwind
โ”‚   โ”œโ”€โ”€ templates            # Default template
โ”‚   โ””โ”€โ”€ utils                # Utility folder
โ”œโ”€โ”€ tailwind.config.js       # Tailwind CSS configuration
โ””โ”€โ”€ tsconfig.json            # TypeScript configuration

Customization

You can easily configure Next js Boilerplate. Please change the following file:

  • public/apple-touch-icon.png, public/favicon.ico, public/favicon-16x16.png and public/favicon-32x32.png: your website favicon, you can generate from https://favicon.io/favicon-converter/
  • src/styles/main.css: your CSS file using Tailwind CSS
  • src/utils/AppConfig.ts: configuration file
  • src/templates/Main.tsx: default theme

Deploy to production

You can see the results locally in production mode with:

$ npm run build
$ npm run start

The generated HTML and CSS files are minified (built-in feature from Next js). It will also removed unused CSS from Tailwind CSS.

You can create an optimized production build with:

npm run build-prod

Now, your blog is ready to be deployed. All generated files are located at out folder, which you can deploy with any hosting service.

Deploy to Netlify

Clone this repository on own GitHub account and deploy to Netlify:

Netlify Deploy button

Deploy to Vercel

Deploy this Next JS Boilerplate on Vercel in one click:

Deploy with Vercel

VSCode information (optional)

If you are VSCode users, you can have a better integration with VSCode by installing the suggested extension in .vscode/extension.json. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience.

Pro tips: if you need a project wide type checking with TypeScript, you can run a build with Cmd + Shift + B on Mac.

Contributions

Everyone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug.

License

Licensed under the MIT License, Copyright ยฉ 2020

See LICENSE for more information.


Made with โ™ฅ by CreativeDesignsGuru Twitter

Sponsor Next JS Boilerplate

next-js-boilerplate's People

Contributors

ixartz avatar mrhbs avatar zeevo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.