$git clone https://github.com/joreilly/PeopleInSpaceKotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear OS, Compose for Desktop and Compose for Web clients along with Ktor backend. Currently running on * Android (Jetpack Compose) * Android App Widget (Compose based Glance API - contributed by https://g
| 1 | # PeopleInSpace |
| 2 | |
| 3 |  |
| 4 | |
| 5 | **Kotlin Multiplatform** project with SwiftUI, Jetpack Compose, Compose for Wear OS, Compose for Desktop and Compose for Web clients along with Ktor backend. Currently running on |
| 6 | * Android (Jetpack Compose) |
| 7 | * Android App Widget (Compose based Glance API - contributed by https://github.com/yschimke) |
| 8 | * Wear OS (Compose for Wear OS - primarily developed by https://github.com/yschimke) |
| 9 | * iOS (SwiftUI) |
| 10 | * Swift Executable Package |
| 11 | * Desktop (Compose for Desktop) |
| 12 | * Web (Compose for Web - Wasm based) |
| 13 | * JVM (small Ktor back end service + `Main.kt` in `common` module) |
| 14 | * MCP server (using same shared KMP code) |
| 15 | |
| 16 | The people data comes from [The Space Devs API](https://thespacedevs.com/llapi) (names, bios and images of the people |
| 17 | currently in space) and the position of the International Space Station from the |
| 18 | [Open Notify ISS-Now API](http://open-notify.org/Open-Notify-API/ISS-Location-Now/), both served through this |
| 19 | project's own small Ktor backend (see `backend` module below). |
| 20 | |
| 21 | The project is included as sample in the official [Kotlin Multiplatform docs](https://kotlinlang.org/docs/multiplatform-samples.html) and also the [Google Dev Library](https://devlibrary.withgoogle.com/products/android) |
| 22 | |
| 23 | ### Module overview |
| 24 | |
| 25 | | Module | Description | |
| 26 | |---|---| |
| 27 | | `common` | Shared KMP code (Ktor, SQLDelight, Koin, view models) and shared Compose Multiplatform UI | |
| 28 | | `app` | Android client (Jetpack Compose), including Glance app widget | |
| 29 | | `wearApp` | Wear OS client (Compose for Wear OS) | |
| 30 | | `PeopleInSpaceSwiftUI` | iOS client (SwiftUI) | |
| 31 | | `compose-desktop` | Desktop client (Compose for Desktop) | |
| 32 | | `compose-web` | Web client (Compose for Web, Kotlin/Wasm) | |
| 33 | | `backend` | Ktor server providing the people/ISS data (deployable to Google App Engine) | |
| 34 | | `mcp-server` | Model Context Protocol server exposing the shared KMP code | |
| 35 | |
| 36 | ### Building and running |
| 37 | |
| 38 | Requirements: JDK 17, a recent version of Android Studio (for the Android/Wear clients) and Xcode (for the iOS client). |
| 39 | |
| 40 | * **Android**: run the `app` configuration from Android Studio (or `./gradlew :app:installDebug`) |
| 41 | * **Wear OS**: run the `wearApp` configuration from Android Studio (or `./gradlew :wearApp:installDebug`) |
| 42 | * **iOS**: open `PeopleInSpaceSwiftUI` in Xcode and run from there |
| 43 | * **Desktop**: `./gradlew :compose-desktop:run` |
| 44 | * **Web (Wasm)**: `./gradlew :compose-web:wasmJsBrowserDevelopmentRun` |
| 45 | * **Backend**: `./gradlew :backend:run` (or run `Server.kt` directly from Android Studio). After doing that you should then for example be able to open `http://localhost:9090/astros_local.json` in a browser. |
| 46 | |
| 47 | Tests can be run with `./gradlew :common:jvmTest`, and there's also a [Maestro](https://maestro.mobile.dev/) UI test |
| 48 | flow for the Android client (`maestro test maestro/PeopleInSpace.flow`). |
| 49 | |
| 50 | ### Backend deployment |
| 51 | |
| 52 | Have tested this out in Google App Engine deployment. Using shadowJar plugin to create an "uber" jar and then deploying it as shown below. Should be possible to deploy this jar to other services as well. |
| 53 | |
| 54 | ``` |
| 55 | ./gradlew :backend:shadowJar |
| 56 | gcloud app deploy backend/build/libs/backend-all.jar --appyaml=backend/src/jvmMain/appengine/app.yaml |
| 57 | ``` |
| 58 | |
| 59 | ### Screenshots |
| 60 | |
| 61 | **iOS (SwiftUI + CMP)** |
| 62 | <br/> |
| 63 | <img width="738" height="502" alt="Screenshot 2025-08-10 at 22 15 21" src="https://github.com/user-attachments/assets/2befb5b7-7308-409b-b83e-cc510fe72e41" /> |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | **Android (Jetpack Compose + CMP)** |
| 69 | <br/> |
| 70 | |
| 71 | <img width="719" height="496" alt="Screenshot 2025-08-10 at 22 15 29" src="https://github.com/user-attachments/assets/4d97e95c-be6e-4913-a1a1-369bd7af5d7f" /> |
| 72 | |
| 73 | |
| 74 | |
| 75 | **Wear OS (Wear Compose)** |
| 76 | <br/> |
| 77 | <img width="250" alt="Wear OS person list" src="screenshots/wear_person_list.png"> |
| 78 | <img width="250" alt="Wear OS list with ISS map edge button" src="screenshots/wear_edge_button.png"> |
| 79 | <img width="250" alt="Wear OS ISS position map" src="screenshots/wear_iss_map.png"> |
| 80 | |
| 81 | |
| 82 | **Compose for Desktop** |
| 83 | <br/> |
| 84 | <img width=" |