Overview
This product is a boilerplate and starter template for building applications using Next.js, Tailwind CSS, and TypeScript. It provides a pre-configured setup with key features and integration with popular tools and libraries.
Features
- Auth structure with Context API: Provides an authentication system using Context API for managing user authentication state.
- Type checking TypeScript: Ensures type safety by checking TypeScript code for errors and mistakes.
- Integrate with Tailwind CSS: Includes integration with Tailwind CSS, a utility-first CSS framework.
- Linter with ESLint: Includes ESLint configuration for linting code based on Next.js, jsx-a11y, TS Eslint, and Tailwind CSS rules.
- Code Formatter with Prettier: Includes Prettier for automatic code formatting.
- Husky for Git Hooks: Uses Husky for setting up Git hooks for automating tasks before commits and pushes.
- Absolute Imports using @ prefix: Enables absolute imports by using the “@” prefix.
- Run tests on pull request with GitHub Actions: Automates running tests when a pull request is created.
- Send notification for Discord using webhooks: Sends notifications to Discord using webhooks.
Installation
To get started with this boilerplate, make sure you have Node.js 14+ and npm or yarn installed. Then, follow these steps:
- Clone the repository to your local environment.
- Run the following command to install the dependencies:
npm install
or
yarn install
- Customize the configuration files as needed. Some important files to customize are:
src/styles/global.css- CSS file using Tailwind CSS.src/service/instance.ts- Add baseURL in axios instance or create a new axios instance.src/context/auth.ts- Change the login and userInfo request URL.
- Run the project locally in development mode with live reload:
npm run dev
or
yarn dev
- Open http://localhost:3000 in your favorite browser to see the project.
Summary
This product is a boilerplate and starter template for building applications with Next.js, Tailwind CSS, and TypeScript. It provides a pre-configured setup with features such as authentication structure, type checking with TypeScript, integration with Tailwind CSS, linter with ESLint, code formatter with Prettier, Git hooks with Husky, absolute imports, GitHub Actions for running tests on pull requests, and Discord notifications. The installation process is straightforward, and customization can be done by editing specific configuration files.