Skip to content

kdomskia/sample-pesto

Repository files navigation

Kdomskia - Pesto

Banner

This is a Kotlin Multiplatform project targeting Android, iOS, Web (DOM, JS), Desktop (JVM), and Server (Spring Boot).
It is powered by Kdomskia to unify UI across platforms.

Project Structure

  • /composeApp contains the UI and shared code for your applications.
    It includes several source sets:

  • /iosApp contains the iOS application entry point. Even when sharing UI with Compose Multiplatform,
    you need this module for iOS integration. SwiftUI code can also be added here if required.

  • /server contains the Spring Boot server application.

  • /shared contains code that is shared across all modules (backend and frontend).
    The most important subfolder is commonMain. Platform-specific folders can also be used if needed.

Setup

Before running the project, make sure to configure the BASE_URL in:

composeApp/src/commonMain/kotlin/io/kdomskia/sample/pesto/data/http/HttpClient.kt

Set it to the local IP address of the server you intend to run. For example:

//Local Server
private val BASE_URL = "http://192.168.0.1:8080"
//Public Kdomskia Pesto API
private val BASE_URL = "https://api.pesto.kdomskia.io"

Build and Run Server

To build and run the development version of the server (Spring Boot), use the run configuration from the IDE toolbar
or run it directly from the terminal:

  • on macOS/Linux
    ./gradlew :server:bootRun
  • on Windows
    .\gradlew.bat :server:bootRun

Build and Run Android Application

To build and run the development version of the Android app, use the run configuration from the IDE toolbar
or run it directly from the terminal:

  • on macOS/Linux
    ./gradlew :composeApp:assembleDebug
  • on Windows
    .\gradlew.bat :composeApp:assembleDebug

Build and Run Desktop (JVM) Application

To build and run the development version of the desktop app, use the run configuration from the IDE toolbar
or run it directly from the terminal:

  • on macOS/Linux
    ./gradlew :composeApp:run
  • on Windows
    .\gradlew.bat :composeApp:run

Build and Run Web Application

To build and run the development version of the web app (JS, DOM), use the run configuration from the IDE toolbar
or run it directly from the terminal:

  • on macOS/Linux
    ./gradlew :composeApp:jsBrowserDevelopmentRun
  • on Windows
    .\gradlew.bat :composeApp:jsBrowserDevelopmentRun

Build and Run iOS Application

To build and run the development version of the iOS app, open the /iosApp directory in Xcode
and run it from there. You can also use the run configuration from the IDE toolbar.

Hot Reload

You can check your layout changes without building the whole project with Compose Hot Reload.

To use it, open the Main class inside the desktopMain source set and click on Run composeApp with Compose Hot Reload in your IDE (IntelliJ IDEA or Android Studio).

Simply save the file you are working on, and the running application will be updated automatically.

For more details, see the official JetBrains documentation: Hot Reload in Compose Multiplatform

Credits

This app’s design system is derived from the Material 3 Figma prototype published for Flutter Forward 2022: Material 3 from design to deployment.

Check the Figma prototype.


Learn more at:

About

Kdomskia full working sample targeting Android, iOS, Web (DOM, JS), Desktop (JVM) and Server (Spring Boot).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages