An open API service indexing awesome lists of open source software.

https://github.com/pvm-harshavardhan/weather-app

A modern, responsive weather app that provides real-time weather and air quality information for any city worldwide, featuring a clean UI, search history, and instant unit toggling built with HTML, Tailwind CSS, and JavaScript.
https://github.com/pvm-harshavardhan/weather-app

api css3 es6 frontend-web html5 javascript postman-testing rest-api restful-api smooth-animations tailwind-css ui web-development web-project wheather-app

Last synced: about 1 month ago
JSON representation

A modern, responsive weather app that provides real-time weather and air quality information for any city worldwide, featuring a clean UI, search history, and instant unit toggling built with HTML, Tailwind CSS, and JavaScript.

Awesome Lists containing this project

README

          

# โ›… Beautiful Weather App

A modern, responsive weather app built with HTML, Tailwind CSS, and TypeScript. It instantly fetches real-time weather, air quality, and more for any city worldwide, featuring a beautiful blue-gradient glassmorphism UI with smooth animations, interactive search history, and a seamless user experience.

![App Screenshot](./project_screenshot.png)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![HTML5](https://img.shields.io/badge/HTML5-E34F26?logo=html5&logoColor=white)](https://developer.mozilla.org/en-US/docs/Web/HTML)
[![CSS3](https://img.shields.io/badge/CSS3-1572B6?logo=css&logoColor=white)](https://developer.mozilla.org/en-US/docs/Web/CSS)
[![TypeScript](https://img.shields.io/badge/TypeScript-2e74bf?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-38B2AC?logo=tailwindcss&logoColor=white)](https://tailwindcss.com/)
![API](https://img.shields.io/badge/API-WeatherAPI-4CAF50?logo=actix)
[![Font Awesome](https://img.shields.io/badge/Font_Awesome-538dd7?logo=fontawesome&logoColor=white)](https://fontawesome.com/)
[![Git](https://img.shields.io/badge/Git-F05032?logo=git&logoColor=white)](https://git-scm.com/)
[![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white)](https://github.com/)
[![GitHub Pages](https://img.shields.io/badge/GitHub-Pages-181717?logo=github&logoColor=white)](https://github.com/)

---

## โœจ Features

- **๐ŸŒ Global Read-Time Weather**: Get current weather, temperature, humidity, wind, pressure, and visibility for any city worldwide
- **๐Ÿ•‘ Local Time**: Displays local date and time for the selected city
- **๐Ÿ’ง Weather Details**: Humidity, wind speed, visibility, and pressure
- **๐Ÿƒ Air Quality Index**: Live AQI with color-coded backgrounds and health labels
- **๐Ÿ•‘ Search History**: Quick access to your recent city searches dropdown and easy removal.
- **๐ŸŽจ Modern UI**: Elegant, glassy UI with animated transitions, glassmorphism, gradients, and smooth animations
- **๐Ÿ“ฑ Fully Responsive**: Works beautifully on desktop, tablet, and mobile
- **๐Ÿ”„ Unit Toggle:** Instantly switch between Celsius and Fahrenheit.
- **โšก Fast & Lightweight**: No frameworks or build tools requiredโ€”just open and use! Minimal dependencies, instant results
- **๐Ÿ•˜ Loading & Error Handling**: Animated loading spinner, dismissible error popups, and friendly error messages for invalid cities

## ๐ŸŽฎ Usage Guide

### Basic Controls

- **Search**: Enter a city name and click the search button or press Enter
- **Toggle Units**: Click the ยฐC/ยฐF button to switch temperature units
- **View History**: Click the History button to see recent searches
- **Select from History**: Click a city in the dropdown to reload its weather
- **Remove from History**: Click the ร— next to a city to remove it from history

### Error Handling
- If a city is not found, a friendly error popup will appear
- Click the close (ร—) button to dismiss error messages

## ๐Ÿ”ง Tech Stack

### **Technologies Used**
- **HTML5**: Semantic markup
- **Tailwind CSS**: Utility-first CSS framework via CDN
- **TypeScript**: Type-safe JavaScript for robust code
- **Font Awesome**: Icon library via CDN
- **WeatherAPI.com**: Real-time weather and air quality data
- **Git** โ€“ Version control
- **GitHub** โ€“ Code hosting and collaboration

## ๐Ÿ› ๏ธ Getting Started

1. **Clone the repository:**
```bash
git clone https://github.com/pvm-harshavardhan/weather-app.git
```
2. **Change to the project directory:**
```bash
cd weather-app
```
3. **Compile TypeScript File:**
```bash
tsc script.ts
```
4. **Open the app:**
- Open `index.html` in your web browser.
5. **Start searching for weather!** โ›…

_No build step or server required!_

## ๐Ÿ“ Project Structure

```
weather-app/
โ”œโ”€โ”€ ๐Ÿ“„ index.html # Main HTML file with Tailwind CDN
โ”œโ”€โ”€ โšก script.ts # TypeScript logic for weather, UI, and history
โ”œโ”€โ”€ โšก script.js # Compiled JavaScript output
โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ favlogo.png # App favicon
```

## ๐Ÿ“ฑ Browser Compatibility

- โœ… Chrome (recommended)
- โœ… Firefox
- โœ… Safari
- โœ… Edge
- โš ๏ธ Internet Explorer (limited support)

## ๐Ÿ› Troubleshooting

### **Weather Not Loading?**
1. Check your internet connection
2. Ensure WeatherAPI key is valid and not rate-limited
3. Check browser console for errors
4. Verify file paths in the code

### **Styling Issues?**
1. Make sure Tailwind CSS CDN is accessible
2. Clear browser cache

### **Mobile Issues?**
1. The app is fully responsive
2. Touch controls work on mobile devices
3. Some mobile browsers may restrict auto-focus or popups

---

## ๐Ÿ–ผ๏ธ Customization & Screenshots

- Replace `favlogo.png` with your own logo if desired
- Add screenshots or GIFs to highlight features and UI
- Update colors and styles in Tailwind config or HTML classes

---

## ๐ŸŒ Deployment

Deploy your Weather App easily using **GitHub Pages**, **Netlify**, or **Vercel** for free.

---

## ๐Ÿค Contributing

Contributions are welcome!
Feel free to open issues or submit pull requests to improve the app.

---

## ๐Ÿ“„ License

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ“ž Contact

Your Name - [@pvm_harsha](https://x.com/pvm_harsha)
Project Link: [Weather App Web Project](https://github.com/pvm-harshavardhan/weather-app)

---

**Made with โค๏ธ by [Your Name]**

**Enjoy the weather! โ›…๐ŸŒฆ๏ธ๐ŸŒˆ**