- Android
- JVM Desktop
- iOS
- Web (using WASM)
The application uses The One API as its backend datasource. To use the application you need to first register on the API's webpage, and obtain an API key. After the API key is received, placed it into the local.properties file with THE_ONE_API_KEY key.
The application is built using a Clean Architecture implementation.
block-beta
columns 3
UI:2 space:1
space:3
ViewLogic["View logic"]:2 space:1
space:3
space:2 Domain:1
space:3
Repository:2 space:1
space:3
DataSource["Data source"]:2 space:1
UI-->ViewLogic
ViewLogic-->Domain
ViewLogic-->Repository
Repository-->Domain
DataSource-->Repository
classDef ui fill:#090,stroke:#333;
classDef view_logic fill:#990,stroke:#333;
classDef domain fill:#900,stroke:#333;
classDef repository fill:#099,stroke:#333;
classDef data_source fill:#009,stroke:#333;
class UI ui
class ViewLogic view_logic
class Domain domain
class Repository repository
class DataSource data_source
Please note that for a list-detail application a simpler approach can be sufficient.
The UI layer is built with Compose Multiplatform. The UI follows Material 3 design.
The view logic layer is implemented with Decompose and MVIKotlin.
- Decompose is used to implement navigation and to publish view logic actions to the UI. The Decompose components also use InstanceKeeper of the Essenty library to ensure that the view logic's state is preserved after platform specific configuration changes.
- MVIKotlin is used to implement the core of the view logic based on Flux architecture.
The domain module contains the domain models of the application. They are implemented with Kotlin's value classes.
The repository layer contains the repository classes' implementations, and the datasource interfaces.
The datasource layer contains the implementation of the datasources.
- To implement HTTP communication, Ktor client is used.
- To store persisted structured data on Android Room, on the other platforms SQLDelight is used. (Note that SQLDelight could be also used on Android.)
DI is implemented using Koin.
Sample test cases is implemented in the commonTest source set using the official Kotlin Test library.