Weather App π¦οΈ
A simple weather application that fetches real-time weather data using the OpenWeatherMap API and dynamically displays weather information with user-friendly visuals.
Features
- π Search for weather details by city name.
- π‘οΈ Displays current temperature, humidity, minimum & maximum temperature, and weather descriptions.
- π¨ Dynamic visuals with icons and background images based on weather conditions (hot, cold, rainy, etc.).
- β Error handling for invalid city names.
Tech Stack
- Frontend: React, Material-UI (MUI).
- API: OpenWeatherMap.
Installation
-
Clone the repository: git clone https://github.com/yourusername/weather-app.git
-
Navigate to the project directory: cd weather-app
-
Install dependencies: npm install
-
Add your OpenWeatherMap API key to the SearchBox.jsx file: const API_KEY = "your_api_key_here";
-
Start the development server: npm start
Usage
- Enter the city name in the search box and click Search.
- View real-time weather data and corresponding visuals.
Project Structure
src
βββ components
β βββ InfoBox.jsx # Displays weather information
β βββ SearchBox.jsx # Allows user to search for a city's weather
βββ WeatherApp.jsx # Main application component
βββ index.js # Entry point of the app
Future Enhancements
- π Add support for multiple languages.
- π Integrate geolocation to fetch weather automatically for the user's location.
- π Include graphs for temperature trends over the week.
Contributing Contributions are welcome!
- Fork the project.
- Create your feature branch: git checkout -b feature/new-feature.
- Commit your changes: git commit -m 'Add some feature'.
- Push to the branch: git push origin feature/new-feature.
- Open a pull request.
License This project is licensed under the MIT License.
