Overview:
Lightning is an opinionated collection of packages, utilities, and a set of rules for a Next.js 13.4 project. It provides features such as Next.js 13.4, type checking with TypeScript, integration with Tailwind CSS, strict mode for TypeScript and React 18, linter with ESLint, code formatter with Prettier, Git hooks with Husky, running linters on Git staged files with lint-staged, running tests on pull requests with GitHub Actions, absolute imports using @ prefix, and VSCode configuration for debugging, settings, tasks, and extensions. It also includes Next/font for optimizing custom fonts and removing external network requests. Additionally, Lightning offers an expansion pack for easily installing common libraries, additional components, and configurations, including unit testing with Vitest and React Testing Library, PWA with Workbox and Next-PWA plugin, and user authentication with Auth.js using providers like Google, Twitter, and GitHub. It provides a seamless integration with VSCode, with suggested extensions, settings, and debug configurations. Lightning can be deployed on Vercel with one click.
Features:
- Next.js 13.4
- Type checking with TypeScript
- Integration 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
- Git Hooks with Husky
- Running linters on Git staged files with lint-staged
- Running tests on pull requests 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 removing external network requests
Installation:
To create an app using Lightning, run any of the following three commands and answer the command prompt questions:
npm
yarn
pnpm
Or run the following command on your local environment:
Copy .env.example to .env.local and update the variables.
Then, you can run locally in development mode:
Open http://localhost:3000 with your favorite browser to see your project.
Summary:
Lightning is a comprehensive package for Next.js 13.4 projects, offering a range of features including type checking, integration with Tailwind CSS, and strict mode for TypeScript and React 18. It also includes tools for linting, formatting, and testing, and provides a seamless integration with VSCode. Lightning can be easily installed and deployed, making it a convenient choice for developers working with Next.js.