Korpus

A Kotlin multiplatform project trying to create a smooth fullstack webapp development experience.

The Application uses Kotlin/Js on frontend and Kotlin/Jvm on backend,that uses kRPC with Ktor to communicate.

  • Ktor Server (Kotlin/Jvm)
    • kRPC
    • kotlinx-html
    • kotlinwind.css
  • Frontend (Kotlin/Js)
    • kRPC
    • react
    • emotion css
    • kotlinx-html
    • kotlinwind.css
  • Common code
    • kRPC
    • kotlinx-html
    • kotlinwind.css

Running frontend

To run frontend in development mode, run this command:

./gradlew frontend:jsRun

The client webpack app will start on port 3000 and it will route API requests to http://localhost:8080

Running server

To run server without compiling frontend, simply run main function in Application.kt from IDEA UI.

To Run server with latest frontend use this command:

./gradlew server:runApp

Note that this configuration uses production distribution of frontend app, which makes each build slower, as it takes more time to compile production webpack.