A modern Android Weather application built using Kotlin, Jetpack Compose, MVVM, Clean Architecture, Hilt, Room, Retrofit, and WorkManager. The application provides current weather, hourly and weekly forecasts, offline-first data access, intelligent cache management, and background weather notifications.
- 🌤 Current Weather
- 🔍 Search Weather by City
- 🕒 Hourly Forecast
- 📅 7-Day Weather Forecast
- 💾 Offline-First Cache (Room Database)
- 🔄 Pull to Refresh
- ⚡ Smart TTL Cache Refresh
- 🔔 Background Weather Sync (WorkManager)
- ⚠ Severe Weather Notifications
- 🚨 Dynamic Weather Alert Card
- 🎨 Modern Material 3 UI
- 🌙 Dynamic Weather Icons
The project follows Clean Architecture with the MVVM pattern.
Presentation (Compose UI)
│
▼
ViewModel
│
▼
Use Cases
│
▼
Repository
┌──────────────┐
▼ ▼
Room Database Retrofit API
- Kotlin
- Jetpack Compose
- MVVM
- Clean Architecture
- Hilt
- Retrofit
- Room
- Coroutines
- Flow
- WorkManager
- Coil
- Material 3
app
├── core
├── data
├── domain
├── di
└── presentation
This project uses WeatherAPI.
- Clone the repository.
- Open the project in Android Studio.
- Add your WeatherAPI key to
local.properties:
WEATHER_API_KEY=YOUR_API_KEY- Sync the project.
- Build and run the application.
The application implements a Time-To-Live (TTL) caching strategy.
- Uses Room as the single source of truth.
- Refreshes data only when the cache expires.
- Reduces unnecessary API requests.
- Improves performance and supports offline usage.
- Periodic background refresh using WorkManager.
- Detects severe weather conditions.
- Displays weather notifications for rain, storms, snow, and extreme heat.
Repository business logic is covered using:
- JUnit
- Mockito
- Coroutines Test
- Current Location Support
- Favorite Cities
- UI Testing
- Widget Support
- Weather Radar
- Wear OS Support
Manojkumar P










