Skip to content

Boilerplate for creating high-performance, standard Reactjs applications

License

Notifications You must be signed in to change notification settings

MarcosSantosDev/template-react-tailwind-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Boilerplate: High-Performance, Scalable Applications

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.

Project Structure (main files)

πŸ“¦ 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

Node.js Version

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.

β˜• Useful Commands

  • 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

πŸ“š Technologies Used

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.

🀝 Contributing

Contributions are welcome! To get started:

  1. Fork the repository.
  2. Create a new branch:
      git checkout -b <branch_name>
  3. Make your changes and commit:
      git checkout -b <branch_name>
  4. Push the changes:
      git checkout -b <branch_name>
  5. Open a pull request. For more detailed instructions, check the GitHub guide on pull requests.

πŸ“„ License

This project is licensed under the MIT License. For more information, see the LICENSE file.


Made with ❀️ and code by Marcos Santos.

Releases

No releases published

Packages

No packages published