Book is a browser-based interactive reading experience that loads chapter fragments from a manifest and layers chapter-specific styling, motion, audio, and particle effects.
- Manifest-driven chapter loading from
chapters/index.json - Chapter-specific themes (color, gradients, transitions, background layers)
- Crossfaded background music with line-aware cue transitions
- Optional ambient audio layer support
- Particle presets per chapter using
tsparticles-slim - Scroll-based motion using GSAP + ScrollTrigger
- Optional Giscus discussion embed
- Install dependencies:
npm install- Start a local HTTP server (required for
fetch()chapter loading):
python -m http.server 8080- Open the app:
npm run buildcompiles the full-stack platform servernpm startruns the Node server that serves the reader,/admin, and JSON APIsnpm testruns full chapter validation (manifest + chapter checks + formatting lint)npm run validate:chaptersruns full chapter validationnpm run validate:manifestvalidateschapters/index.jsonnpm run lint:chapterschecks chapter HTML for inline stylesnpm run convert:chaptersconverts source.docxfiles via Mammothnpm run platform:migrateapplies Postgres schema migrationsnpm run platform:seed-contentseeds current static chapters into Postgresnpm run platform:fullstack-smokeverifies the full-stack reader/admin API path
The live admin editor requires the Node server plus Postgres. render.yaml defines a managed Node deployment with a Postgres database and persistent audio asset disk. On startup, the server applies migrations, bootstraps the admin account from ADMIN_EMAIL / ADMIN_PASSWORD, seeds current static chapters when the database is empty, and serves:
/reader UI/adminauthenticated admin editor/api/reader/*published content APIs/api/admin/*protected editing and audio APIs
See docs/operations.md for release checks, migration/seed commands, backups, restore steps, and security notes.
- Convert
.docxinputs to raw HTML withtools/convert-chapters.cjs. - Curate chapter fragments into
chapters/chNN.html. - Register chapter entries in
chapters/index.json. - Run
npm testbefore committing.
index.htmlapp shellscript.jsclient runtime and chapter orchestrationstyles.cssvisual system and chapter theme styleschapters/chapter fragments, manifest, and chapter configassets/audio and media assetstools/conversion and validation scripts.planning/project planning and implementation notes
- Ambient/parallax assets are optional. If no media file is configured, the app uses gradient fallbacks and no ambient playback.
- Giscus configuration is managed in
chapters/config.jsunderSITE_CONFIG.giscus.