Funny, currently building some of this as a plugin with a client atm. I’ve asked the client already if they want to open source it, but they aren’t ready to do so yet. Be happy to reply here when it is finally open sourced.
It’s certainly not trivial.