Replace the 11 hand-rolled model files with 7 grouped by concern. Typed ID value classes kill bare-string FKs. Canonical 3-value MeasurementUnit enum kills the runtime unitMismatch class — Polish vocabulary lives in Quantity.displayHint as render-only metadata. MealExtras (5 maps) collapses into IngredientCustomization + PlanCustomization. IngredientCategory and MealSlot become household-scoped entities with LocalizedString names so they're customizable without an app release. Display names land as LocalizedString from day one; no Polish strings in identifiers or wire codes. Recipe drops allowedSlots — slot affinity is a UI-layer match on Recipe.tags vs MealSlot.name. Skip is absence, not a sealed sibling. Plan: ~/.claude/plans/i-have-generated-some-inherited-conway.md. Covered by SerializationRoundTripTest: 12 assertions across typed-ID inlining, MeasurementUnit wire format, LocalizedString JSON shape, full PlanEntry round-trip with every customization kind, SyncMeta tombstone omission, and Catalog defaults handling. All targets compile and pass: JVM, Android (debug + release), iOS Simulator Arm64.
This is a Kotlin Multiplatform project targeting Android, iOS, and a JVM Ktor server.
-
/composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:
- commonMain is for code that is common to the mobile app targets.
- androidMain contains Android-specific app code.
- iosMain contains iOS-specific app code.
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name.
-
/iosApp contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
-
/server is for the Ktor server application.
-
/shared is for the code that will be shared between all targets in the project. The most important subfolder is commonMain.
sharedstill declares a JVM target because the Ktor server depends onprojects.shared; this does not mean the Compose desktop application target is enabled.
Build and Run Android Application
To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:
- on macOS/Linux
./gradlew :composeApp:assembleDebug - on Windows
.\gradlew.bat :composeApp:assembleDebug
Build and Run Server
To build and run the development version of the server, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:
- on macOS/Linux
./gradlew :server:run - on Windows
.\gradlew.bat :server:run
Build and Run iOS Application
To build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.
Local development
The server requires Postgres. A docker-compose.yml at the repo root ships a local Postgres
instance whose credentials match application.conf defaults (recipe/recipe/recipe).
Boot the database and server:
docker compose up -d postgres
./gradlew :server:run
Verify the server is up:
curl http://localhost:8080/health
# expected: {"status":"ok"}
Environment overrides (optional — set any of these to override application.conf defaults):
DATABASE_URL— JDBC URL (defaultjdbc:postgresql://localhost:5432/recipe)DATABASE_USER— DB user (defaultrecipe)DATABASE_PASSWORD— DB password (defaultrecipe)PORT— Ktor port (default8080)
Before committing, format all Kotlin + Gradle + Markdown files:
./gradlew spotlessApply
The full check (Spotless + all tests across all targets):
./gradlew check
Reset the local database (destroys the recipe-pgdata volume):
docker compose down -v
Learn more about Kotlin Multiplatform and Compose Multiplatform.