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.
- 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.
- Clone the repository:
git clone https://github.com/sunjay-dev/weather-website.git
cd weather-website- Install dependencies (using pnpm):
pnpm install- 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- Start the server:
pnpm devThis project is open-source and available under the MIT License.