This is a sample Compose Multiplatform for desktop project accompanying the KotlinConf 2025 talk for the Exposed library. It mimics a simplified project-issue tracker model, reminiscent of YouTrack.
- 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 Ktor server application in the
backend-jdbc
module - See details about the Ktor HttpClient in the
composeApp/commonMain/../client
package
- See details about the Ktor server application in the
- Once the server has started, run
Main.kt
from thecomposeApp/desktopMain
: taskmain [desktop]
Note that the default data access approach is set to the Domain Specific Language (DSL) approach.
This can be changed to the Data Access Object (DAO) approach in application.conf
by commenting out the desired dataAccess
property.
Note that the server will automatically shut down as a part of the application exit process.
Note
docker-compose.yml
is set up by default to use a PostgreSQL JDBC driver. The correct Dockerfile must be added to properly use the PostgreSQL R2DBC driver instead.
- In
docker-compose-yml
, make sure thebackend/build
argument is set todockerfile: Dockerfile.r2dbc
- 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 Ktor server application in the
backend-r2dbc
module - See details about the Ktor HttpClient in the
common/commonMain/../client
package
- See details about the Ktor server application in the
- Once the server has started, run
Main.kt
from thecomposeApp/desktopMain
: taskmain [desktop]
Note
Use of exposed-dao
is not currently supported with exposed-r2dbc
, so only a DSL approach is provided.
Note
Geography & TsVector types are not yet supported by the PostgreSQL R2DBC driver, so attempting to set or search by location, or to use full text search queries, will be ignored by the app if run using R2DBC.
Note that the server will automatically shut down as a part of the application exit process.