guilhiz / React-Boilerplate

A pre-configured React Boilerplate with TypeScript to make starting a new project easier. Includes settings for popular tools and libraries, and is highly customizable to meet your needs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My React Boilerplate with TypeScript

βš™οΈ Configs

  • πŸš€ Vite β€” A native ES modules development server and build tool.
  • πŸ”„ Dependabot β€” Automated dependency updates for GitHub repositories.
  • πŸ”§ ESLint β€” Pluggable JavaScript linter
  • 🎨 Prettier β€” Opinionated Code Formatter
  • πŸ“ Commitzen β€” Git commit message helper
  • 🐢 Husky β€” Use git hooks with ease
  • 🚫 Lint-staged β€” Run linters against staged git files

Libs

  • 🌐 Axios β€” HTTP client library for JavaScript.
  • πŸ’… Styled-components β€” library for styling React components.
  • πŸ“‹ React-hook-form β€” lightweight library for building forms.
  • πŸ”’ Zod β€” TypeScript-first schema validation.

πŸš€ Getting Started

To use this boilerplate as a template for your own project, follow these steps:

  • Click on the Use this template button on this repository page to create a new repository from this template.
  • Choose a name and configure the new repository as desired.
  • Clone the newly created repository to your local machine with the following command in your terminal:
git clone https://github.com/<YOUR_USERNAME>/<YOUR_PROJECT_NAME>.git

After cloning the repository, run the following commands inside the project folder:

  • Install the dependencies with npm install
  • Start the project with npm start

πŸ“ Main File Structure

β”œβ”€β”€ πŸ“.github // GitHub workflows
β”œβ”€β”€ πŸ“.husky // Git hooks
|
β”œβ”€β”€ πŸ“src
|   β”œβ”€β”€ πŸ“@types // Type definitions
|   β”œβ”€β”€ πŸ“components // React components
|   β”œβ”€β”€ πŸ“hooks // Custom hooks
|   β”œβ”€β”€ πŸ“pages // Pages or screens
|   β”œβ”€β”€ πŸ“service // API services
|   β”œβ”€β”€ πŸ“styles  // Global styles
|   β”œβ”€β”€ πŸ“theme // Theme files
|   β”œβ”€β”€ πŸ“utils // General utilities
|   |   β”œβ”€β”€πŸ“constants // Global constants
|   |   β””β”€β”€πŸ“functions // Utility functions
|   |
|   └── πŸ“„index.tsx // Main entry file
|
β”œβ”€β”€ πŸ“„.eslintrc.json // ESLint configuration file
β”œβ”€β”€ πŸ“„.prettierrc // Prettier configuration file
β”œβ”€β”€ πŸ“„Index.html // Entry point HTML file
β”œβ”€β”€ πŸ“„README.md // Project documentation
β”œβ”€β”€ πŸ“„package.json // NPM package configuration file
β”œβ”€β”€ πŸ“„tsconfig.json // TypeScript configuration file
└── πŸ“„vite.config.ts // Vite configuration file

🀝 Contributing

If you want to contribute to this template, follow these steps:

  • Fork this repository
  • Create a new branch with their feature using git checkout -b my-feature.
  • Commit their changes using git commit -m 'Adding new feature'.
  • Push the changes to their branch using git push origin my-feature.
  • Open a pull request on your repository.

About

A pre-configured React Boilerplate with TypeScript to make starting a new project easier. Includes settings for popular tools and libraries, and is highly customizable to meet your needs.

License:Mozilla Public License 2.0


Languages

Language:TypeScript 82.9%Language:Shell 8.8%Language:HTML 8.3%