This is a simple weather forecasting web application that provides a 5-day weather forecast for any location. The app fetches weather data from the OpenWeather API and displays it in a user-friendly interface built with ReactJS.
- View the current weather and a 5-day forecast.
- Search for weather information by city name.
- Responsive design for seamless use on both desktop and mobile devices.
- ReactJS
- OpenWeather API
- CSS for styling
To run this project locally, you will need to have the following installed:
- Node.js (v12.x or later)
- npm (v6.x or later) or yarn (v1.x or later)
- An API key from OpenWeather (you can sign up for a free API key here)
git clone https://github.com/VijayMakkad/react-weather-app.git
cd weather-forecasting-web-app
Using npm:
npm install
Or using yarn:
yarn install
Create a .env
file in the root of the project and add your OpenWeather API key:
REACT_APP_OPENWEATHER_API_KEY=your_api_key_here
Using npm:
npm start
Or using yarn:
yarn start
The application will start in development mode and open in your default browser at http://localhost:3000
.
weather-forecasting-web-app/
├── public/
│ ├── index.html
│ └── ...
├── src/
│ ├── components/
│ │ ├── WeatherCard.js
│ │ ├── WeatherList.js
│ │ └── ...
│ ├── App.js
│ ├── index.js
│ └── ...
├── .env
├── package.json
└── README.md
- App.js: The main component that handles the overall layout and state management.
- WeatherCard.js: A component that displays the weather details for a single day.
- WeatherList.js: A component that displays a list of
WeatherCard
components for the 5-day forecast.
- Enter the name of the city you want to get the weather forecast for in the search bar.
- The app will display the current weather and the forecast for the next 5 days for the entered city.
Contributions are welcome! Please fork the repository and use a feature branch. Pull requests are warmly welcome.
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-feature-name
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to OpenWeather for providing the weather data API.
Feel free to customize this README file as per your project's specific details and requirements.