/clean-frontend-template

Sample of the frontend project using NextJS easy to understand and use.

Primary LanguageTypeScriptMIT LicenseMIT


Clean Frontend: A frontend template to build good solutions too easy.

This is a template for a frontend project built with TypeScript, Next.js, and Tailwind CSS.

Features

  • TypeScript: Type-safe JavaScript superset for building scalable applications.
  • Next.js: React framework for server-rendered applications with easy page-based routing.
  • Tailwind CSS: Utility-first CSS framework for quickly styling your applications.
  • Husky: Git hooks made easy to automate linting and other tasks.
  • ESLint: Pluggable JavaScript linter for identifying and fixing problems in code.
  • Git Commit Message Linter: Enforce consistent and meaningful commit messages.

Getting Started

  1. Clone this repository:
   git clone https://github.com/your-username/frontend-project-template.git
  1. Navigate into the project directory:
   cd clean-frontend-template
  1. Install dependencies:
   pnpm install # first option
   yarn install # second option
   npm install  # third option

Usage

Run the development server:

   pnpm dev     # first option
   yarn dev     # second option
   npm run dev  # third option

Linting and Formatting

This project includes ESLint for linting JavaScript and TypeScript files, Prettier for code formatting, and Husky to automatically run linting and formatting checks before committing your code.

To manually run linting:

   pnpm lint     # first option
   yarn lint     # second option
   npm run lint  # third option

Prettier is integrated into the linting process and will automatically format your code to adhere to the defined code style rules. However, you can also manually format your code using the following command:

   pnpm format     # first option
   yarn format     # second option
   npm run format  # third option

Commit Message Linting

This project enforces consistent and meaningful commit messages using Commitlint. Make sure to follow the conventional commit message format when committing changes.

Contributing

Feel free to contribute to this project by opening issues or submitting pull requests. Please follow the existing code style and conventions.