How sureshg/kotlin-mpp-playground works
Project type and purpose
• This is a Kotlin Multiplatform Playground: a single Gradle multi‐project repository demonstrating JVM (Ktor) backend services, JS/WASM web front-ends, Compose desktop & web UIs, native binaries, agents, profiling, security modules, CLI tools, and meta-components (compiler plugin, KSP processor).
• Its purpose is to showcase Kotlin MPP targets, platform‐specific modules, shared business logic, and end-to-end flows (from HTTP clients to database and observability).
File structure
• Top-level “backend” folder contains multiple subprojects:
• agent (JFR & OTEL Java agents)
• boot (Ktor application, SQL schema)
• data (data-generation tooling)
• jvm (Ktor server with routes, plugins, OpenAPI, templates)
• native (Kotlin/Native HTTP server)
• profiling (JFR/profiling utilities)
• security (TLS, TrustStore, cert scanning, password gen)
• “shared” is the cross-platform library used by backend, web, compose, native, etc.
• “web” holds Kotlin/JS and WASM web clients (HTTP + xterm + playground).
• “compose” houses Compose Multiplatform subprojects: CLI, desktop (cmp), HTML (via Kobweb).
• “benchmark” uses Kotlinx-benchmark over the shared core.
• “meta” holds build-time plugins: a compiler plugin and a KSP processor.
• “dep-mgmt” defines your BOM and catalog modules.
• Gradle build logic under “gradle/build-logic” and GitHub Actions under “.github”.
README for additional insights
• Multiplatform targets: JVM, JS, WASM, Native, Desktop, Web.
• Build & run instructions, containerization, GraalVM native image, OpenTelemetry, JVM agents, AOT, tests, benchmarking, publishing.
• Front-ends → Backend → Database
• Backend ↔ Agents/Profiling → OTEL Collector
• Build Infra → All modules (Gradle triggers build, GitHub Actions runs workflows)
• Green for shared libraries
• Orange for build-time infra (Gradle, meta plugins)
• Red for external services (OTEL, DB, Grafana)