Skip to content

Demo project built with Kotlin and Ktor applying Hexagonal Architecture.

Notifications You must be signed in to change notification settings

sergiocostaN26/ktor-demo

Repository files navigation

ktor-demo

This demonstration service exemplifies the application of domain-driven design and hexagonal architecture in modeling diverse use cases for scooter rental businesses. In this showcase, the Ktor framework has been employed to facilitate comparison with the well-established Spring services.

Prerequisites

  • Java 17
  • Docker

Installation

  1. Clone the repository
    git clone git@github.com:sergiocmgit/ktor-demo.git
  2. Build the image
    ./gradlew build
  3. Build the docker image
    ./gradlew buildImage
  4. Run the application
    ./gradlew runDocker

Test the endpoints

curl -X GET "http://localhost:8080/users"
curl -X GET "http://localhost:8080/scooters"
curl -X POST "http://localhost:8080/scooters/2/lock/A"
curl -X POST "http://localhost:8080/scooters/3/run/A"
curl -X POST "http://localhost:8080/scooters/1/run/B"
curl -X POST "http://localhost:8080/scooters/1/run/C"
curl -X POST "http://localhost:8080/scooters/4/run/A"
curl -X POST "http://localhost:8080/scooters/3/run/A"

About

Demo project built with Kotlin and Ktor applying Hexagonal Architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages