KmpTemplate is a Kotlin Multiplatform (KMP) project template that provides a basic file structure for building cross-platform applications. It includes version catalog for dependencies management, an efficient Shared MVI (Model-View-Intent) architecture with Kotlin Flows and Coroutines, Kermit logger, Ktor HTTP client, Koin dependency injection, and SQLDelight for database integration.
The project is structured as follows:
commonMain
: Contains code shared across all platforms.androidMain
: Contains Android-specific code.iosMain
: Contains iOS-specific code.shared
: Common code used across platforms.
This project uses a version catalog to manage dependencies, making it easier to maintain and update libraries.
KmpTemplate follows the MVI architecture pattern for managing UI state. It includes a shared ViewModel using Kotlin Flows and Coroutines to handle business logic and UI updates efficiently across platforms.
Kermit is used for logging purposes. It allows for configurable logging levels and helps in debugging your application.
Ktor is used for making network requests. It provides a flexible and asynchronous way to perform HTTP operations on all platforms.
Koin is used for dependency injection, making it easy to manage and inject dependencies in your KMP project.
SQLDelight is integrated for database operations. It provides type-safe database queries and helps maintain a consistent data layer across platforms.
To get started with this template, follow these steps:
- Clone this repository.
- Open the project in your preferred Kotlin IDE.
- Customize the project to fit your application's needs.
- Use the shared code in your platform-specific projects to create your app.
Feel free to contribute to this project or use it as a starting point for your Kotlin Multiplatform project. If you have any questions or need assistance, please open an issue in this repository.
Happy coding! 🚀