Skip to content

dalafiarisamuel/Unsplash-KMP

Repository files navigation

Unsplash-API-KMP CI

A project to display images from Unsplash API using Kotlin Multiplatform

Features

  • Jetpack Compose
  • Coil KMP
  • MVI Architecture
  • Kotlin Coroutines with Flow
  • Koin
  • Kotlin Gradle DSL
  • Google Paging3
  • Ktorfit
  • Compose Navigation v3
  • Room Database
  • Datastore

Libraries

  • Jetpack Compose - Android’s modern toolkit for building native UI.
  • Coil KMP - An image loading library for Android & KMP backed by Kotlin Coroutines.
  • View Model - Presenter for persisting view state across config changes
  • Ktorfit - type safe http client and supports coroutines out of the box.
  • Kotlin Serialization - JSON Parser,used to parse requests from the API
  • kotlinx.coroutines - Library Support for coroutines
  • Paging3 - The Paging Library makes it easier for you to load data gradually and gracefully within your app
  • Compose Navigation v3 - Navigation 3 is a new navigation library designed to work with Compose
  • Koin - Kotlin Multiplatform Dependency Injection
  • Room Database - Room Database Kotlin Multiplatform Support
  • Datastore - Datastore Kotlin Multiplatform Support

Prerequisite

  • To successfully make API calls to Unsplash Endpoint, use a valid API Token from Unsplash.
  • Enter your valid API token here

Mobile App Screenshots

Android Portrait Screenshot Android Foldable Screenshot
iPhone Dark Theme screenshot iPhone Light Theme screenshot

Desktop App Screenshots

Desktop Screenshot 1 Desktop Screenshot 2

Before running

  • Check your system with KDoctor
  • Install JDK 17 or higher on your machine

Android

To run the application on android device/emulator:

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

Desktop

Run the desktop application: ./gradlew :composeApp:run or ./gradlew run or ./gradlew hotRunDesktop for hot reload

iOS

To run the application on iPhone device/simulator:

  • Open iosApp/iosApp.xcproject in Xcode and run standard configuration
  • Or use Kotlin Multiplatform Mobile plugin for Android Studio Run iOS simulator UI tests: ./gradlew :composeApp:iosSimulatorArm64Test