A modern, offline-first Android weather application built with Kotlin, Jetpack Compose, and Clean Architecture.
You can download the latest version of the app from the Releases section of this repository.
- Go to the Releases page.
- Download the
app-release.apk(or similar) from the latest release. - Install the APK on your Android device.
- Current Weather: Get real-time weather information for your current location or any city in the world.
- Detailed Forecasts: View hourly and daily forecasts with temperature, humidity, wind speed, and more.
- City Search: Search for any city worldwide using geocoding.
- Offline Support: Weather data is cached locally using Room, allowing you to view information even when offline.
- Favorites: Mark cities as favorites for quick access.
- Dynamic UI: Clean and responsive user interface built entirely with Jetpack Compose.
- Background Updates: Uses WorkManager to keep weather data fresh in the background.
- Language: Kotlin
- UI: Jetpack Compose
- Architecture: MVVM (Model-View-ViewModel) with Clean Architecture principles.
- Dependency Injection: Hilt
- Networking: Retrofit & OkHttp
- Local Database: Room
- Asynchronous Programming: Coroutines & Flow
- Navigation: Navigation Compose
- Background Processing: WorkManager
- JSON Serialization: Kotlinx Serialization
- Testing: JUnit, Mockito, Turbine, and Robolectric.
The project follows a modular Clean Architecture approach:
core: Contains shared components like network monitors and base classes.data: Handles data operations, including API calls (Retrofit), local database management (Room), and data mapping.domain: Contains business logic, use cases, and domain models (independent of framework).ui: UI layer containing Compose screens, ViewModels, and UI state management.di: Dependency injection modules.worker: Background tasks using WorkManager.
- Clone the repository:
git clone https://github.com/techsultan/weather-app.git
- Open the project in Android Studio (Ladybug or newer recommended).
- Get an API Key: Sign up at OpenWeatherMap to get a free API key.
- Configure the API Key: Add your API key and base url in the appropriate place (in
local.propertiesfile or directly in the code for development). - Run the app on an emulator or a physical device.
The project includes unit tests for repositories, viewmodels, and data mappers. To run the tests, use:
./gradlew testThis project is licensed under the MIT License - see the LICENSE file for details.

