I keep the metadata up to date, strip Kindle DRM from the books I buy from Amazon, and maintain a giant personal DRM-free collection of books and comics (which Calibre also handles!). It's one of my favorite pieces of software.
Calibre is an insane piece of software on its own. Pretty much the only Swiss Army knife you need for anything “epub”.
I have the library stored on my NAS and am running a fairly simple Node.JS + Express + React web app on my Raspberry Pi that reads the database and provides web access this content.
Sadly, I don’t have the code in a publisher format as of yet.
One thing I’ve been meaning to do is add an upload feature so that I can have the web app add ebooks to the library. For now, I still have to fire up Calibre for that.
Edit: Wow, I just saw a post below for Calibre-Web. It’s the same thing I had been working on but it’s much much nicer than what I had hacked together!
Here's the help page on setting up your own content server: https://manual.calibre-ebook.com/#the-calibre-content-server