CloudyCool is a premium weather app built with React + Vite + TypeScript.
It includes:
- Current weather by city search
- GPS and IP-based location detection
- Hourly forecast for today
- 5-day forecast
- AQI (air quality index) summary
- Light/dark theme toggle
- Dynamic weather-based atmospheric backgrounds
- Mobile-first glassmorphism UI
- Installable PWA support (Android prompt + iOS Add to Home Screen guidance)
- React 18
- Vite 5
- TypeScript
- Tailwind CSS
- shadcn/ui (Radix UI primitives)
- TanStack Query
- Vitest
- vite-plugin-pwa + Workbox
- Node.js 18+ (or newer LTS)
- npm (or Bun, since lockfiles for both are present)
npm install
npm run devDefault local URL:
http://localhost:8080/cloudycool/
npm run dev- Start development servernpm run build- Build for productionnpm run build:dev- Build using development modenpm run preview- Preview the production build locallynpm run lint- Run ESLintnpm run test- Run tests once (Vitest)npm run test:watch- Run tests in watch mode
- Source branch:
main - Hosting: GitHub Pages
- Live URL:
https://shoyshai.github.io/cloudycool/ - Base path:
/cloudycool/ - Deployment runs automatically via GitHub Actions (
.github/workflows/deploy.yml)
CloudyCool is configured as an installable PWA.
- Manifest generated at
/cloudycool/manifest.webmanifest - Service worker generated by
vite-plugin-pwa - Icons:
public/pwa-192x192.pngpublic/pwa-512x512.pngpublic/pwa-maskable-512x512.pngpublic/apple-touch-icon.png
- Install behavior:
- Android/Chrome: shows install prompt when eligible
- iOS/Safari: uses Share > Add to Home Screen guidance
Caching strategy:
- Static app shell/assets are precached
- OpenWeather API requests use
NetworkOnlyto keep weather data fresh
src/
components/ Reusable UI and feature components
hooks/ App hooks (weather, theme, etc.)
lib/ Utilities and weather background helpers
pages/ Route pages
test/ Test setup and examples
The app currently integrates:
- OpenWeatherMap APIs (weather, forecast, AQI)
- OpenStreetMap Nominatim reverse geocoding
- ipapi.co for IP-based fallback location
src/hooks/useWeather.ts currently contains a hardcoded OpenWeatherMap API key.
For production, move this to an environment variable (for example VITE_OPENWEATHER_API_KEY) and read it via import.meta.env.
Routes are defined in src/App.tsx:
/-> main weather page*-> not found page
BrowserRouter uses basename={import.meta.env.BASE_URL} for GitHub Pages compatibility.