Sounds like an interesting project. I don't think that there are many existing libraries for diagramming applications. But you should definitely check out mxGraph which powers diagrams.net (previously draw.io).