Skip to content

Latest commit

 

History

History
99 lines (71 loc) · 5.57 KB

README.md

File metadata and controls

99 lines (71 loc) · 5.57 KB

💎 Compose Multiplatform - News App

Application Scope

This is a simple application that presents news information. The data is dynamically sourced from the News Api.

🗡️ This demonstrates modern Android development with Koin, Coroutines, Flow, Jetpack (Ktor, ViewModel), and Material Design based on Clean Architecture.

The app has a few screens located in multiple feature modules:

  • News list screen - displays list of News
  • News detail screen - display information about the selected news item
  • Favourites screen - display list of news item which are stored in local app database
  • Profile screen - empty (WiP)

Tech-Stack

This project takes advantage of best practices and many popular libraries and tools in the Android ecosystem. Most of the libraries are in the stable version unless there is a good reason to use non-stable dependency.

Architecture

KMP-News-App is based on the MVVM architecture and the Repository pattern, which follows the Google's official architecture guidance.

architecture

The overall architecture of KMP-News-App is composed of two layers; the UI layer and the data layer. Each layer has dedicated components and they have each different responsibilities, as defined below:

Pokedex was built with Guide to app architecture, so it would be a great sample to show how the architecture works in real-world projects.

Architecture Overview

architecture

  • Each layer follows unidirectional event/data flow; the UI layer emits user events to the data layer, and the data layer exposes data as a stream to other layers.
  • The data layer is designed to work independently from other layers and must be pure, which means it doesn't have any dependencies on the other layers.

With this loosely coupled architecture, you can increase the reusability of components and scalability of your app.

UI Layer

architecture

The UI layer consists of UI elements to configure screens that could interact with users and ViewModel that holds app states and restores data when configuration changes.

Data Layer

architecture

The data Layer consists of repositories, which include business logic, such as querying data from the local database and requesting remote data from the network. It is implemented as an offline-first source of business logic and follows the single source of truth principle.

KMP-News-App is an offline-first app is an app that is able to perform all, or a critical subset of its core functionality without access to the internet. So users don't need to be up-to-date on the network resources every time and it will decrease users' data consumption. For further information, you can check out Build an offline-first app.

Find this repository useful ? ❤️

Support it by giving a ⭐ to this repository.

Author - Momin Tahir