Decided to not go with a 100% shell implementation for server side on selling the ebook. For logging purchases to the database I've decided to go with C++ so I don't need to figure out how to avoid shell quoting problems while preventing injection attacks. That program, of course, is still called from a shell script.
CGI in bash: Let's be real, you don't need to scale.
If anybody wants to know what the inside of my upcoming coffee roasting book looks like, I have a few pages teased in this video: https://video.typica.us/videos/watch/1714545a-df96-4cfb-8beb-a2682a473b65
There's a bottom of the page with the page number that's not shown and it'll look better for most people as ImageMagick has some strangeness when it comes to converting PDF pages to PNG that a proper PDF reader wouldn't have.
Author of Typica software for coffee roasters.