π¦οΈ Weather App β JavaScript (Async/Await + Fetch API)
The Weather App is a simple but powerful project built to strengthen JavaScript fundamentals such as API calling, async/await, DOM manipulation, error handling, and event handling. It allows users to search for any city and view real-time weather details fetched from a public weather API.
π Features π€ 1. Real-Time Weather Data
Displays temperature, humidity, wind speed, weather condition, etc.
Fetches live data from an external API.
β‘ 2. Fetch API + Async/Await
Fully asynchronous API calls.
Clean and modern JavaScript async code.
π§ 3. Search Any City
User enters a city name.
App shows weather instantly.
π‘ 4. Proper Error Handling
Invalid city β shows an error message.
Handles network/API errors gracefully.
π¨ 5. Beautiful UI
Clean layout with icons and background colors.
Fully responsive.
π Folder Structure Weather-App/ β βββ css/ β βββ style.css β βββ js/ β βββ script.js β βββ images/ β βββ weather icons β βββ index.html βββ README.md
π οΈ Technologies Used
HTML5 β UI Structure
CSS3 β Styling & Responsive UI
JavaScript (Vanilla JS) β Fetch API, async/await, DOM updates
OpenWeather / Any Weather API
π What This Project Demonstrates (Important for Resume)
This project strengthened my JavaScript fundamentals, including:
β Async/Await β Promises & Fetch API β API Integration β Handling JSON Response β DOM Manipulation β Event Handling β Error Handling
This is why Weather App is considered one of the best beginner JavaScript projects β it touches almost all core concepts of JS used in real-world apps.
βοΈ How to Use
Clone the repository:
git clone https://github.com/your-username/weather-app.git
Open the folder:
cd weather-app
Start the app:
Simply open index.html in any browser or
Use VS Code β Open with Live Server
Enter your API key inside script.js:
const apiKey = "YOUR_API_KEY";
π₯οΈ Working
User enters a city name.
JavaScript calls the weather API using fetch() and async/await.
API sends a JSON response.
App extracts:
Temperature
Weather description
Wind speed
Humidity
Icon
All data is inserted into the DOM dynamically.
Here is how the Weather App looks:
π₯ Future Enhancements
Add a 5-day weather forecast
Add geo-location weather (auto detect current city)
Add dark/light mode
Save previous searches
