Skip to content

Event App with Jetpack Compose + Android Clean architecture + Paging Library + Kotlin Flow Boilerplate

Notifications You must be signed in to change notification settings

Nsikaktopdown/EventApp

Repository files navigation

Event App - Jetpack Compose

This is a simple event App using TicketMasterApi with pagination concepts using PagingLibrary with Jetpack Compose and Kotlin Coroutines + Flow.

Languages, libraries and tools used

Screen Shots

1 2 2 2

Architecture

diagram

Here's how the sample project implements it:

Clean architecture encourages separation of concerns, making the code loosely coupled. This results in a more testable and flexible code. This approach divides the project in 3 modules: presentation, data and domain.

Presentation:

This is the User interface layer(Activities, Fragments and ViewModel) with the Android Framework, the MVVM pattern and the DI module.

Domain:

This layer holds the business logic. Contains the use cases, in charge of calling the correct repository or data member.

Data:

This layer has the responsibility of selecting the proper data source for the domain layer. It contains the implementations of the repositories declared in the domain layer. This includes:

  • Remote Datasource:: Handles communications with the remote API(REST or GRAPHQL). In this project, it makes ann HTTP call using Retrofit Interface
  • Cache Datasource : Handles communication with the local storage which is used to cache the events data locally
  • EventPagedDatasource : This class manages the actual loading of data for your list from the remote datasource. Since we have one key per page of Event API data, we extend PageKeyedDataSource from the paging library. Finally, the EventPagedDataSource will be created by its factory, AppPageDataSourceFactory which inherits of DataSource.Factory

Conclusion

I will be glad to answer any questions and also accept pull request if you find any issue.

About

Event App with Jetpack Compose + Android Clean architecture + Paging Library + Kotlin Flow Boilerplate

Topics

Resources

Stars

Watchers

Forks

Languages