Create custom Moddle on diagram-js

What problem are you trying to solve with a custom moddle? Generally, you do not need a moddle if you only use diagram-js for rendering, but it might be worth it if you want to persist your data in XML. Note that you can also use your own meta-model to store info and don’t necessarily need to commit to moddle.

You can check the moddle repo on a description on how to create a meta model: GitHub - bpmn-io/moddle: Meta-model based data structures for those who need it

It might also be worth checking out how other Libraries deal with custom moddles, such as postit-js. You can find other projects built upon diagram-js linked in the readme.