Click the image above to watch a demo of the Gemini AI KMP App on YouTube.
Gemini AI KMP App is a production-ready, open-source Kotlin Multiplatform (KMP) and Compose Multiplatform application targeting Android, iOS, Desktop (macOS, Windows, Linux), and Web (Wasm).
Powered by the latest Google Gemini AI models (including Gemini 3.8 Flash and Gemini 4 Argon), this app allows you to have intelligent, multimodal conversations using text and images. Conversations are stored locally with SQLDelight and persistent key-value configuration is handled cleanly with Multiplatform Settings.
- π¬ Multimodal Conversational AI: Seamless chat experience supporting text prompts and image attachments.
- β‘ Latest Gemini Models:
- Live model discovery from the official Gemini API (
/v1beta/models). - Flagship defaults:
gemini-3.8-flash(Recommended),gemini-4-argon,gemini-3.5-flash-lite, andgemini-3.6-flash. - Context & token limits display with visual badges (e.g. Recommended, Thinking, Gemini 4, Fast & Lite).
- Live model discovery from the official Gemini API (
- π¨ Adaptive & Responsive Material 3 UI:
- Adaptive Navigation Suite adapting to Phones, Foldables, Tablets, and Desktops.
- Collapsible desktop drawer for chat history.
- Staggered adaptive grid layout for model selection.
- π Dynamic Theme Management:
- One-click switching between System Default, Light, and Dark themes.
- Reactive theme state managed cleanly via
SettingRepositoryandAppViewModel.
- π Cross-Platform Vertical Scrollbars (
AppVerticalScrollbar):- Desktop & Web draggable scrollbars styled with Material 3 tokens.
- Native touch-overscroll on mobile without conflicts.
- Reverse-layout sync for chat messages.
- π API Key & Storage Management:
- Easily configure, mask/reveal, or change your Google Gemini API key at runtime.
- Data & Storage controls with a safe Delete All Conversations confirmation flow.
- ποΈ Clean Architecture & MVI:
- Strict separation of concerns:
UI (Compose)βViewModel (MVI with Intent / State / Effect)βDomain (Use Cases)βData (Repositories & Data Sources). - Lifecycle-aware one-off effect handling with
ObserveAsEvents.
- Strict separation of concerns:
| Layer / Domain | Technology |
|---|---|
| Language & Platform | Kotlin Multiplatform (2.4.x), Compose Multiplatform (1.12.x) |
| Build Tools | Android Gradle Plugin (AGP 9.1.x), Gradle 9.x |
| Architecture | Clean Architecture + MVI (Model-View-Intent) + Single Source of Truth |
| UI & Theming | Jetpack Compose Multiplatform, Material 3, Adaptive Layouts, Jetpack Navigation 3 |
| Dependency Injection | Koin 4.2.x (koin-compose-viewmodel) |
| Networking | Ktor 3.6.x (Content Negotiation, Kotlinx Serialization) |
| Local Database | SQLDelight 2.4.x (SQLite on Mobile/Desktop, SQL.js on Web) |
| Key-Value Persistence | Multiplatform Settings |
| File / Image Picking | FileKit 0.17.x (Native cross-platform image picker) |
| Logging | Touchlab Kermit |
| BuildConfig | BuildKonfig |
The project follows a modern modular KMP setup:
Gemini-AI-KMP-App/
βββ androidApp/ # Android application entry point & Manifest
βββ desktopApp/ # JVM Desktop application entry point (macOS, Windows, Linux)
βββ webApp/ # Web (WasmJs) application entry point & webpack configurations
βββ iosApp/ # iOS Xcode project (SwiftUI wrapper)
βββ shared/ # Shared multiplatform core module
βββ commonMain/ # Core domain models, use cases, repositories, screens & UI
βββ androidMain/ # Android-specific drivers & platform utilities
βββ jvmMain/ # Desktop JVM implementations (Scrollbars, DB drivers)
βββ wasmJsMain/ # WebAssembly implementations
βββ iosMain/ # iOS platform hooks
- JDK 21 (e.g. Azul Zulu JDK 21)
- Android Studio Ladybug Feature Drop (or newer)
- Xcode (for iOS builds on macOS)
-
Clone the repository:
git clone https://github.com/Coding-Meet/Gemini-AI-KMP-App.git cd Gemini-AI-KMP-App -
Configure Gemini API Key:
- Obtain an API key from Google AI Studio.
- Create a
local.propertiesfile in the project root:(Note: You can also configure or update your API key directly within the app's Settings screen at any time).GEMINI_API_KEY=YOUR_GEMINI_API_KEY
-
Generate SQLDelight Interfaces: Run the following task in the terminal or Android Studio Gradle panel:
./gradlew :shared:generateCommonMainGeminiApiChatDBInterface
-
Android: Select the
androidApprun configuration in Android Studio and hit Run (Shift + F10). Or via terminal:./gradlew :androidApp:installDebug
-
Desktop (macOS / Windows / Linux):
./gradlew :desktopApp:run
-
Web (Wasm / Browser):
./gradlew :webApp:wasmJsBrowserDevelopmentRun
-
iOS: Open
iosApp/iosApp.xcodeprojin Xcode and press Run, or run theiosAppconfiguration from Android Studio with the KMP plugin.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Give a βοΈ if this project helped you!
Meet




























































































