A responsive, modern Weather Forecast Web App built using HTML, CSS, and vanilla JavaScript, integrating real-time weather and air quality data from OpenWeatherMap APIs.
This project demonstrates your ability to handle REST APIs, manipulate the DOM, and design clean, user-friendly UIs with Bootstrap 5.
🔗 View Live Project
(Replace with your GitHub Pages link once deployed)
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- UI Framework: Bootstrap 5
- APIs Used:
- OpenWeatherMap Current Weather API
- OpenWeatherMap 5-Day / 3-Hour Forecast API
- OpenWeatherMap Air Pollution API
- 🔍 City Search: Search weather details by city name.
- 🌡️ Current Weather: Displays temperature, feels-like, humidity, pressure, and weather description.
- 📅 5-Day Forecast: Shows upcoming daily weather trends.
- 🕓 Today’s Hourly Forecast: Displays temperature variation throughout the day.
- 💨 Air Quality Metrics: Displays CO, NO₂, SO₂, and O₃ levels using the Air Pollution API.
- 🌅 Sunrise & Sunset Times: Converts UNIX timestamps into readable local times.
- 📱 Responsive UI: Designed with Bootstrap Grid and CSS Flexbox for all screen sizes.
- ⚡ No Frameworks: 100% vanilla JavaScript — no external JS libraries.
- User enters a city name in the input field.
- JavaScript
fetch()calls the Current Weather API to get weather data. - Extracts the coordinates (
lat,lon) from the response. - Uses those coordinates to fetch:
- The 5-day forecast (
/data/2.5/forecast) - The air pollution data (
/data/2.5/air_pollution)
- The 5-day forecast (
- Updates the DOM dynamically using native JavaScript.
- Displays data with weather icons, forecasts, and AQI readings.
- REST API integration using
fetch()andasync/await - JSON data parsing and UI rendering
- Dynamic DOM manipulation
- Date/time formatting using JavaScript
Datemethods - Error handling for invalid or empty inputs
- Responsive design and layout with Bootstrap 5
- Clone this repository
git clone https://github.com/yourusername/weather-forecast-app.git