Skip to content
プロジェクト

概要

KMP Movie 📱は、Android、iOS、デスクトップ、Webに対応したアプリです。Compose Multiplatform、Coroutine、Flow、ViewModelを使い、Googleが推奨するMVVMアーキテクチャに基づいて構築されています。

Web・アプリ開発

この数値の測り方

できること

  • 🧭 Adaptive navigation — bottom bar, navigation rail and drawer
  • 🌓 Theme mode — light, dark or system, persisted across sessions
  • 🏷️ Genre filtering on every movie and TV list
  • ❤️ Reactive favorites shared between all screens

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

KMP Movie (Compose Multiplatform)

Compose Multiplatform Kotlin ktorClient Gradle AGP badge-Android badge-iOS badge-desktop badge-web CI GitHub license License

KMP Movie app built with Compose Multiplatform, supporting Android, iOS, Desktop, and Web. The app follows the MVVM architecture to ensure clean, maintainable code and delivers a responsive, modern UI experience across all platforms, leveraging The Movie DB API.

Platform

  • iOS
  • Android
  • Desktop
  • Web





Main Features

Movies

  • 🎞 Now Playing, Popular, Top Rated & Upcoming movie sections
  • 🔍 Movie Detail Pages with Cast & Crew
  • 🎯 Recommended Movies
  • 🔍 Search Movies
  • 👤 Artist/Actor Detail Page with navigation from movie cast

TV Series

  • 📺 Airing Today, On The Air, Popular & Top Rated TV series sections
  • 🔍 TV Series Detail Pages with Cast & Crew
  • 🎯 Recommended TV Series
  • 🔍 Search TV Series
  • 👤 Artist/Actor Detail Page with navigation from TV series cast

Celebrity

  • 🌟 Popular and Trending Celebrities/Persons sections
  • 🔍 Celebrity Search functionality
  • 👤 Celebrity Detail Page with navigation from movie/tv cast

Favorites

  • ❤️ Add Movies, TV Series, and Celebrities to your favorites list
  • 💾 Persistent storage of favorite items across sessions

