Add Kotlin Multiplatform mobile client

A Compose Multiplatform app (mobile/) targeting Android, iOS, and desktop,
sharing one Kotlin codebase: OIDC login via PKCE against the same Zitadel
instance the web player uses (loopback redirect on desktop, a musify://
custom scheme on mobile), a token store per platform, and a first pass at
browsing/streaming tracks through the existing API.

deploy/compose.yml's zitadel-init gains a third OIDC app registration
("Musify Native", public client, no secret) alongside the existing API and
web apps, writing its client id to NATIVE_CLIENT_ID in the env file the same
way the other two already do.
This commit is contained in:
2026-09-10 10:03:11 +02:00
parent aca7238020
commit c5b2b71eea
50 changed files with 2200 additions and 0 deletions
@@ -0,0 +1,16 @@
package com.musify.app
// Kotlin/Native has no Gradle-property injection at runtime, so these are
// hardcoded — keep them in sync with mobile/gradle.properties. Point
// `apiBaseUrl`/`authIssuer` at your Mac's reachable address for the backend
// (e.g. the LAN IP of the machine running `dotnet run`, or "localhost" if the
// simulator and the backend are on the same Mac).
actual object AppConfig {
actual val apiBaseUrl: String = "http://localhost:5111"
actual val authIssuer: String = "http://localhost:8080"
actual val authClientId: String = "390116136177434631"
// Matches CFBundleURLTypes in Info.plist and the redirect URI registered
// for the "Musify Native" app in Zitadel.
actual val nativeRedirectUri: String = "musify://callback"
}