Skip to content

About

"A real-time weather web application demonstrating API integration and responsive UI design. Features include city search, dynamic background changes based on weather, and detailed metrics like humidity , Visibility , wind speed , Pressure , Sunrise , sunset etc "

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🌤️ AtmosVision — Weather Intelligence App

A professional-grade, full-featured weather web application built with Next.js 14+, Tailwind CSS, and WeatherAPI.com.

✨ Features

Core Weather Data

  • 🌡️ Current temperature, feels-like, dew point
  • 💧 Humidity with visual indicator
  • 💨 Wind speed, direction, compass visualization
  • 👁️ Visibility with quality description
  • 🌡️ Atmospheric pressure (hPa/inHg/mmHg)
  • ☁️ Cloud cover percentage
  • 🌅 Sunrise/Sunset times
  • 🌙 Moon phase with emoji indicators
  • ☀️ UV Index with gauge visualization

Forecasts

  • ⏱️ 24-Hour Forecast — 3-hour intervals with chart
  • 📅 7-Day Forecast — High/low temps, rain chance, moon phase
  • 📊 Interactive Charts — Recharts-powered temperature & precipitation

Details & Analysis

  • 🌬️ Wind Compass — Real-time directional visualization
  • 💨 Air Quality Index — PM2.5, PM10, O₃, NO₂, SO₂, CO breakdown
  • 🌡️ Pressure Trends — With unit conversion
  • 🌫️ Visibility Analysis — Quality descriptions
  • ☁️ Cloud Cover — Visual cloud representation

Location Management

  • 🔍 City Search — Auto-suggest with debounce
  • 📍 Geolocation — Browser-based current location
  • ⭐ Favorites — Save up to 10 locations (localStorage)
  • 🕐 Recent Searches — Last 5 searches remembered

UX & Preferences

  • 🌡️ Temperature: °C / °F
  • 💨 Wind: km/h / mph / m/s
  • 🌡️ Pressure: hPa / inHg / mmHg
  • 📏 Distance: km / miles
  • ⚠️ Weather Alerts panel
  • 🔄 Manual refresh button
  • 💀 Beautiful loading skeletons

🚀 Quick Start

1. Clone and Install

cd weather-app
npm install

2. Get Your FREE API Key

Go to weatherapi.com and sign up for a free account.

  • Free tier: 1,000,000 calls/month
  • Includes: Current weather, 3-day forecast, search, astronomy

For more forecast days (up to 14) and Air Quality, the free tier works fine.

Optional: For standalone AQI data, also get a free key from openweathermap.org

3. Configure Environment

cp .env.local.example .env.local

Edit .env.local:

WEATHERAPI_KEY=your_actual_key_here
OPENWEATHER_API_KEY=your_openweather_key_here  # Optional

4. Run Development Server

npm run dev

Open http://localhost:3000

📁 Project Structure

weather-app/
├── app/
│   ├── api/
│   │   ├── weather/route.ts     # Main weather data endpoint
│   │   ├── search/route.ts      # Location search endpoint
│   │   └── aqi/route.ts         # Air quality endpoint
│   ├── city/[city]/page.tsx     # Dynamic city weather page
│   ├── layout.tsx               # Root layout with providers
│   ├── page.tsx                 # Home/landing page
│   └── globals.css              # Global styles
├── components/
│   └── weather/
│       ├── Navbar.tsx           # Navigation with search
│       ├── SearchBar.tsx        # Search with autocomplete
│       ├── CurrentWeather.tsx   # Main weather hero card
│       ├── HourlyForecast.tsx   # 24-hour forecast + chart
│       ├── DailyForecast.tsx    # 7-day forecast + chart
│       ├── WeatherDetails.tsx   # Wind compass, AQI, humidity, etc.
│       ├── WeatherAlerts.tsx    # Severe weather alerts
│       ├── SettingsPanel.tsx    # Unit preferences modal
│       └── LoadingSkeleton.tsx  # Loading state UI
├── context/
│   └── WeatherContext.tsx       # Global state (preferences, favorites)
├── lib/
│   ├── weatherApi.ts            # API fetching functions
│   └── utils.ts                 # Unit conversion utilities
├── types/
│   └── weather.ts               # TypeScript interfaces
└── public/
    └── manifest.json            # PWA manifest

🛠️ Tech Stack

Technology Purpose
Next.js 14 Framework (App Router)
TypeScript Type safety
Tailwind CSS Styling
Recharts Charts & visualizations
Lucide React Icons
Framer Motion Animations
React Hot Toast Notifications
WeatherAPI.com Weather data

🎨 Design

  • Dark glassmorphism aesthetic with backdrop blur effects
  • Syne display font + DM Sans body font
  • Animated gradients and noise texture overlays
  • Custom weather icons from WeatherAPI CDN
  • Fully responsive mobile-first design

🌐 API Routes

Route Description
GET /api/weather?q=London&days=7 Fetch weather + forecast
GET /api/search?q=Lon Search locations
GET /api/aqi?lat=51.5&lon=-0.12 Air quality data

📦 Build for Production

npm run build
npm start

🔧 Extending the App

Add More Cities to Quick Access

Edit FEATURED_CITIES in app/page.tsx

Customize Theme Colors

Edit the color tokens in tailwind.config.js

Add Weather Maps

Integrate OpenWeatherMap Tiles or Windy API

Enable Push Notifications

Use Next.js PWA libraries like next-pwa and the Web Push API


Built with ❤️ using Next.js 14 + WeatherAPI.com

About

"A real-time weather web application demonstrating API integration and responsive UI design. Features include city search, dynamic background changes based on weather, and detailed metrics like humidity , Visibility , wind speed , Pressure , Sunrise , sunset etc "

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages