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.
- 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.
- tests/: Unit and integration tests using Vitest and React Testing Library to ensure code quality and reliability.
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.
To access all functionalities and use the services, authentication is required. You can use the following mock credentials for login:
- Username:
admin
- Password:
123
-
Clone the repository:
git clone https://github.com/aleaguiard/react-project.git
-
Navigate to the project directory:
cd react-project/proyecto-react
-
Install dependencies:
npm install
-
Start the application:
npm run dev