A modern weather forecasting web app built with React + TypeScript, providing real-time weather data, hourly forecasts, and multi-day forecasts with a clean UI.
🔗 Live Demo: 👉 https://auysh8.github.io/weather-app/
- 🌍 Search weather by city
- 📍 Automatic location detection (via browser geolocation)
- 🕒 Hourly forecast
- 📆 Multi-day forecast
- ⭐ Bookmark cities (saved in localStorage)
- 🎞️ Smooth animations using Framer Motion
- ⚡ Fast builds with Vite
- 🧭 GitHub Pages deployment
- Frontend: React, TypeScript
- Build Tool: Vite
- Routing: React Router (HashRouter for GitHub Pages)
- Animations: Framer Motion
- API: OpenWeatherMap API
- Hosting: GitHub Pages
git clone https://github.com/auysh8/weather-app.git
cd weather-appnpm installCreate a .env file in the root directory:
VITE_OPENWEATHER_API_KEY=your_api_key_hereYou can get a free API key from: https://openweathermap.org/api
npm run devThe app will be available at:
http://localhost:5173
This project is deployed using the gh-pages branch.
npm run deployMake sure:
-
vite.config.tscontains:base: "/weather-app/" -
GitHub Pages settings are:
- Branch:
gh-pages - Folder:
/ (root)
- Branch:
- Proper TypeScript typing for API responses
- Handling
neverandunknownsafely - Client-side routing on static hosting
- GitHub Pages deployment workflow
- Structuring a real-world React project
This project is open source and available under the MIT License.

