An android app built using Kotlin that consumes DAZN API to display a list of sports matches⚽.
Download the apk here
This is the core layer of the application. The
domain layer is independent of any other layers thus the domain models and business logic can be independent from other layers.This means that changes in other layers will have no effect on domain layer eg. screen UI (presentation layer) or changing database (data layer) will not result in any code change withing domain layer.
Components of domain layer include:
Models: Defines the core structure of the data that will be used within the application.
Repositories: Interfaces used by the use cases. Implemented in the data layer.
data layer is responsible for selecting the proper data source for the domain layer. It contains the implementations of the repositories declared in the domain layer.
Components of data layer include:
–Dto Models: Defines POJO of network responses.
Repositories: Responsible for exposing data to the domain layer.
Mappers: They perform data transformation between
Network: This is responsible for performing network operations eg. defining API endpoints using Ktor.
Cache: This is responsible for performing caching operations using DataStore.
Data Source: Responsible for deciding which data source (network or cache) will be used when fetching data.
presentation layer contains UI components.
This project uses many of the popular libraries, plugins and tools of the android ecosystem.
- Koin – Dependency Injection library.
- Jetpack Compose – Modern toolkit for building native UI.
- Media 3 – Collection of support libraries for media playback, including ExoPlayer.
- Coil – An image loading library for Android backed by kotlin. coroutines.
- ViewModel – Designed to store and manage UI-related data in a lifecycle conscious way. The ViewModel class allows data to survive configuration changes such as screen rotations.
- Navigation ComponentComponent that allows easier implementation of navigation from simple button clicks to more complex patterns.
- Firebase Analytics – A real time analytics tracking tool.
- Firebase Crashlytics – A real time crash reporting tool.
- Ktor – Provides multiplatform libraries required to make network calls to the REST API.
- kotlinx.serialization – Provides sets of libraries for various serialization formats eg. JSON, protocol buffers, CBOR etc.
- Coroutines – Library Support for coroutines.
- Kotlinx.datetime – A multiplatform Kotlin library for working with date and time.
- Timber – Library for easier logging.
- Material Design – Build awesome beautiful UIs.
- Palette API – Extract color palette from images.
- SplashScreen API – Loading application splashscreen.
- Firebase App Distribution – Distribute debug app to testers/QA before release.
- Junit4 – Test framework which uses annotations to identify methods that specify a test.
- Robolectric – Framework used to quickly and reliably run unit tests quick using the JVM.
- Truth – Assertions Library,provides readability as far as assertions are concerned.
- Mockk – Mocking framework for tests.
- Ktor Client Mock – Simulates HTTP calls for unit and intergration tests without connecting to the endpoint.
- KtLint – Creates convenient tasks in your gradle project that run kotlin lint checks or do code auto format.
- Detekt– A static code analysis tool for the Kotlin programming language.
- GitHub Actions – GitHub actions is used in this project to check for syntax correctness using linting, execute the unit tests, generate a new package and deploying the debug apk using Firebase App Distribution when pushing changes to the dev branch or when making a pull request to the main branch.
These are the app’s screenshots: