Skip to content

React + Vite Boilerplate with Enhanced Development Experience πŸš€

License

Notifications You must be signed in to change notification settings

imohib168/react-vite-boilerplate

Repository files navigation

React Boilerplate with Enhanced Development Experience πŸš€

This repository serves as a comprehensive React boilerplate configured to streamline your development process. With a focus on code quality, maintainability, and a hassle-free setup, this boilerplate integrates various tools and packages to enhance your development experience.

Features ✨

Vite - Lightning-Fast React Setup ⚑

Vite is a next-generation frontend tooling that provides a rapid development server and optimized build setup for React applications. With Vite, you can enjoy lightning-fast development and seamless integration with the latest React features.

Prettier and ESLint πŸ“

Maintaining a consistent and clean codebase is crucial for any project. This boilerplate incorporates Prettier and ESLint to enforce code formatting and style rules. The configuration is based on the popular create-vite-pretty-lint package, ensuring a uniform coding style across your project.

File Naming Convention πŸ“

Consistency in file naming is essential for project organization and collaboration. The boilerplate integrates eslint-plugin-check-file to enforce a standardized file naming convention, reducing confusion and enhancing project structure.

Folder Structure Linting πŸ“

Maintain a clean and organized project structure with the help of folderslint. This tool ensures that your project adheres to predefined folder structure rules, promoting a well-organized and easily navigable codebase.

Commit Linting with Husky πŸ€–

Improve collaboration and code quality by incorporating Husky for Git hooks. This boilerplate configures Husky to run Commitlint and check folder linting before each commit. This ensures that your commits follow a consistent format and that your project's folder structure remains intact.

JSConfig Paths πŸ”

Simplify import statements in your code with the setup of jsconfig-paths. This package allows you to use the @ symbol as a shortcut to reference the 'src' directory in your imports, enhancing code readability and reducing the complexity of file paths.


Folder Lint Rules 🧹

The folder structure in this project is linted to ensure adherence to the React feature-based architecture model. This promotes maintainability and scalability by organizing code related to each feature in a structured manner.

Note: If you want to modify the project's architecture, ensure to update the rules in the .folderslintrc file.

Project Architecture Model πŸ›οΈ

React Feature-Based Architecture

Image credit: React Anti-patterns

Book Reference πŸ“š

For more insights into React best practices, check out the book React Anti-patterns for a detailed exploration of React development patterns and anti-patterns.


Getting Started πŸš€

  1. Clone this repository:

    git clone https://github.com/imohib168/react-vite-boilerplate.git
    
  2. Install dependencies:

    cd react-vite-boilerplate
    npm install
    
  3. Start the development server:

    npm run dev

Maintainer πŸ§‘β€πŸ’»

Mohib Ismail

Connect with me on LinkedIn for any inquiries or collaboration opportunities.

Contributing 🀝

Feel free to contribute to this project by submitting issues or pull requests. Your input is valuable, and together, we can make this React boilerplate even better.

License πŸ“„

This project is licensed under the MIT License, making it open for contributions and usage in both personal and commercial projects.

Thank you for choosing this React boilerplate. Happy coding! πŸš€