Skip to content

mohamedebrahim96/DVT-WeatherApp

Repository files navigation

DVT Weather App

License API Build Status
Kotlin Compose Profile

🌤️ DVT Weather App demonstrates modern Android development with Jetpack Compose, Hilt, Coroutines, Flow, and Clean Architecture.

Note

This project is a submission for the Android Mobile Assessment. It adheres to strict guidelines: No AI generation for code, usage of native Custom UI Widgets, and modern architectural patterns.

App Screenshot

⬇️ Download

Go to the Releases to download the latest APK.

🛠️ Tech Stack & Open-source Libraries

This project utilizes a modern Android tech stack focused on scalability, testability, and performance.

  • Minimum SDK level: 24
  • Language: Kotlin (100% Native)
  • UI Framework: Jetpack Compose - Modern toolkit for building native UI.
  • Asynchronous: Coroutines + Flow.
  • Dependency Injection: Hilt - Standard for Android DI.
  • Architecture: Clean Architecture + MVI/MVVM (Presentation, Domain, Data).
  • Network:
  • Image Loading: Coil - Image loading backed by Kotlin Coroutines, optimized for Compose.
  • Local Storage: Room - SQLite abstraction for caching weather data (Offline-first approach).
  • Location: Play Services Location - For fetching current user coordinates.
  • Build Logic: Kotlin DSL (build.gradle.kts) with Convention Plugins.

🏛️ Architecture

DVT Weather App is based on Clean Architecture and the Repository Pattern, ensuring separation of concerns and ease of testing.

architecture

The overall architecture is composed of three main layers: Presentation, Domain, and Data.

Architecture Overview

architecture

  • Unidirectional Data Flow (UDF): The UI layer emits user intent events to the ViewModel, which processes them and exposes state via StateFlow.
  • Domain Layer: Contains pure business logic (Use Cases) and is independent of the Android Framework.
  • Data Layer: Manages data sources (Network/Database) and exposes data to the domain layer.

UI Layer (Jetpack Compose)

architecture

The UI layer uses Jetpack Compose for a declarative UI approach.

  • State Management: The UI observes StateFlow from the ViewModel.
  • Custom Widgets: Backgrounds and weather animations are drawn using native Canvas and Compose modifiers, avoiding heavy third-party UI libraries.

Data Layer & Offline Support

architecture

The repository implements the Single Source of Truth (SSOT) principle.

  1. Data is fetched from the Remote Data Source (Weather API).
  2. Data is cached in the Local Data Source (Room Database).
  3. The UI observes the database, ensuring the app works offline with the last known data.

📦 Modularization

architecture

The project is modularized to support scalability and parallel builds:

  • :app: The main entry point, connects features.
  • :core: Common utilities, extensions, and UI components (Design System).
  • :feature: Contains specific feature modules (e.g., :feature:weather).
  • :build-logic: Custom Gradle convention plugins for consistent build configurations across modules.

MAD Score

summary kotlin

🌦️ Open API

The app uses the OpenWeatherMap API to fetch current weather conditions and forecasts.

To build this project locally, you must provide your own API Key:

  1. Get a key from OpenWeatherMap.
  2. Add it to your local.properties file:
    WEATHER_API_KEY="your_api_key_here"

About

OpenWeatherMap is an online service, owned by OpenWeather Ltd, that provides global weather data via API, including current weather data, forecasts, nowcasts, and historical weather data. The company provides a minute-by-minute hyperlocal precipitation forecast.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages