This boilerplate is designed for developers who need to quickly set up a scalable and high-performance React application. It integrates modern tools, aiming to provide an optimized and efficient development environment right out of the box.
π¦ template-react-tailwind-css/
βββ π .husky/
βββ π .vscode/
βββ π docs/ /* File with project documentation */
βββ π public/
β βββ π assets/
β β βββ π images/
β βββ π mockServiceWorker.js
βββ π src/
β βββ π @types/
β βββ π components/
β β βββ π app/ /* Global components used by the application once */
β β βββ π ui/ /* Global components used by the entire application */
β βββ π constants/ /* Global application constants */
β βββ π features/ /* Each βfeatureβ, such as auth, has a small βsrcβ inside it, for the "feature" created */
β β βββ π auth/
β β β βββ π components/
β β β βββ π hooks/
β β β βββ π services/
β β β βββ π types/
β βββ π HOC/
β βββ π hooks/ /* Global application hooks */
β βββ π layouts/ /* Application layouts */
β βββ π libs/ /* Library configurations */
β βββ π styles/ /* Global application styles */
β βββ π utils/ /* Global application utilities */
β βββ π pages/
β β βββ π SignIn.tsx
β βββ π router/
β β βββ π index.ts /* Routes supplier */
β β βββ π config
β β β βββ π route.types.ts /* Route types */
β β β βββ π routePaths.ts /* Route paths */
β β β βββ π app.routes.ts /* Personalized routes with icons and titles */
β β β βββ π routes.ts /* Application routes */
β β β βββ π routesNavigationToConfig.ts /* Method that undoes customized routes */
β βββ π env.ts /* Type-validated environment variables */
β βββ π main.ts
This project is compatible with Node.js versions >= 20.0.0
. While it may work with older versions, it's recommended to use the latest LTS (Long Term Support) version for optimal performance and compatibility.
- Start the development server: Launches the app in development mode.
npm run dev
- Build the project: Prepares the app for production by bundling it.
npm run build
- Run tests: Executes the test suite.
npm run test
- Generate test coverage: Provides test coverage reports.
npm run coverage
The project leverages the following technologies:
- React: A JavaScript library for building user interfaces.
- React Router DOM: Declarative routing for React applications.
- TypeScript: A typed superset of JavaScript that compiles to plain JavaScript.
- Tailwind: Rapidly build modern websites without ever leaving your HTML.
- Zustand: A small, fast, and scalable state management library for React.
- Axios: Promise-based HTTP client for the browser and Node.js.
- Vite: A fast build tool and development server for modern web projects.
- Vitest: A Vite-native testing framework.
- Jest: A delightful JavaScript testing framework with a focus on simplicity.
- Testing Library: Simple and complete testing utilities for React components.
- MSW (Mock Service Worker): API mocking library for testing and development.
- Husky: Git hooks made easy, enabling automation of tasks on Git commits.
- ESLint: A static code analysis tool to identify problematic patterns.
- Prettier: An opinionated code formatter for consistent code style.
- Lucide React: A collection of beautiful & consistent open-source icons for React.
Contributions are welcome! To get started:
- Fork the repository.
- Create a new branch:
git checkout -b <branch_name>
- Make your changes and commit:
git checkout -b <branch_name>
- Push the changes:
git checkout -b <branch_name>
- Open a pull request. For more detailed instructions, check the GitHub guide on pull requests.
This project is licensed under the MIT License. For more information, see the LICENSE file.
Made with β€οΈ and code by Marcos Santos.