This Vite React Tailwind Starter is a modern, lightweight template for building React applications. It combines the speed of Vite, the power of React, the flexibility of React Router DOM v6, and the utility-first approach of Tailwind CSS. This template is designed to jumpstart your React projects with a well-structured, maintainable, and scalable foundation.
- Features
- Technologies Used
- Project Structure
- Getting Started
- Usage
- Customization
- Contributing
- License
- Fast Development: Leverages Vite for near-instant server start and rapid hot module replacement (HMR).
- Modern React: Set up with the latest React features and best practices.
- Flexible Routing: Implements React Router DOM v6 for declarative routing.
- Responsive Design: Utilizes Tailwind CSS for rapid UI development and responsive layouts.
- Code Quality: Integrated ESLint and Prettier for consistent code style and quality.
- Optimized Production Build: Configured for efficient bundling and optimized performance.
- React: A JavaScript library for building user interfaces.
- Vite: A next-generation frontend tooling.
- React Router DOM v6: Declarative routing for React applications.
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
- ESLint: A tool for identifying and fixing problems in JavaScript code.
- Prettier: An opinionated code formatter.
vite-react-tailwind-starter/
βββ public/
βββ src/
β βββ assets/
β βββ components/
β β βββ common/
β β βββ layout/
β βββ configs/
β βββ constants/
β βββ containers/
β βββ contexts/
β βββ hooks/
β βββ layouts/
β βββ pages/
β βββ redux/
β βββ services/
β βββ styles/
β βββ utils/
β βββ App.jsx
β βββ main.jsx
β βββ RouterTree.js
βββ .editorconfig
βββ .env.example
βββ .eslintignore
βββ .eslintrc.cjs
βββ .gitignore
βββ .prettierignore
βββ .stylelintrc
βββ index.html
βββ jsconfig.json
βββ LICENSE
βββ package.json
βββ postcss.config.js
βββ prettier.config.js
βββ README.md
βββ tailwind.config.js
βββ vite.config.js
βββ yarn.lock
To get started with this template, follow these steps:
-
Clone the repository:
git clone https://github.com/tcdtist/public-vite-react-tailwind-starter.git cd public-vite-react-tailwind-starter
-
Install dependencies:
yarn install
-
Start the development server:
yarn dev
-
Open your browser and navigate to
http://localhost:8000
to view the application.
You can start building your application by:
- Adding new components in the
src/components
directory. - Creating new pages in the
src/pages
directory. - Defining routes in the
src/RouterTree
directory. - Adding custom hooks in the
src/hooks
directory. - Styling your components using Tailwind CSS classes.
- Tailwind CSS: Customize the
tailwind.config.js
file to adjust the design system. - ESLint: Modify
.eslintrc.cjs
to change linting rules. - Prettier: Adjust
prettier.config.js
for code formatting preferences. - Vite: Configure
vite.config.js
for build optimizations and plugins.
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your branch to your forked repository.
- Create a pull request with a description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.