Common Features

  • 🧭 Adaptive navigation — bottom bar, navigation rail and drawer
  • 🌓 Theme mode — light, dark or system, persisted across sessions
  • 🏷️ Genre filtering on every movie and TV list
  • ❤️ Reactive favorites shared between all screens
  • 🔎 Debounced search with movie, TV and celebrity results
  • 📄 Pagination on all platforms
  • 🖥️ Two-pane list/detail on wide windows and tablets
  • 🎬 Trailer, share and watch-provider actions on detail pages
  • 🔗 Deep links on the web (#/movie/27205, #/series/1399, #/person/31)
  • 🪟 Persistent desktop window size, position and maximized state

Architecture

  • MVVM Architecture (Model - ComposableView - ViewModel)
  • ViewModels expose immutable state through StateFlow; screens are plain composables.
  • Koin provides dependency injection (di/AppModule.kt), repositories are the single source of truth for data, and favorites/preferences are persisted with Multiplatform Settings.

API Key 🔑

You will need to provide a developer key to fetch the data from TMDB API.

  • Generate a new key (v3 auth) from here. Copy the key and go back to the project.
  • Add a new entry in local.properties file:
API_KEY=superSecretSampleApiKeyOf32Chars

local.properties is git-ignored — never commit a real API key.

Built With 🛠

  • Kotlin - A modern, concise programming language for multiplatform development.
  • Compose Multiplatform - Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces.
  • Gradle - Build tool; dependency versions are centralized in gradle/libs.versions.toml.
  • Android Gradle Plugin - Android build integration, including built-in Kotlin and the Android-KMP library plugin.
  • Multiplatform Settings - A consistent, platform-agnostic key-value storage for Kotlin Multiplatform.
  • kotlinx-datetime - A multiplatform date and time library for Kotlin.
  • Ktor Client - Ktor includes a multiplatform asynchronous HTTP client, which allows you to make requests and handle responses.
  • Koin - A pragmatic lightweight dependency injection framework for Kotlin
  • kotlinx.serialization - Kotlin multiplatform / multi-format reflectionless serialization
  • View Model - The ViewModel class is a business logic or screen level state holder. It exposes state to the UI and encapsulates related business logic
  • Coroutines - For asynchronous and more.
  • Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
  • Landscapist - 🌻 A pluggable, highly optimized Jetpack Compose and Kotlin Multiplatform image loading library that fetches and displays network images with Glide, Coil, and Fresco.
  • Android Studio - Android Studio is the official Integrated Development Environment (IDE) for Android app development.
  • Xcode - The IDE for building, testing and distributing the iOS application.

Before running!

  • check your system with KDoctor
  • install JDK 17 (required by AGP 9 and the JVM 17 compilation target)
  • install Android SDK Platform 37.1 (compileSdk) through the SDK Manager
  • add a local.properties file to the project root with your SDK path and API key: sdk.dir=/path/to/Android/sdk and API_KEY=... (see above)
  • install Node.js with Yarn 1.22.22 for the web target

Android

To run the application on Android device/emulator:

  • open the project in Android Studio and run the imported android run configuration

To build the debug APK:

  • run ./gradlew :androidApp:assembleDebug
  • find the .apk in androidApp/build/outputs/apk/debug/androidApp-debug.apk
  • run Android host tests: ./gradlew :shared:testAndroidHostTest

Release signing

Release builds are minified with R8 and resource shrinking. To produce a signed APK/Bundle, provide:

export KEYSTORE_PATH=/absolute/path/to/release.keystore
export KEYSTORE_PASSWORD=...
export KEY_ALIAS=...
export KEY_PASSWORD=...

Without these variables assembleRelease still works but produces an unsigned APK.

iOS

To run the application on an iPhone device/simulator:

  • Open iosApp/iosApp.xcodeproj in Xcode and run a standard configuration
  • Or use the Kotlin Multiplatform plugin for Android Studio
  • run iOS simulator tests: ./gradlew :shared:iosSimulatorArm64Test

Desktop

  • Run the desktop application: ./gradlew :desktopApp:run
  • Run with Compose Hot Reload: ./gradlew :desktopApp:hotRun
  • Run desktop tests: ./gradlew :shared:desktopTest
  • Window size, position and maximized state are restored on the next launch.

Web

  • Before running make sure you have yarn 1.22.22
  • Run the web application: ./gradlew :webApp:wasmJsBrowserDevelopmentRun
  • Routes are kept in the URL hash, so refreshing and browser back/forward work. Examples: #/movies/popular, #/tv/top-rated, #/movie/27205, #/series/1399, #/person/31.

Project structure

kmp-movie/
├── shared/            # Kotlin Multiplatform module (UI, data, DI)
│   └── src/
│       ├── commonMain/   # Compose UI, ViewModels, repositories, Ktor client
│       ├── androidMain/  # Android-specific implementations
│       ├── iosMain/      # iOS implementations and MainViewController
│       ├── desktopMain/  # Desktop/JVM implementations
│       └── webMain/      # Wasm implementations
├── androidApp/        # Android application module (manifest + resources)
├── desktopApp/        # Compose Desktop application
├── webApp/            # Wasm browser host
├── iosApp/            # Xcode project consuming the shared framework
└── gradle/
    └── libs.versions.toml   # central dependency and plugin versions

shared

The multiplatform module containing the Compose UI, ViewModels, repositories, networking and dependency injection. It builds into an Android library, an iOS framework, a JVM library for Desktop and a Wasm library for the web.

androidApp

The Android application module. It depends on shared and owns the Android manifest, launcher resources and the Activity entry point.

iosApp

The Xcode project that hosts the Compose UI through the framework produced by shared.

desktopApp

The Compose Desktop application; supports running with Compose Hot Reload.

webApp

The Wasm browser host for the shared Compose UI.

Testing

  • Desktop: ./gradlew :shared:desktopTest
  • Android host tests: ./gradlew :shared:testAndroidHostTest
  • iOS simulator: ./gradlew :shared:iosSimulatorArm64Test
  • Wasm: ./gradlew :webApp:wasmJsTest

Acknowledgements

👨 Developed By

Mehedi Hassan Piash

Twitter Medium Linkedin Web Blog

License

Copyright 2024-2026 piashcse (Mehedi Hassan Piash)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

関連プロジェクトを探す

読み込み中…