How larroyo3/kmpsampleproject works
Main Components
A. Platform-Specific UI Layer
• Android UI (Jetpack Compose)
• iOS UI (SwiftUI)
B. Shared UI Layer (Compose Multiplatform)
• Common UI components
• Shared resources
C. Shared Business Logic Layer
• Common code
• Platform-specific implementations
• Data models
• Business rules
┌─────────────────────────────────────────────────────────────┐
• Platform-Specific UI │
• ┐ ┌────────────────────────┤
• Android UI Layer │ │ iOS UI Layer │
• (Jetpack Compose) │ │ (SwiftUI) │
• ┬───────────┘ └───────────┬────────────┘
• ▼ ▼
┌─────────────────────────────────────────────────────────────┐
• Compose Multiplatform Layer │
• (Shared UI Components & Resources) │
• ┬─────────────────────────────────┘
• ▼
┌─────────────────────────────────────────────────────────────┐
• Shared Business Logic Layer │
• ┤
• ┌─────────────┐ ┌──────────────┐ ┌────────────────────┐ │
• Models │ │ Components │ │ Platform-Specific │ │
• (RocketLaunch│ │ (Rocket │ │ Implementations │ │
• NewYear) │ │ Component) │ │ │ │
• ┘ └──────────────┘ └────────────────────┘ │
• ┘
Component Relationships
• Data flow between layers (top to bottom for UI events, bottom to top for data updates)
• Dependencies between components
• Platform-specific implementations
Important Details
• The separation between composeApp, shared, and iosApp modules
• The common code in commonMain directories
• Platform-specific implementations in androidMain and iosMain
• Resource sharing mechanisms
• Key components like RocketLaunch, NewYear, and RocketComponent
Technical Stack Indicators
• Kotlin Multiplatform
• Jetpack Compose
• SwiftUI
• Kotlin Coroutines
• Ktor