App development feedback needed

I am working on a draw.io app for nextcloud. I am struggling with the “right way” to do things. I have so far gotten a basic hook in place at http://bitbucket.org/geiseri/nextcloud_drawio but I am using some javascript APIs I found while spelunking through the source. As far as I can tell is they are not documented though. If people who write nextcloud apps could provide some feedback on my code that would be much appreciated. My big problem is that right now its using the external draw.io site in a new window to do the actual editing, but I would like to have it self host entirely on the nextcloud instance and operate inside of an iframe instead of a new window. Thanks for any feedback!