Skip to content

ericwafula/WeatherApp

Repository files navigation

WeatherApp

WeatherApp is a modern Android weather application built with Jetpack Compose and a Clean Architecture foundation. It features an offline-first approach, scalable modular design, and adheres to best software engineering principles like SOLID and separation of concerns. The project leverages Gradle convention plugins and CI/CD for consistent quality checks and builds.

Build Status
License: MIT


Table of Contents


Tech Stack

  • Kotlin — Primary language
  • Jetpack Compose — UI toolkit
  • Room — Local data persistence
  • Ktor Client — Networking layer
  • Koin — Dependency Injection
  • Coroutines & Flow — Asynchronous and reactive programming
  • Material 3 — UI Components
  • Location Services — Geolocation support
  • Timber — Structured logging
  • Firebase Analytics & Crashlytics — Monitoring and crash reporting

Features

  • Fetch and display weather data by city or geolocation
  • Offline-first support using Room
  • Integrated location permission handling
  • Built with scalable, maintainable architecture
  • Material 3 theming & custom design system
  • Secure token & config management
  • Gradle build-logic with convention plugins

Architecture & Modularization

The project is based on Clean Architecture principles and modularized into the following layers:

Modules

  • :app — App-specific implementation (UI, DI, ViewModels, screens)
  • :core:domain — interfaces, and models
  • :core:ui — Shared UI elements and utilities
  • :core:designsystem — Custom theme, typography, spacing, and components

Offline-First Approach

The app prioritizes cached data. When a user opens the app:

  1. Local Room DB is queried for the latest weather data
  2. A background fetch from the API updates the cache
  3. UI displays cached data instantly, improving UX on poor networks

This model ensures better responsiveness and offline support.


Code Quality

  • SOLID Principles enforced throughout architecture
  • Gradle Convention Plugins for consistent module configuration
  • CI/CD Pipeline for lint checks & build verification (pull requests → dev branch)
  • Ktlint for Kotlin code style enforcement

Screenshots

Weather Screen Location Prompt Search City Keyboard Search

Getting Started

Prerequisites

  • Android Studio Hedgehog or newer
  • local.properties or .env setup with:
  • Note: The city API is currently not in use yet but you can add some dummy api key

Installation

git clone https://github.com/ericwafula/WeatherApp.git
cd WeatherApp

License

This project is licensed under the MIT License.

About

WeatherApp is a modern, offline-first weather application designed to provide a seamless and reliable user experience, even in low-connectivity environments. Built entirely with Kotlin and Jetpack Compose, following Clean Architecture principles to ensure modularity, scalability, and testability.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages