ThePost is a template for creating cross-platform applications using Kotlin Multiplatform (KMP). It provides a basic file structure and includes tools and libraries for efficient development, such as a version catalog for dependencies, a 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 organized into the following directories:
commonMain
: Shared code for all platforms.androidMain
: Android-specific code.iosMain
: iOS-specific code.shared
: Common code used across platforms.
A version catalog is used to manage dependencies, making it easy to maintain and update libraries.
ThePost 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, offering configurable logging levels to help debug 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 use 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! 🚀