Skip to content
/ lightning Public template

Lightning ⚑️ Boilerplate and starter for Nextjs 14, Tailwind CSS 3.3 and TypeScript πŸš€ Made with developer experience πŸ“š

License

Notifications You must be signed in to change notification settings

rikvermeulen/lightning

Repository files navigation

header

Lightning

Boilerplate and building blocks for your Next project

Get started with lightning by running npm create lightning-app@latest

Introduction Β· Tech Stack + Features Β· One-click Deploy Β· Author

πŸ‘‹ Introduction

Lightning is an opinionated collection of packages, utilities and a set of rules for your Next.js 14 project.

Requirements

  • Node.js 18+ and npm

🎁 Features

  • Next.js 14
  • Type checking TypeScript
  • Integrate with Tailwind CSS
  • Strict Mode for TypeScript and React 18
  • Linter with ESLint (default NextJS, NextJS Core Web Vitals, Tailwind CSS and Airbnb configuration)
  • Code Formatter with Prettier
  • Husky for Git Hooks
  • Lint-staged for running linters on Git staged files
  • Run tests on pull request with GitHub Actions
  • Absolute Imports using @ prefix
  • VSCode configuration: Debug, Settings, Tasks and extension for PostCSS, ESLint, Prettier, TypeScript
  • Fonts with Next/font for optimizing custom fonts and remove external network requests

πŸ‘¨πŸ»β€πŸ’» Getting started

Recommended installation
To create an app using lightning, run any of the following three commands and answer the command prompt questions:

npm

npm create lightning-app@latest

yarn

yarn create lightning-app

pnpm

pnpm create lightning-app@latest


Default installation
Or run the following command on your local environment:

git clone --depth=1 https://github.com/rikvermeulen/lightning.git project-name
cd project-name
npm install

Copy .env.example to .env.local and update the variables.

cp .env.example .env.local

Then, you can run locally in development mode:

npm run dev

Open http://localhost:3000 with your favorite browser to see your project.

β”œβ”€β”€ .husky                          # Husky configuration
β”œβ”€β”€ .vscode                         # VSCode configuration
β”œβ”€β”€ src                             # Project folder
β”‚   β”œβ”€β”€ app                         # App base
β”‚   β”‚   β”œβ”€β”€ api                     # Api router
β”‚   β”œβ”€β”€ components                  # Default components
β”‚   β”œβ”€β”€ lib                         # Lib folder
β”‚   β”œβ”€β”€ styles                      # Styles folder
β”‚   β”œβ”€β”€ types                       # Types folder
β”‚   β”œβ”€β”€ env.mjs                      # type-safe env
β”‚   β”œβ”€β”€ middleware.ts               # Middleware file
β”œβ”€β”€ public                          # Public assets folder
β”‚   β”œβ”€β”€ favicons                    # Favicons folder
β”œβ”€β”€ tailwind.config.cjs             # Tailwind CSS configuration
β”œβ”€β”€ next.config.mjs                 # Next configuration
β”œβ”€β”€ tailwind.config.cjs             # Tailwind CSS configuration
β”œβ”€β”€ prettierrc.cjs                  # Prettier configuration
β”œβ”€β”€ README.md                       # README file
β”œβ”€β”€ .eslintrc.cjs                   # Eslint config
└── tsconfig.json                   # TypeScript configuration

πŸš€ Deploy

Deploy Lightning on Vercel in one click:

Deploy with Vercel

πŸ—‚ VSCode information (optional)

For 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.

With the plugins installed on your VSCode, ESLint and Prettier can automatically fix the code and show you the errors. Same goes for testing, you can install VSCode Jest extension to automatically run your tests and it also show the code coverage in context.

🀝 Contributing

  1. Fork this repository;
  2. Create your branch: git checkout -b my-awesome-contribution;
  3. Commit your changes: git commit -m 'feat: Add some awesome contribution';
  4. Push to the branch: git push origin my-awesome-contribution.

πŸ“‹ License

Licensed under the MIT License, Copyright Β© 2023

See LICENSE for more information.

πŸ‘€ Author

About

Lightning ⚑️ Boilerplate and starter for Nextjs 14, Tailwind CSS 3.3 and TypeScript πŸš€ Made with developer experience πŸ“š

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks