Holy crap this is almost exactly what I was trying to go for in my own language.
https://ar-ms.me/projects/quince/
I must check this in depth and steal ideas.