Skip to content

Repository files navigation

🔬🧫 LFAW - Life Finds a Way

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.

Demo of LFAW app

Features

  • 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.
LFAW app UI interation options
  • Cells can optionally have their generational colors enabled, so you can see which cells are the oldest alive.
LFAW app running with generational colors enabled
  • 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.
LFAW app running in analysis mode
  • 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.
LFAW app summary screen with data plots

🦖☣️ FLAW

Coming Soon

Run Desktop Application

  • 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 database module
    • See details about the Ktor server application in the server module
    • See details about the Ktor HttpClient in the client module
  • Once the server has started, run Main.kt from the composeApp/desktopMain: task composeApp [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.

Stack Used

  • 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.+

About

👾 Game of Life desktop simulator & analyzer backed by Exposed and Ktor

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages