[USE CASE] Defining shared domain models in Kotlin for cross platform use

Wondering if anyone out there is using Kotlin for defining their organization’s domain models (entities) in pure Kotlin to serve as the source of truth. Think the definition of Customer & Order classes used across jvm, browser js, maybe a kafka stream for a report view.

I’ve seen very simple examples of this with no nesting of complex types. Curious if anyone is doing this at scale/ org-wide.

The problem/ use case im describing could be solved with a schema management framework like Avro, protobuf (which can generate platform specific model classes) – just noting this because im sure it will come up in comments

submitted by /u/nolessan
[link] [comments]