Skip to content

Add Kotlin Web (Ktor & KotlinJS) examples (1650USD Bounty) #3611

@lihaoyi

Description

@lihaoyi

From the maintainer Li Haoyi: I'm putting a 1650USD bounty on this issue, payable by bank transfer on a merged PR implementing this.


The goal of this ticket is to implement support for example/kotlinlib/web example tests for using Kotlin for web development, mirroring the example/javalib/web and example/scalalib/web, and support for KotlinJS in the spirit of scalajslib/. I would want the following example tests, broken down into smaller groups each with its own bounty:

650USD:

  • example/kotlinlib/web/1-hello-ktor
    • A hello-world example using Kotlin and KTor to set up a web server serving a single "<h1>Hello, World!</h1>" web page, in the spirit of example/javalib/web/2-hello-spring-boot
  • example/kotlinlib/web/2-todo-ktor
    • An implementation of the common TodoMVC demo application, including HTML templating, JS/CSS resources, database access and unit/integration/runBackground+curl tests, in the spirit of example/javalib/web/3-todo-spring-boot

650USD:

  • example/kotlinlib/web/3-kotlinjs-module (325USD)
    • How to define a simple KotlinJS module that can be compiled to Javascript, testing, and run using node, in the spirit of example/scalalib/web/3-scalajs-module
  • example/kotlinlib/web/4-webapp-kotlinjs (325USD)
    • How to wire up a KotlinJS module with a Kotlin/Ktor server to serve the generated Javascript, in the spirit of example/scalalib/web/4-webapp-scalajs

700USD:

  • example/kotlinlib/web/5-webapp-kotlinjs-shared (350USD)
    • How to implement code sharing between a JVM KTor server and a KotlinJS javascript module, such that common code and utilities can be used by both. In the spirit of example/scalalib/web/5-webapp-scalajs-shared,
  • example/kotlinlib/web/6-cross-platform-publishing (350USD)
    • How to define a library with both Kotlin-JVM and Kotlin-JS versions and publishing it to maven central. In the spirit of example/scalalib/web/6-cross-version-platform-publishing
    • Moving this to a separate bounty

Each of these examples above has a corresponding javalib/scalalib equivalent, and it should generally follow the style of those equivalents (scope, testing, etc.) but translated to Kotlin (Java/Scala -> Kotlin, Scalajs -> Kotlinjs, Cask/SpringBoot -> KTor, etc.)

For now the Kotlin-JS logic should live in kotlinlib/ together with the rest of the kotlin-specific configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bountyThe fix/close of this issue is rewarded with a bounty

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions