KMP Native UI networking with Ktro
We have our dependency injection ready and have tested our dummy view model on both Android and iOS. It is time to get some data... We need to pay attention to the project structure at this stage. ...

Source: DEV Community
We have our dependency injection ready and have tested our dummy view model on both Android and iOS. It is time to get some data... We need to pay attention to the project structure at this stage. Clean architecture has 3 layers, data: contains data sources and repository implementation domain: contains the abstract logic of the application presentation or UI, contains the view models, actions, states, and screens In KMP, the screens themselves are in the Native Projects, while the rest of the data, domain, and presentation are in the shared codebase. What are the app features? For our simple project, we will add two features. Products feature: where we can list products and show their details. Auth feature: Where we can fill in the login form and navigate to the home screen. Where to get it from? I found a website called dummy json that provides both Auth and Products endpoints. In this tutorial, we will only use the Products api. The auth will be used in another tutorial. Setup Ktor