I am mocking up a website that will allow book reading. The website functionally works more like a blog, where you open the "book", then have a table of contents for the sidebar instead of blog categories.
The functionality of the website needs to be feature rich. They read one chapter at a time, and have previous and next buttons to go to the next chapters. Each chapter can be linked to, and sub-chapters therein. Individual chapters can have comments, as well as comments about the book as a whole.
There can be files attached to chapters as well. And the whole book can be exported as a PDF, or individual chapters printed out directly.
As you can see, I need to be able to do a lot of work with "chapters" almost as individual entities, like resources unto themselves.
I thought about having one book as a resource container and then each chapter as a sub-resource.
I thought about using the Collections addon to do something similar.
Neither of these seem best from the perspective of making exports, and the author making sweeping changes to the book. In other words, they have to edit each chapter individually, and it's not easy to blend chapters or rewrite things, add chapters, and make other global type edits.
Also I'm not sure how I could generate a PDF export via many resources. This is probably not the most difficult problem tho.
And I'm not sure how I would handle chapters having subchapters. Another Collection or container on the sub-item?
What I'd LIKE is that the main book is a single resource (perhaps they have lots of books?). Then a user loads this "page". Then through some magic, the chapters, links, comments, files and everything are dynamically parsed out from a master document that the author can edit as a whole without screwing up the front-end display.
I know it's a tall order! But there are lots of features needed here, like analytics on a per-chapter basis. Link counts for sharing and social, etc.
Due to the number of features I need to control, I don't believe a simple script to parse out a PDF or even a Markdown doc and generate some pagination will be good enough. The "pages" a user sees online are not arbitrary lengths, they will view an entire chapter, no matter how long it is, so I can't use generic paginators that split up pages by a static number of lines or words.
This almost feels more like a wiki, but with tighter control over individual "books" and chapters and sub-sections, and hierarchy. It will track authors, showing books by author and so forth. Most popular books, most comments, other stats.
I really don't know how I would organize this in the resource tree, but allow authors a way to edit their books and upload new versions on their own! This is not even covering the idea of doing revisions or handling source control! Like if an author "updates" their book every year, they might want to read past versions of the book, or do comparisons.
Is this even a job for MODX? Is this where I should be looking at advanced book formats like MOBI or EPUB?
Thanks for any ideas!