A modern, responsive weather application built with React and Material-UI that provides real-time weather information, forecasts, and air quality data.
Check out the live application: Ultimate Weather App
- 🌍 Current Location Weather: Automatically detects and displays weather for your current location
- 🔍 City Search: Search for weather information of any city worldwide
- 📊 Detailed Weather Information:
- Current temperature and conditions
- Humidity and wind speed
- Feels like temperature
- Cloud coverage
- 📅 5-Day Forecast: View weather predictions for the next 5 days
- 🌫️ Air Quality Index: Check air quality and pollution levels
- 🎨 Dynamic Backgrounds: Beautiful background images that change based on weather conditions
- 📱 Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- 🌈 Modern UI: Clean and intuitive interface with Material Design
- React.js
- Material-UI
- Axios
- OpenWeatherMap API
- Unsplash API
- Geolocation API
- Node.js (v14 or higher)
- npm or yarn
- OpenWeatherMap API key
- Unsplash API key
-
Clone the repository:
git clone https://github.com/ankitklakra/ultimate-weather-app.git cd ultimate-weather-app -
Install dependencies:
npm install # or yarn install -
Create a
.envfile in the root directory and add your API keys:REACT_APP_OPENWEATHER_API_KEY=your_openweather_api_key REACT_APP_UNSPLASH_API_KEY=your_unsplash_api_keyYou can use
.env.exampleas a template:cp .env.example .env
Then edit
.envwith your actual API keys. -
Start the development server:
npm start # or yarn start -
Open http://localhost:3000 to view it in your browser.
- Go to OpenWeatherMap
- Sign up for a free account
- Navigate to your API keys section
- Copy your API key
- Go to Unsplash Developers
- Sign up or log in
- Create a new application
- Copy your Access Key
-
Current Location Weather:
- Allow location access when prompted
- Weather information will automatically load for your location
-
Search for a City:
- Enter a city name in the search box
- Click the search button or press Enter
- View detailed weather information
-
View Different Information:
- Use the tabs to switch between:
- Current Weather
- 5-Day Forecast
- Air Quality
- Use the tabs to switch between:
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Weather data provided by OpenWeatherMap
- Background images from Unsplash
- Icons from Material Icons
Ankit Lakra - GitHub
Project Link: https://github.com/ankitklakra/ultimate-weather-app
-
Build the project:
npm run build # or yarn build -
Deploy using Netlify CLI:
# Install Netlify CLI npm install -g netlify-cli # Login to Netlify netlify login # Initialize and deploy netlify init
-
Or deploy directly from Netlify UI:
- Go to Netlify
- Click "New site from Git"
- Choose your repository
- Configure build settings:
- Build command:
npm run buildoryarn build - Publish directory:
build
- Build command:
- Add environment variables in Netlify UI:
REACT_APP_OPENWEATHER_API_KEYREACT_APP_UNSPLASH_API_KEY
-
Configure Environment Variables:
- Go to Site settings > Build & deploy > Environment
- Add your environment variables:
REACT_APP_OPENWEATHER_API_KEY=your_openweather_api_key REACT_APP_UNSPLASH_API_KEY=your_unsplash_api_key
-
Trigger a new deployment:
- Go to Deploys
- Click "Trigger deploy" > "Deploy site"
Your app will be live at https://your-site-name.netlify.app