π¦ 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
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