Substance is a web-based technology stack for collaborative document manipulation. Substance releases all building blocks as Open Source under an MIT license, so you can glue them together for your usecase.