I'm working on some software in this area (
https://www.penflip.com/). A book is a basic git repository holding a collection of markdown files and images, which are compiled into PDF/epub/html with a single click in the browser. There's a web UI that essentially wraps git functionality, which has proven useful for collaborating with (and receiving feedback from) non-technical people. It's pretty simplified.
Several open sourced tools are used behind the scenes, including some mentioned here (e.g. pandoc).