Lorefnon , complete stack is as follow:
Frontend: Angular Dart
All the Kotlin data transfer objects that are used to POST / PUSH data to and from frontend and backend are transpiled into Dart classes with a custom transpiler I've built. Using the new Kotlin multiplatform / common functionality with React, you shouldn't need to do this since you can re-use your Kotlin data transfer objects between pure Kotlin and KotlinJS.
Backend: Kotlin
For REST access, I'm using Vert.X with a custom Kotlin wrapper around it that ensures all the methods I'm calling are Kotlin methods and not Java methods, this ensures null safety on the Vert.X library and Kotlin ensures that Vert.X methods are getting the right inputs. There's been a new release of VertX with native Kotlin endpoints and methods which should already do what I did here (haven't tried it though).
For ORM, I'm using Hibernate - I know it's bloated and humungous, but it's the only ORM that has everything I need for all databases these systems needs to run on. Just like in the VertX case, I've written custom helper lambdas and methods to ensure null safety. (there are pure Kotlin ones now that are maturing well, so might not need Hibernate in the future)
One of the helper lambdas, transaction, looks like this when used:
val myEntity = transaction { em ->
em.persist(SomeEntity(field1 = "foo", field2 = "bar"))
}
and voila, you have created a new SomeEntity object, added two values to it, persisted it and returned it outside the transaction.
For JSON, I'm using Jackson with some Kotlin extensions:
fun Any.toJson(pretty: Boolean = false): String =
if (pretty) Json.encodePrettily(this) else Json.encode(this)
inline fun <reified T : Any> String.fromJson(): T =
Json.decodeValue(this, T::class.java)
This allows me to just go myObject.toJson() or someJsonString.fromJson<ObjectType>() to convert back from JSON String to object.
Other Java libs that are used, we simply write Kotlin wrappers for or use extension functions to make them more useful and automatically make Kotlin's null safety kick in.