diff --git a/README.md b/README.md index 5f22c8a..61cae3d 100644 --- a/README.md +++ b/README.md @@ -57,14 +57,12 @@ DATA_DIR=./data LIBRARY_CONFIG=./config/library.yaml USERS_FILE=./config/users.y java -jar build/libs/musicmanager-*-all.jar ``` -Open `http://localhost:8080/ui`. The first start scans the library automatically because the database is empty. Later scans are manual: +The server exposes the native API under `/api/v1`; use the Kotlin Multiplatform client for browsing and playback. The first start scans the library automatically because the database is empty. Later scans are manual: ```bash curl -X POST -H "Authorization: Bearer $TOKEN" http://localhost:8080/api/v1/scan ``` -The built-in UI is an admin/management surface: users, moods, seeds, library search, and a browser radio player. - ## Configuration ### `library.yaml` @@ -111,7 +109,6 @@ Passwords are read into memory at startup and never written to SQLite. In produc | `LIBRARY_CONFIG` | `./config/library.yaml` | Library folders | | `USERS_FILE` | `./config/users.yaml` | Users and passwords | | `FFMPEG_PATH` | `ffmpeg` | Transcoder binary | -| `WEB_UI` | `true` | Serve the built-in management UI | ## The mood model @@ -226,7 +223,7 @@ src/main/kotlin/win/taptap/musicmanager/ `-- util/ # Deterministic IDs, sort names ``` -The old OpenSubsonic layer (`/rest`, `subsonic/`, playlist materialization) was removed in 0.2.0. The server and the KMP client are the two halves of the same product; there is no compatibility layer to preserve. +The old OpenSubsonic layer (`/rest`, `subsonic/`, playlist materialization) was removed in 0.2.0. The server and the KMP client are the two halves of the same product; there is no compatibility layer to preserve and no server-rendered UI. ## Database @@ -314,7 +311,6 @@ The smoke test generates tagged MP3s, starts the server, and verifies login, syn - [x] MP3 scanner, covers, deterministic IDs, SQLite + Flyway. - [x] Native bearer-auth API, sync deltas, tombstones. - [x] Mood CRUD, seeds, server-driven radio, playback events, add-to-mood. -- [x] Built-in management UI on the native API. - [x] Kotlin Multiplatform client foundation (Android, desktop, web). - [ ] Offline downloads and offline playback across clients. - [ ] YT Music discovery through `yt-dlp`, recommendation list, accept/reject. diff --git a/charts/audiomanager/values.yaml b/charts/audiomanager/values.yaml index 9508503..cae3fe5 100644 --- a/charts/audiomanager/values.yaml +++ b/charts/audiomanager/values.yaml @@ -82,10 +82,6 @@ securityContext: drop: - ALL -env: - - name: WEB_UI - value: "true" - nodeSelector: {} tolerations: [] affinity: {} diff --git a/src/main/kotlin/win/taptap/musicmanager/Application.kt b/src/main/kotlin/win/taptap/musicmanager/Application.kt index e857482..820f720 100644 --- a/src/main/kotlin/win/taptap/musicmanager/Application.kt +++ b/src/main/kotlin/win/taptap/musicmanager/Application.kt @@ -16,7 +16,6 @@ import io.ktor.server.plugins.partialcontent.PartialContent import io.ktor.server.plugins.statuspages.StatusPages import io.ktor.server.request.path import io.ktor.server.response.respond -import io.ktor.server.response.respondRedirect import io.ktor.server.response.respondText import io.ktor.server.routing.get import io.ktor.server.routing.routing @@ -68,12 +67,6 @@ fun main() { scanner.start(applicationScope) } - val webUiHtml = if (config.webUiEnabled) { - AppConfig::class.java.getResource("/web/index.html")?.readText() - } else { - null - } - val server = embeddedServer(Netty, port = config.port, host = "0.0.0.0") { install(ContentNegotiation) { json( @@ -131,9 +124,11 @@ fun main() { routing { get("/health") { call.respondText("ok") } - if (webUiHtml != null) { - get("/") { call.respondRedirect("/ui") } - get("/ui") { call.respondText(webUiHtml, ContentType.Text.Html) } + get("/") { + call.respondText( + "AudioManager\nAPI: /api/v1\nHealth: /health\n", + ContentType.Text.Plain, + ) } apiRoutes( users = users, diff --git a/src/main/kotlin/win/taptap/musicmanager/config/AppConfig.kt b/src/main/kotlin/win/taptap/musicmanager/config/AppConfig.kt index 04584f5..7f26911 100644 --- a/src/main/kotlin/win/taptap/musicmanager/config/AppConfig.kt +++ b/src/main/kotlin/win/taptap/musicmanager/config/AppConfig.kt @@ -14,7 +14,6 @@ data class AppConfig( val libraryConfigPath: Path, val usersFile: Path, val ffmpegPath: String, - val webUiEnabled: Boolean = true, ) { val databasePath: Path get() = dataDir.resolve("musicmanager.db") @@ -28,20 +27,12 @@ data class AppConfig( ?: throw IllegalArgumentException("PORT must be an integer, got: $rawPort") require(port in 1..65535) { "PORT must be between 1 and 65535, got: $port" } - val webUi = value("WEB_UI", "true").lowercase() - val webUiEnabled = when (webUi) { - "true", "1", "yes", "on" -> true - "false", "0", "no", "off" -> false - else -> throw IllegalArgumentException("WEB_UI must be true or false, got: $webUi") - } - return AppConfig( port = port, dataDir = Path.of(value("DATA_DIR", "./data")), libraryConfigPath = Path.of(value("LIBRARY_CONFIG", "./config/library.yaml")), usersFile = Path.of(value("USERS_FILE", "./config/users.yaml")), ffmpegPath = value("FFMPEG_PATH", "ffmpeg"), - webUiEnabled = webUiEnabled, ) } } diff --git a/src/main/resources/web/index.html b/src/main/resources/web/index.html deleted file mode 100644 index de75d0c..0000000 --- a/src/main/resources/web/index.html +++ /dev/null @@ -1,614 +0,0 @@ - - -
- - -Mood-based streaming. Sign in to continue.
- -