This is a sample Compose Multiplatform for desktop project accompanying the KotlinConf 2026 lightning talk:zap: for the Exposed library.
It stores oscillator patterns discovered as part of John Conway's Game of Life, and allows them to be run in simulation mode using multiple stored rule sets.
- Simulation mode that allows stepping through generations or running (at the selected interval) indefinitely, or until no cells remain.
- Simulation screen is zoomable (via scroll), draggable (via secondary button), cells are toggleable, and it comes with optional gridlines.
- Cells can optionally have their generational colors enabled, so you can see which cells are the oldest alive.
- Analysis mode allows you to select any number of patterns, as well as up to 3 rule sets at a time. Running in this mode stores the generational data for each pattern per rule, so it can be visualized in real-time as the birth rate of cells per generation.
- Analysis screen comes with a summary page that performs various static queries related to the state of discoverers and patterns, then presents the results as various graphs, rendered tables, and query plans.
- Run Ktor Gradle task
buildFatJar - Run
docker compose up - The server responds at http://127.0.0.1:8080 to check routes, if needed.
- See details about the Exposed database repository in the
databasemodule - See details about the Ktor server application in the
servermodule - See details about the Ktor HttpClient in the
clientmodule
- See details about the Exposed database repository in the
- Once the server has started, run
Main.ktfrom thecomposeApp/desktopMain: taskcomposeApp [desktop]
Note The server will automatically shut down as a part of the application exit process, by closing the window.
All resources will be additionally cleaned up, including any plot files generated by the data summary screen.
These steps will not happen if the composeApp [desktop] task is stopped separately, without going through the cleanup process.
- Kotlin 2.3.+
- Exposed 1.3.+ (+ plugin)
- Ktor 3.4.+ (Server + Client)
- Kotlin DataFrame 1.0.0-Beta5 (Gradle + plugin)
- Kandy 0.8.3
- Let's Plot (multiple)
- Compose Multiplatform 1.10.+ (desktop)
- PostgreSQL 18 (JDBC)
- HikariCP 7.+




