Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.76 KB

README.md

File metadata and controls

53 lines (36 loc) · 1.76 KB

React Project with TypeScript and Vite

This project is a React application developed with TypeScript and Vite. It is designed to display the current date and time, fetch weather information including images for a specific city, and show quotes from various categories using different services.

Project Structure

  • api/: Contains classes and services for making requests to external APIs using Axios.
  • components/: Reusable UI components such as DateTime, Weather, and RandomQuote.
  • hooks/: Custom hooks for reusable logic tailored to specific application needs.
  • pages/: Components representing different views or pages of the application.
  • types/: Data types and interface definitions used throughout the application.

Testing

  • tests/: Unit and integration tests using Vitest and React Testing Library to ensure code quality and reliability.

Dependency Injection and Services

The application utilizes dependency injection to manage and decouple services effectively:

  • api/services: Defines services that are injected into components as needed, such as weather and quote services.
  • React Context: Utilized to provide services and global data to child components without manual prop drilling.

Authentication

To access all functionalities and use the services, authentication is required. You can use the following mock credentials for login:

  • Username: admin
  • Password: 123

Installation

  1. Clone the repository:

    git clone https://github.com/aleaguiard/react-project.git
  2. Navigate to the project directory:

    cd react-project/proyecto-react
  3. Install dependencies:

    npm install
  4. Start the application:

    npm run dev