Skip to content

sunjay-dev/weather-website

Repository files navigation

Weather Web App 🌦️

A lightning-fast, modern weather web application built with Next.js. It allows users to search for the weather of any city or detect their exact coordinates to fetch real-time weather data.

Features

  • Search by City – Enter a city name to get live weather updates with strict regex validation.
  • Detect Location – Automatically fetch weather data for your current latitude/longitude via the Geolocation API.
  • Recent Searches – Automatically saves your successful searches locally for quick, one-click access.
  • Responsive UI – Built with Tailwind CSS for a modern, mobile-friendly experience.
  • Weather Details – Includes temperature, rain probability, humidity, hourly data, and a 3-day forecast.

Technologies Used

Next.js Tailwind CSS Lucide React React Hot Toast RapidAPI

Installation

  1. Clone the repository:
git clone https://github.com/sunjay-dev/weather-website.git
cd weather-website
  1. Install dependencies (using pnpm):
pnpm install
  1. Set up your .env.local file at the root of your project:

Note: You can get your free API key directly from RapidAPI / WeatherAPI.com.

RAPID_API_KEY=your_weatherapi_key_here
  1. Start the server:
pnpm dev

License

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

About

A simple weather web app that provides real-time weather updates for any city or your current location using GPS.

Topics

Resources

License

Stars

Watchers

Forks

Contributors