A Kotlin Compose + Spring Boot API for TerraCambio. This repository contains a minimal, clean architecture-style setup (ports and adapters/hexagonal) for a Listing feature, plus Springdoc OpenAPI for interactive API docs 📑🔍
Open this project from Android Studio latest version for the best development experience, if not using Android Studio you can run the gradlew commands listed in the Build Commands
I created this project as a mono repo KMP project
The domain logic and its tests is in its own KMP module at Listing and then I have code for each target
- Domain code 📊
- Tests 🧐
This is a Kotlin Multiplatform project targeting: 📱 Android · 🍏 iOS · 🌐 Web · 💻 Desktop · 🖥️ Server (JVM)
-
/composeApp 🧩 — Shared UI code across Compose Multiplatform apps.
- commonMain 🔄 — Code shared by all platforms.
- Platform-specific folders (e.g. [iosMain], [jvmMain]) handle native integrations.
-
/iosApp 🍏 — Entry point for iOS app (needed even with Compose Multiplatform). Can also include SwiftUI code.
-
/shared 📦 — Business logic shared across all targets.
- commonMain — Core shared code.
-
/server ⚙️ — Spring Boot API layer.
Once the server is running, open: 👉 http://localhost:8080/swagger-ui/index.html
Provided by springdoc-openapi for exploring available controllers interactively 🎛️
-
macOS/Linux 🐧
./gradlew :listing:jvmTest --rerun-tasks
-
Windows 🪟
.\gradlew.bat :listing:jvmTest --rerun-tasks
-
macOS/Linux 🐧
./gradlew :server:run
-
Windows 🪟
.\gradlew.bat :server:run
-
macOS/Linux 🐧
./gradlew :composeApp:assembleDebug
-
Windows 🪟
.\gradlew.bat :composeApp:assembleDebug
-
macOS/Linux 🐧
./gradlew :composeApp:jvmRun -DmainClass=com.braiso_22.terracambio.MainKt --quiet
-
Windows 🪟
.\gradlew.bat :composeApp:jvmRun -DmainClass=com.braiso_22.terracambio.MainKt --quiet
-
Install Node.js 📦
-
Build Kotlin/JS shared code
-
macOS/Linux 🐧
./gradlew :shared:jsBrowserDevelopmentLibraryDistribution
-
Windows 🪟
.\gradlew.bat :shared:jsBrowserDevelopmentLibraryDistribution
-
-
Run the web app 🚀
npm install npm run start
Open /iosApp in Xcode and run it directly
✨ Learn more about Kotlin Multiplatform…