Skip to content

asadmukhtar28/WeatherApp

Repository files navigation

WeatherApp

A modern Android weather application built with Kotlin, following MVVM, Clean Architecture, and SOLID principles. This app fetches weather data based on the user's current location and provides a seamless user experience with robust architecture and automated testing.

Screenshot_1 Screenshot_2 Screenshot_3 Screenshot_4

Getting Started

Prerequisites

  • Android Studio Narwhal Feature Drop | 2025.1.2 Patch 1
  • JDK 11+
  • Internet connection for API calls

Installation

git clone https://github.com/asadmukhtar28/WeatherApp.git

  • Define the base URL of the Weather Forecast API with this name BASE_URL in local.properties.
  • Login and get api key from https://openweathermap.org/api, then paste it in local.properties with this name OPEN_WEATHER_API_KEY.

Project Structure

├── core        # Mapping interfaces
├── data        # Repository implementations, API data sources, and mappers
├── domain      # Business logic and use cases
├── ui          # UI components and ViewModels
├── di          # Dependency injection (Hilt) modules
├── utils       # Shared utility classes
└── test        # Unit tests

Features:

  • Fetch and display current weather information based on the user's location.
  • Show the weather forecast for each day in a beautiful card design, and show appropriate weather conditions and weather types.
  • Fully tested with unit tests for reliability.
  • CI/CD pipeline integrated for automated build and test checks.
  • Support RTL mode with the supported languages of English and Arabic.

Tech Stack

  • MVVM with Clean Architecture
  • SOLID Principles
  • Jetpack Compose, ViewModel
  • Kotlin Coroutines
  • Hilt for dependency injection
  • FusedLocationProvider API
  • JUnit, Mockk, Turbine for Unit Testing
  • Jacoco for test coverage
  • CI/CD by using GitHub actions.
  • Script to upload reports of unit test and Jacoco test coverage to the repository.

Test Coverage by Jacoco

Screenshot 2025-12-22 at 10 15 26 PM

Unit Test Report

Screenshot 2025-12-22 at 11 00 27 PM

👍 How to Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Connect with me

Medium LinkedIn Twitter

Releases

No releases published

Packages

 
 
 

Contributors

Languages