Overview
The Battery Packed template is a Next.js 13 and React 18 template that is packed with various features and tools to help streamline the development process. It includes TypeScript, Chakra-UI v2, and offers extensive tooling for linting, formatting, and conventions. The template also comes with pre-configured settings for SEO optimization, a basic responsive layout, and automatic dependency updates.
Features
- Battery Packed template: A feature-rich template for Next.js 13 and React 18 projects.
- TypeScript: Built with TypeScript for increased type safety and productivity.
- Chakra-UI v2: Integration with Chakra-UI v2 for easy and customizable styling.
- Toolings for linting, formatting, and conventions: Configuration for tools like eslint, prettier, husky, lint-staged, commitlint, commitizen, and standard-version to ensure code quality and maintainability.
- PWA-ready: Configuration for Next.js PWA (Progressive Web App) support using next-pwa, which can be easily enabled through next.config.js.
- SEO optimization: Pre-configured settings for SEO optimization using next-sitemap, providing an out-of-the-box solution for better search engine visibility.
- Basic responsive layout: A responsive layout is already set up, but can be removed if not needed.
- Automatic Dependency Update: Integration with Renovate for automatic dependency updates, ensuring that your project is always up-to-date.
- Turbo setup: A streamlined setup process with easy-to-follow instructions for getting started quickly.
- Playwright E2E Test: Integration with Playwright for end-to-end testing, with references and documentation provided for running and writing tests.
Installation
To install the Battery Packed template, follow these steps:
- Clone the repository or click on the “Use this template” button.
- Once the project is cloned, navigate to the project directory in your terminal.
- Run the command
pnpm install
to install the project dependencies. - After the installation is complete, start the development server by running
pnpm run dev
. - Open your browser and go to http://localhost:3000 to see the result.
- You can start modifying the pages by editing the files in the
src/lib/pages
directory. Any changes you make will automatically update the page.
To run end-to-end tests locally, follow these additional steps:
- Build the production build of the project by running
pnpm build
. - Start the production build by running
pnpm start
in a separate terminal or tab. - Open another terminal or new tab (do not cancel or close the production server).
- Run the end-to-end tests by executing
pnpm test:e2e
.
Summary
The Battery Packed template is a comprehensive Next.js and React template that offers a wide range of features and tools to enhance development. It provides a solid foundation for building web applications with Next.js 13 and React 18, including TypeScript support, Chakra-UI v2 integration, and pre-configured tooling for linting and formatting. The template also includes features like PWA support, SEO optimization, automatic dependency updates, and Playwright integration for end-to-end testing. With clear installation instructions and a basic responsive layout, the Battery Packed template is a versatile choice for starting new projects.