A modern Weather App built with Jetpack Compose, following Clean Architecture principles. The app fetches real-time weather data using the OpenWeatherMap API and displays current weather conditions, a 5-day forecast, and allows users to switch between Celsius and Fahrenheit.
- 🌤 Search for Cities: Find weather updates for any city.
- 🌡 Current Weather: Displays temperature, weather condition, humidity, wind speed, pressure and weather icon.
- 📅 5-Day Forecast: View upcoming weather conditions.
- 🔄 Temperature Unit Toggle: Switch between Celsius and Fahrenheit.
- 🌓 Dark Mode: Supports light and dark themes.
- ❌ Error Handling: Graceful handling of API failures.
- 🌍 Map View: Visualize the city’s location on a map (Bonus feature).
- 📶 Offline Caching: Stores weather data for offline access (Bonus feature).
- 🌓 Dark Mode Toggle: Allow users to manually switch between light and dark themes.
- UI: Jetpack Compose (Material 3, Compose Navigation)
- Architecture: MVI + Clean Architecture
- Networking: Retrofit + Moshi (KSP for JSON parsing)
- Concurrency: Kotlin Coroutines + Flow
- Dependency Injection: Hilt
- Testing:
- Unit Tests (ViewModel, Repository)
- UI Tests (Compose Testing)
- Mockk for mocking dependencies
app
- Main module containing UI and navigation.designsystem
- Contains custom theming and reusable UI components.
- UI (Compose) - Displays weather data.
- ViewModel - Fetches weather data and handles state.
- Repository - Manages API and caching logic.
- Data Source - Fetches data from OpenWeatherMap API using
Retrofit
.
The API key is stored securely using C++ (JNI):