We’re planning a new Kotlin backend (server) / frontend (UI) project. The data models in the backend are written in pure Kotlin (as data classes), and we’d like to also use these data classes in the frontent. So to avoid code duplication, the idea was to leverage Kotlin JS to transpile the Kotlin data classes to JS / TypeScript.
Then, the plan is to make JS developers use the code generated by Kotlin JS to actually develop the frontend UI. However, we’d also like to enable “pure Kotlin” developers that have no clue about JS to contribute to the frontend UI. Ideally, these developers could just continue writing Kotlin code which gets transpiled to JS just like the data model classes.
My main question is, is such a “hybrid” setup where both native JS developers and pure Koltin developers work on the same frontend UI code a feasible thing to do? Does anyone have an example project setup that deals with the required mix of generated and hand-written code?