Skip to content

A small React project built with Vite, written in TypeScript, and fully tested using Vitest and Testing Library.

Notifications You must be signed in to change notification settings

alirezashn79/react-rtl

Repository files navigation

🚀 React-RTL

A small React project built with Vite, written in TypeScript, and fully tested using Vitest and Testing Library and Mock Service Worker. This project focuses on clean code, reusable components, and rigorous testing.


🌟 Features

  • State Management: Powered by zustand for simplicity and efficiency.
  • Forms Made Easy: Includes react-hook-form for robust form handling with zod validation.
  • Testing First: All components are rigorously tested using Vitest and Testing Library.
  • Design System: Styled using tailwindcss with animations and utility-based design principles.
  • Modern Tooling: Built with Vite for blazing-fast development.

🛠️ Scripts

The following scripts are defined in package.json:

Script Description
dev Start the development server.
build Build the app for production.
lint Run ESLint to check code quality.
preview Preview the production build locally.
test Run all unit and integration tests.
coverage Generate test coverage report.

Run any script using:

npm run <script-name>

🚀 Getting Started

Follow these steps to set up the project locally:

  1. Clone the repository:

    git clone https://github.com/alirezashn79/react-rtl.git
    cd react-rtl
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

Your app will be available at http://localhost:3000.


🧪 Running Tests

This project uses Vitest for testing. To run the tests, execute:

npm run test

For a detailed coverage report:

npm run coverage

📂 Project Structure

Here's a quick overview of the project's structure:

src/
├── components/       # Reusable React components
├── hooks/            # Custom React hooks
├── pages/            # Page-level components
├── styles/           # TailwindCSS configuration and styles
├── utils/            # Helper functions and utilities
tests/                # Unit and integration tests

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


✨ Built with ❤️ using React, Vite, and TypeScript ✨

About

A small React project built with Vite, written in TypeScript, and fully tested using Vitest and Testing Library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published