Skip to content

aarushisaki/Weather-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Weather Today – JavaScript Weather App

A clean and responsive weather application built using HTML, CSS, and JavaScript that fetches real-time weather data using the OpenWeatherMap API. The app allows users to search for any city and instantly view current weather conditions with a modern UI.


Features

  • Real-time weather data using OpenWeatherMap API
  • Search weather by city name
  • Displays:
    • Temperature (°C)
    • Weather condition with icon
    • Humidity
    • Wind speed
  • Keyboard support (press Enter to search)
  • Error handling for invalid city names
  • Responsive and modern UI design
  • Clean and readable code structure

Tech Stack

  • HTML5
  • CSS3
  • JavaScript (ES6+)
  • OpenWeatherMap API

Project Structure

weather-app/

├── index.html

├── style.css

├── weather.js

└── README.md


How It Works

  1. User enters a city name in the search bar
  2. JavaScript sends a request to the OpenWeatherMap API
  3. API responds with real-time weather data in JSON format
  4. Data is parsed and displayed dynamically on the UI
  5. Weather icons are rendered based on API response

Getting Started

Clone the repository

git clone https://github.com/your-username/weather-app.git

Navigate to the project directory

cd weather-app

Run the project

Open index.html directly in your browser or use a local development server.


API Configuration

This project uses the OpenWeatherMap API.

  1. Sign up at https://openweathermap.org/api
  2. Generate a free API key
  3. Replace the API key in weather.js:

const apiKey = "YOUR_API_KEY_HERE";

Note: API keys may take a few minutes to activate after creation.


Example Cities to Test

  • Delhi
  • Mumbai
  • London
  • New York

Future Enhancements

  • Animated weather backgrounds
  • Day/Night theme based on timezone
  • 7-day weather forecast
  • Location-based weather using Geolocation API

License

This project is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors