ποΈ Month 2: Project Phase | Week 3 Project
Welcome to Week 3 of your project journey in the Naman Digital Web Development Internship!
This week, weβre diving into APIs and asynchronous JavaScript by building a real-world app: a Weather App using OpenWeatherMap API.
π― Project Title: “Live Weather Web App using API”
π Objective:
Create a simple web application that allows users to search for any city and view the current weather information (temperature, condition, humidity, etc.) using data fetched from a live API.
This will strengthen your understanding of API integration, async/await, fetch(), and error handling in JavaScript.
π οΈ Tech Stack:
- HTML5
- CSS3
- JavaScript (Vanilla)
- OpenWeatherMap API (Free account required)
ποΈ Suggested Folder Structure:
weather-app/
β
βββ index.html
βββ css/
β βββ style.css
βββ js/
β βββ script.js
βββ assets/
βββ (icons, background images)
β Functional Requirements:
π City Search
- Input field to enter a city name
- Button to trigger the search
- Display weather info of the city searched
π¦οΈ Display Weather Data
- Temperature (Β°C)
- Weather condition (e.g., Sunny, Cloudy)
- Humidity (%)
- Wind Speed (km/h)
- Icon for weather condition
β οΈ Error Handling
- Show a message if the city is not found or API fails
π‘ Bonus Features (Optional for Extra Credit):
- Auto-detect userβs location using Geolocation API
- Show a 5-day forecast
- Add background image based on weather condition
- Store last searched city in
localStorage
πΌοΈ UI Tips:
- Use card-style layout
- Add weather icons from OpenWeatherMap or custom SVGs
- Use gradients and animations for better look
π§ͺ Sample API Call:
javascriptCopyEdithttps://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_API_KEY&units=metric
π€ Submission Instructions:
- Upload your project to GitHub or Google Drive
- Share the live project link and repo in the submission form provided in the Telegram group
π Deadline:
Submit this project by a Week
π Learning Outcomes:
- Using APIs and handling JSON data
- Writing asynchronous code with
fetch()
andasync/await
- Building dynamic content on the web
- Handling user input and errors
β Project Checklist:
Feature | Required |
---|---|
City-based weather search | β |
Weather data display | β |
Responsive layout | β |
API integration | β |
Error handling | β |
π Keep Pushing Forward!
This is your first step toward building real-time data-driven web apps. Next week, weβll build something even more powerfulβstay tuned!