Spring Petklinik is a Kotlin fullstack variant of the original Spring Petclinic.
Key characteristics:
- Kotlin/Wasm for the frontend instead of JavaScript or TypeScript
- Most of the rendering is still done on server-side, but some dynamic parts are implemented on client-side (validation or dynamic update of some pages like the owner search result)
- Kotlin multiplatform support to share code between Kotlin/Wasm and Kotlin/JVM using a shared module
- Spring Boot 4 and Spring Framework 7 with its new bean registration DSL combined with the web router DSL
- kotlinx.html for type-safe template rendering (hopefully later replaced by a first class Compose HTML support)
- Virtual Threads
- OpenAI interactions implemented in a distinct application based on Spring AI
- CDS Buildpack support used to speedup containers startup
- JDK 17+ (can be installed via SDKMAN!)
- Docker
- Optional: an OpenAI key for the image generation service
To run just the Petklinik application in development mode:
- Run
./gradlew :backend:bootRun - Go to
http://localhost:8080
To run all services in production mode:
- Run
./gradlew clean build bootBuildImage - Define an
OPENAI_API_KEYenvironment variable - Run
docker compose --profile all up - Go to
http://localhost:8080

