Weathora is a modern weather app built with React, TypeScript, TailwindCSS, Shadcn UI, and Leaflet, integrating the OpenWeather API and MapTiler for interactive maps. It provides current weather, 3-hourly forecast, daily forecast, and air quality information.
Supports dark mode, light mode, desktop and mobile views, and geolocation-based fetching.
- Fetch current weather, 3-hourly forecast, and 5-day forecast in °F using OpenWeather API.
- Detects your location via browser geolocation.
- Displays interactive maps using Leaflet and MapTiler with dark/light tile layers.
- Air quality index integration.
- Fully responsive design for desktop and mobile.
- Dark mode / Light mode toggle.
- Modern UI components using TailwindCSS + Shadcn UI.
- Type-safe API fetching using Zod.
- Frontend: React, TypeScript, TailwindCSS, Shadcn UI, Lucide React icons
- Maps: Leaflet, MapTiler
- API: OpenWeather 2.5 (current, forecast, air pollution), Geocoding API
- State & Fetching: React Query
- Utilities: clsx, class-variance-authority, tailwind-merge, Zod
src/
├── api/ # API calls (weather, forecast, air quality, geocode)
├── components/ # UI components (cards, dropdowns, header, map, sidebar)
├── context/ # Theme context & provider
├── hooks/ # Custom hooks (useTheme)
├── config/ # Config data
├── assets/ # Images, icons, constants
├── lib/ # Utility functions
└── schemas/ # API response validation using Zod
| Desktop View Light Mode | Desktop View Dark Mode |
|---|---|
![]() |
![]() |
| Mobile View Light Mode | Mobile View Dark Mode |
|---|---|
![]() |
![]() |
Screenshots show the app on desktop and mobile, with both dark and light themes active.
git clone https://github.com/grep-many/weathora.git
cd weathoranpm installCreate a .env file in the root:
VITE_OPENWEATHER_API_KEY=your_openweather_api_key
VITE_MAPTILER_KEY=your_maptiler_keynpm run devOpen http://localhost:5173/weathora in your browser.
- Toggle between dark and light themes using the switch in the header.
- The map displays your current location, using browser geolocation.
- Click on locations on the map to fetch their weather and air quality data.
- Scroll through the 3-hourly forecast and daily forecast cards.
src/api/weather/current.ts→ Fetch current weather bylat/lon.src/api/weather/forecast.ts→ Fetch 5-day 3-hourly forecast.src/api/airQuality.ts→ Fetch air pollution index bylat/lon.src/api/geoCode.ts→ Fetch location names to array oflat/lon.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build production bundle |
npm run preview |
Preview production build |
npm run lint |
Lint project with ESLint |
npm run prettier:check |
Check code formatting |
npm run prettier:write |
Format code automatically |
- Temperatures are displayed in °F (imperial units).
- Map uses dark tile layer when in dark mode.
- Initial location detection uses
navigator.geolocation. - Fully responsive with mobile-first TailwindCSS design.
This project is licensed under the MIT License © 2025 grep-many.



