BookBinder
Architecture of an AI-powered digitization pipeline for turning raw scans into structured, offline-ready EPUB books.
Product Manager & Lead Prompt Architect
AI Content Digitization · SaaS
Overview
BookBinder is an end-to-end SaaS platform for readers, students, and creators who need faithful digital books instead of raw scanned PDFs. The product converts page images and document scans into clean markdown, compiles structured manuscripts, and delivers offline-ready EPUB outputs for mobile reading.
Architecture

Product & AI design
The core ingestion path uses Google Gemini to translate raw page images directly into markdown with strict output contracts. Prompts enforce clean body output and explicitly remove common noise such as page numbers, running headers, and footer artifacts.
To solve mid-sentence page breaks, the pipeline applies a sliding-window context strategy: the rolling tail of the previous page is injected as a delimited context block, then the model completes the next page without echoing prior context into the final output.
For full-manuscript refinement, an optional AI polish mode runs deterministic chunking, bounded parallel execution, and boundary repair passes to improve literary continuity while respecting token and context constraints.
System & offline UX
Large EPUB binaries are delivered through a backend bypass pattern. The frontend requests pre-signed S3 GET URLs, then downloads book bytes directly from AWS storage instead of proxying through the API layer. This keeps latency low and reduces backend egress overhead.
For offline reading, compiled files are cached locally via IndexedDB using localforage. Readers can open and continue books without re-downloading, even on unstable or disconnected mobile networks.
Mobile interface

Workspace
Raw scans and drafts in one place with project-level status tracking.

Library
Compiled books are organized for in-app reading and direct offline download.

Factory
Ingest pages, run AI polish, and generate a structured EPUB from clean markdown.