What is missing in BMM is a very simple representation to work with in frontends, that can be serialized to JSON.
So what we do to make BMM work in javascript is to define a very simple JSON representation of a fully processed BMM model, and send that to the clients. It’s just three classes, model, class and property, with only a limited number of fields and that’s enough to represent everything we need in our modelling tool frontend. I might be able to share the full model for the OpenEHR BMM files if anyone is interested. It’s not as fancy as the original model, but it’s simple, it works and it contains what you actually need, and not much more.
However when creating actual RM instances in javascript, we don’t bother with BMM, and just write the logic we need in that place. If you need typescript, there’s an openAPI spec + generator that should be able to generate everything you need, plus JSON bindings, at https://github.com/nedap/openehr-openapi .