Skip to content

About

๐ŸŒฆ๏ธ Weather Forecast Web AppA simple responsive weather app that displays real-time weather data for any city using a public API. Built with HTML, CSS, and JavaScript, it's perfect for learning API integration and front-end development.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

ย 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒฆ๏ธ Weather Forecast Web App

This is an interactive Weather Forecast Web Application that allows users to search for a city and retrieve real-time weather updates. The application features an interactive map with a satellite view option, automatic geolocation-based weather fetching, and a dark/light mode toggle for better user experience.

๐Ÿ“‚ Project Structure

๐Ÿ”น index.html Contains the main structure of the web app, including search functionality, weather details, an interactive map, and UI elements.

Uses Leaflet.js for map integration and supports both standard and satellite views.

๐Ÿ”น style.css Defines the styles for the entire web app, including layouts, colors, and animations.

Implements a responsive design, ensuring a seamless experience on desktops and mobile devices.

Includes support for light mode and dark mode themes.

๐Ÿ”น script.js Manages all interactive elements, including:

Fetching real-time weather data from wttr.in API.

Updating the weather UI dynamically based on user input.

Handling user location detection via the Geolocation API.

Integrating Leaflet.js for an interactive weather map.

Enabling users to switch between default and satellite map views.

Implementing theme toggles and sidebar animations.

๐Ÿš€ Features

โœ”๏ธ Search for Any City - Enter a location to retrieve real-time weather details.

โœ”๏ธ Real-Time Weather Updates - Displays temperature, humidity, wind speed, UV index, and pressure.

โœ”๏ธ Location Detection - Automatically fetches weather based on the user's location.

โœ”๏ธ Manual location search - added manual location searching for better experience and suggestions

โœ”๏ธ Interactive Map - Uses Leaflet.js for a dynamic map with zoom controls.

โœ”๏ธ Satellite & Default Map Views - merged together for better visuals

โœ”๏ธ Dark/Light Mode - automatic themes for better visual comfort.

โœ”๏ธ Error Handling - Displays messages if the city is not found or data is unavailable.

โœ”๏ธ Responsive UI - Works smoothly on desktops, tablets, and mobile devices.

๐ŸŽฏ How to Use

1.Clone the repository:

bash git clone https://github.com/Sensui-moksha/weather-forecast.git cd weather-forecast-app

2.Open index.html in your browser.

3.Enter a city name in the search box and click the search button.

4.View real-time weather data, including temperature, humidity, wind speed, and more.

5.Use the map to locate the searched city and toggle between different views.

6.Switch between dark mode and light mode as per your preference.

๐Ÿ”ง Technologies Used

HTML5 - Structure of the web app.

CSS3 - Styling and responsive design.

JavaScript (ES6) - Interactive elements and API integration.

Leaflet.js - Interactive mapping functionality.

wttr.in API - Fetching real-time weather data.

๐Ÿ“Œ Future Enhancements

๐Ÿ”น Add a 7-day weather forecast feature.

๐Ÿ”น Implement a graphical representation of weather trends.

๐Ÿ”น Integrate more weather APIs for enhanced accuracy.

๐Ÿ”น Allow users to save favorite locations for quick access.

๐ŸŽฏ Live Demo

๐Ÿš€ Try it Live Here (https://sensui-moksha.github.io/Weather-Forecast/)

๐Ÿ“œ License

This project is licensed under the MIT License โ€“ you are free to use, modify, and distribute it.

About

๐ŸŒฆ๏ธ Weather Forecast Web AppA simple responsive weather app that displays real-time weather data for any city using a public API. Built with HTML, CSS, and JavaScript, it's perfect for learning API integration and front-end development.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages