Skip to content

DARSHAN-R29/Weather-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Weather-App

🌦 Weather Application

A responsive and user-friendly Weather Application built using HTML, CSS, and JavaScript that provides real-time weather information, 5-day forecast, current location weather, and dark/light mode using public APIs.

πŸš€ Features

πŸ” Search weather by city name

πŸ“ Get current location weather using browser geolocation

🌑 View current temperature, wind speed, and conditions

🌀 Weather icons based on real-time conditions

πŸŒ™ Dark / Light mode toggle with theme persistence

⚑ Fast and lightweight (no API key required)

πŸ›  Tech Stack

HTML5 – Structure

CSS3 – Styling & responsive layout

JavaScript (ES6) – Logic & API handling

Open-Meteo API – Weather & forecast data

Geolocation API – Current location detection

πŸ“‚ Project Structure weather-app/ β”‚ β”œβ”€β”€ index.html β”œβ”€β”€ style.css β”œβ”€β”€ script.js └── README.md

πŸ“Έ Screenshots

(Optional: Add screenshots here later)

Example:

/screenshots/home.png /screenshots/dark-mode.png /screenshots/forecast.png

βš™οΈ How It Works

User enters a city name or clicks Use My Location

App converts city β†’ latitude & longitude (Geocoding API)

Weather data is fetched using Open-Meteo API

UI updates dynamically with:

Current weather

Weather icons

Theme preference is saved using localStorage

▢️ How to Run the Project Option 1: Open Directly

Download or clone the repository

Open index.html in your browser

Option 2: Live Server (Recommended)

Open project in VS Code

Install Live Server extension

Right-click index.html β†’ Open with Live Server

🌍 API Used

Open-Meteo Weather API

Free & open-source

No API key required

Provides current weather and forecast data

πŸ’‘ Future Enhancements

⏳ Loading animation

πŸ“± Mobile-first UI improvements

🎞 Animated weather icons

🧭 Air quality index

πŸ“Š Hourly forecast

🧠 What I Learned

Working with public REST APIs

Handling asynchronous JavaScript (Fetch API)

DOM manipulation and dynamic UI updates

Implementing dark/light mode

Using browser geolocation

Error handling and debugging

πŸ‘€ Author

Darshan R

LinkedIn: (https://www.linkedin.com/in/darshanr29/)

⭐ Acknowledgements

Open-Meteo API

Public APIs GitHub Repository

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published