The Weather App provides you with the latest weather information for Oulu, including a 7-day forecast, current conditions, and an hourly chart to visualize the week's weather changes.
It uses the Open Meteo API for data, Chart.js for charts, and is built with Vite, React, TypeScript, Axios, and date-fns.
![Screenshot 2023-12-19 at 15 07 04](https://private-user-images.githubusercontent.com/112544437/291594632-349e15ba-f694-4fab-8e96-ce7428fdea12.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3MDY0NDcsIm5iZiI6MTcyMzcwNjE0NywicGF0aCI6Ii8xMTI1NDQ0MzcvMjkxNTk0NjMyLTM0OWUxNWJhLWY2OTQtNGZhYi04ZTk2LWNlNzQyOGZkZWExMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNVQwNzE1NDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jYTg0MTM1OTI0ODgwMjczOWVhOTM1NWUwNTQ3MjkzYjg0NzliNTZlZTU5ZGRjNDVhNTE5ZjJiNmUzZWNlMjVkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.bvJ5JnxP36vo63iOK8zoik35Vf5gcRMeUANaSU70w_s)
The Weather App is deployed at https://maguitaria.github.io/weather-app-react/. Enjoy!)
-
Clone the repository:
git clone https://github.com/yourusername/weather-app.git
-
Navigate to the project directory:
cd weather-app
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open your browser and access the app at http://localhost:3000.
-
7-Day Forecast: Get a detailed 7-day weather forecast for Oulu, including temperature, descriptions, and more.
-
Current Weather: View current conditions in Oulu, including temperature, humidity, and wind speed.
-
Hourly Chart: Visualize hourly weather changes throughout the week with an interactive chart.
-
Responsive Design: Enjoy a seamless user experience on all devices, from desktop to mobile.
- Vite for a fast and modern development experience.
- React for building user interfaces.
- Chart.js for creating interactive weather charts.
- date-fns for date and time formatting.
- TypeScript for enhanced code quality.
- Axios for making API requests.
E2E Tests with Playwright. As project has only one main page, I decided to go with full e2e testing.
The Weather App has integration tests using Playwright. To run the tests, follow these steps:
bash
npm start
To fire the UI testing and additional features:
//Run with UI demontstration
npx playwright test --ui
// After test show the report
npx playwright show-report
// To generate tests
npx playwright codegen
Open a new terminal window and run the integration tests:
npm test
I reccomend using deployed version to ensure that testing runs smoothly.
Playwright will launch a browser and perform automated tests to ensure the app functions correctly.
Playwright tests are in GitHub actions, with deployment URL.
It's recommended to use the deployed version of the Weather App to ensure that testing runs smoothly.
Please follow these steps to ensure your Weather App is thoroughly tested for integration.
-
Location-Based Forecast: Detect and display weather information for your current location.
-
Customizable Units: Choose your preferred units of measurement.
-
Weather Alerts: Receive notifications for severe weather conditions.
-
Extended Forecast: Get a 14-day weather forecast.
-
Historical Data: Explore historical weather data and trends.
-
Additional Charts: Visualize more weather parameters.
-
User Profiles: Save favorite locations for quick access.
- Mariia Glushenkova - Creator and main developer.
This project is licensed under the MIT License. See the LICENSE.md file for details.