This project uses Kotlin Multiplatform(KMP) to share code between Android and iOS. The project was developed with a focus on scalability and implementing best development practices.
- Clean Architecture: Following Clean Architecture principles, the code is modularized into layers, facilitating maintenance and testing.
- SOLID: Following SOLID principles to ensure clean, easily extensible, and modifiable code.
- Dependency Injection: Koin to simplify dependency injection, promoting greater flexibility.
- Kotlin Multiplatform (KMP): Shared code between Android and iOS.
- Jetpack Compose: Declarative framework to build modern UIs on Android.
- Swift UI: Declarative framework to build modern UIs on iOS.
- SQLDelight: Multiplatform database management with SQL support.
- Ktor: Used for making network calls on both platforms.
- Koin: Multiplatform dependency injection framework.
- Kotlinx Coroutines: Asynchronous programming in Kotlin.
- Kotlinx Serialization: JSON data serialization.
- BuildKonfig: Stores sensitive settings, such as keys, without exposing them in the repository.
- Turbine: Testing flows with Flow.
- Robolectric: For Android UI tests without an emulator.
- MockMP: Used for creating mocks in multiplatform unit tests.
- Kotlinx Coroutines Test: Facilitates testing of asynchronous coroutines.
- All unit tests were implemented within the shared module, ensuring complete coverage of shared code between platforms.
This project is designed to be easily scalable, allowing new functionalities and modules to be added without compromising the existing architecture. The combination of clean architecture, SOLID principles, and multiplatform code with KMP is rare in a single project, making this an excellent starting point for robust projects.
- Clone the repository to your local machine
- Obtain the API key from News API
- Create API_KEY variable in your
local.properties
API_KEY = {your_API_key}
- Open the project in Android Studio or your preferred IDE for KMM development and run the project on your preferred platform.
The UI/Framework layers reside in the native apps, while everything from the View Model up to the Data layer is in the common KMP module.