|
2 | 2 |
|
3 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
4 | 4 |
|
| 5 | + |
| 6 | +### Features |
| 7 | + |
| 8 | +- ⚡ [React.js](https://react.dev/) |
| 9 | +- ⚡ [Material-UI](https://mui.com/) |
| 10 | +- 🔥 Type checking [TypeScript](https://www.typescriptlang.org) |
| 11 | +- 💎 Integrate with [Tailwind CSS](https://tailwindcss.com) |
| 12 | +- ✅ Strict Mode for TypeScript and React 18 |
| 13 | +- 📏 Linter with [ESLint](https://eslint.org) (default NextJS, NextJS Core Web Vitals, Tailwind CSS and Airbnb configuration) |
| 14 | +- 💖 Code Formatter with [Prettier](https://prettier.io) |
| 15 | +- 🦊 Husky for Git Hooks |
| 16 | +- 🚫 Lint-staged for running linters on Git staged files |
| 17 | +- 🗂 VSCode configuration: Debug, Settings, Tasks and extension for PostCSS, ESLint, Prettier, TypeScript, Jest |
| 18 | + |
| 19 | +### Requirements |
| 20 | + |
| 21 | +- Node.js 16+ and pnpm |
| 22 | + |
| 23 | +### Getting started |
| 24 | + |
| 25 | +Run the following command on your local environment: |
| 26 | + |
| 27 | +```shell |
| 28 | +git clone --depth=1 https://github.com/sonht113/react-boilerplate-for-starter.git |
| 29 | +cd my-project-name |
| 30 | +pnpm install |
| 31 | +``` |
| 32 | + |
| 33 | +Then, you can run locally in development mode with live reload: |
| 34 | + |
| 35 | +```shell |
| 36 | +pnpm run dev |
| 37 | +``` |
| 38 | + |
| 39 | +Open http://localhost:5173 with your favorite browser to see your project. |
| 40 | + |
| 41 | +```shell |
| 42 | +. |
| 43 | +├── README.md # README file |
| 44 | +├── .github # GitHub folder |
| 45 | +├── .husky # Husky configuration |
| 46 | +├── public # Public assets folder |
| 47 | +├── src |
| 48 | +│ ├── apis # Common apis folder |
| 49 | +│ ├── components # Component folder |
| 50 | +│ ├── configs # Config and constants |
| 51 | +│ └── api # api and services hooks |
| 52 | +│ ├── hooks # Hooks customs folder |
| 53 | +│ ├── layouts # Layout Pages |
| 54 | +│ └── pages # React JS Pages |
| 55 | +│ ├── providers # Provider folder |
| 56 | +│ └── routes # Routes folder |
| 57 | +│ ├── helpers # Shared types and utils functions |
| 58 | +│ ├── @types # typescript defintions |
| 59 | +├── tailwind.config.js # Tailwind CSS configuration |
| 60 | +└── tsconfig.json # TypeScript configuration |
| 61 | +``` |
| 62 | + |
| 63 | +### Customization |
| 64 | + |
| 65 | +- `src/index.css`: your CSS file using Tailwind CSS |
| 66 | +- `src/main.tsx`: default theme |
| 67 | + |
| 68 | +You have access to the whole code source if you need further customization. The provided code is only example for you to start your project. The sky is the limit 🚀. |
| 69 | + |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | + |
5 | 74 | Currently, two official plugins are available:
|
6 | 75 |
|
7 | 76 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
0 commit comments