A simple and intuitive weather application built with React that allows users to check current weather conditions and forecasts for any location.
Visit weather-by-baberr.netlify.app
- Search for weather information by location
- Display current weather conditions including temperature, humidity, wind speed, and UV index
- Show a 3-day weather forecast
- Provide detailed hourly weather information for the current day
- Responsive design for various screen sizes
- React
- Material-UI
- Axios for API requests
- Weather API (weatherapi.com)
- Clone the repository:
git clone https://github.com/baberlabs/weather-app.git
- Navigate to the project directory:
cd weather-app
- Install dependencies:
npm install
- Create a
.env
file in the root directory and add your Weather API key:VITE_API_KEY=your_api_key_here
- Start the development server:
npm run dev
- Enter a location in the search bar on the home page.
- Click the "Search" button or press Enter to view the current weather and forecast.
- Click "More Details" to see hourly weather information for the current day.
- Use the "Go Back" button to return to previous screens.
App.jsx
: Main component managing the application state and rendering child componentsSearch.jsx
: Handles user input for location searchWeatherData.jsx
: Displays current weather conditions and 3-day forecastMoreDetails.jsx
: Shows detailed hourly weather information for the current day
This application uses the Weather API to fetch weather data. You'll need to sign up for a free API key to use this application.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.