A free, local-first workbench for reading, organizing, inspecting, repairing, searching, annotating, and exporting EPUB and PDF publications.
EPUB/PDFを読む・整理する・検索する・注釈する・検査する・修復する・変換するための、無料・ローカルファースト電子書籍ワークベンチ。
ReflowPress bridges document reading, library organization, publication health inspection, safe repair, and high-fidelity document conversion into an integrated, offline-first personal electronic book environment.
Important
ReflowPress 1.0.0 — Stable Release (2026-10-28). All 10 milestones (0.1 through 1.0) are fully implemented: desktop reader GUI, library catalog, reading tools, Japanese typography & accessibility, export workbench, quality diagnostics & safe repair, interoperability & sync, and 1.0 release hardening with crash recovery, forward schema safety, and Windows and Linux packaging.
- Milestone 0.1 (Foundation): Complete
- Milestone 0.2 (Publication Core): Complete (Implements
EpubLoader&loadEpub, shared archive parser, EPUB 2/3 navigation normalization, safe XHTML content extraction, auxiliary resources loading, resource boundaries, and DRM detection; verified by 36 unit tests). - Milestone 0.3 (Reader MVP): Complete (Implements
@reflowpress/readerand@reflowpress/desktopapplication shell with Electron 33, React 19, Vite, PDF.js, reflowable EPUB iframe isolation, XHTML sanitizer, native PDF viewing, TOC drawer, keyboard/page stepping, Light/Dark/Sepia themes, typography controls, atomic reading position persistence, and Playwright desktop E2E tests). - Milestone 0.4 (Library MVP): Complete (Implements
@reflowpress/librarydomain package, recursive local directory scanner with incremental indexing, versioned atomic JSON catalog persistence with corrupt file quarantine, EPUB cover extraction and caching, Grid/List catalog views, multi-field search, collection/shelf organization, and Playwright desktop E2E tests). - Milestone 0.5 (Reading Tools): Complete (Implements
@reflowpress/annotationsdomain package,@reflowpress/searchin-book search engine for EPUB and PDF, W3C Web Annotation compliant hybrid locators, multi-color text highlights, bookmarks, margin notes, versioned atomic JSON annotation persistence with corrupt quarantine, portable Markdown/HTML/JSON export and import, drawer UI, floating selection toolbar, hotkeys, and Playwright desktop E2E tests). - Milestone 0.6 (Japanese Typography & Accessibility): Complete (Implements
@reflowpress/typographydomain package, Chromium standards-based CSS Writing Modes (vertical-rl), strict kinsoku line breaking, native<ruby>presentation, Tate-chu-yoko numeral alignment with non-destructive auto-assist, axis-aware keyboard and column progression, WCAG 2.2 AA accessibility baseline with full keyboard focus management, focus trap and restoration for dialogs, polite ARIA live announcements, high contrast and forced-colors support, reduced motion preferences, automated axe-core accessibility regression testing, and Playwright desktop E2E tests). - Milestone 0.7 (Export Workbench): Complete (Implements
@reflowpress/export,@reflowpress/cli, ADR 0007 Playwright Chromium headless rendering with strict network offline isolation, standalone HTML export with Data URL asset inlining, GFM Markdown export with YAML frontmatter and rubybase(reading)transliteration, deterministic timestamp naming<stem>_<YYYYMMDD-HHmmss>.<ext>, collision resolution-001..-999, transactional atomic writing, bounded concurrency batch exporting, headless CLIreflowpress export, and Playwright CLI E2E tests). - Milestone 0.8 (Quality & Repair): Complete (Implements
@reflowpress/qualitydiagnostic rule engine for EPUB and PDF, stable rule catalogEPUB-*andPDF-*, deterministic sorting and deduplication, PDF Quality Gate evaluation profilesbaselineandreader-export,@reflowpress/repairsafe non-destructive repair engine with canonical uncompressed mimetype rewriting, manifest media-type correction, standardcontainer.xmlcreation, transactional staging with pre/post re-inspection verification,.provenance.jsonsidecar generation, headless CLI subcommandsreflowpress inspect,validate,repair, Desktop Health & Safe Repair modal with WCAG 2.2 accessibility, 3-Tier Golden Master regression framework, 167 unit tests, and 26 Playwright E2E tests). - Milestone 0.9 (Interoperability): Complete (Implements
@reflowpress/opdswith OPDS 2.0 streaming catalog and loopback server,@reflowpress/syncwith 3-way merge engine, portable backup bundles, shared folder sync, and WebDAV RFC 4918 adapter,@reflowpress/devicewith physical e-reader detection for Kindle, Kobo, PocketBook, and Generic USB storage, EPUB 3.3 Media Overlays SMIL parser, headless CLI subcommandsopds,sync,backup,restore,device, desktop Interoperability modal with WCAG 2.2 AA accessibility, 213 unit tests, and 27 Playwright E2E tests). - Milestone 1.0 (Stable Release): Released as
v1.0.0(Release hardening, crash recovery protocol with clean shutdown markers, atomic write temp janitor, forward schema migration framework andUpgradeRequiredError, renderer code-splitting and bundle budgets, Windows and Linux packaging withelectron-builder.yml, release CI pipeline, and comprehensive user and troubleshooting manuals).
ReflowPress shares one single Publication Core between document reading, document export, and interoperability, preventing duplicate parsing logic.
flowchart TD
SOURCE[EPUB / PDF File]
subgraph INSP_SUB[Inspection & Health Pipeline]
INSPECTOR[Inspector<br/>implemented for EPUB]
HEALTH[Health Report<br/>implemented for EPUB]
end
subgraph CORE_SUB[Publication Core]
LOADER[EpubLoader<br/>implemented]
PUB_MODEL[Publication Model<br/>implemented]
NORMALIZED[NormalizedPublication<br/>implemented]
end
subgraph CONSUMER_SUB[Application Features & Engines]
READER[Reader Engine<br/>implemented in 0.3]
ANNOTATION[Annotation Store<br/>implemented in 0.5]
LIBRARY[Library Catalog<br/>implemented in 0.4]
SEARCH[Search Index<br/>implemented in 0.5]
EXPORT[Export Engine<br/>PDF / HTML / Markdown<br/>implemented in 0.7]
VALIDATION[Validation Gate<br/>Baseline PDF in 0.7 / Quality Gate in 0.8]
INTEROP[Interoperability & Sync<br/>OPDS / Sync / Device<br/>implemented in 0.9]
end
SOURCE --> INSPECTOR --> HEALTH
SOURCE --> LOADER --> PUB_MODEL --> NORMALIZED
NORMALIZED --> READER
READER --> ANNOTATION
ANNOTATION --> LIBRARY
NORMALIZED --> SEARCH
NORMALIZED --> EXPORT
EXPORT --> VALIDATION
LIBRARY --> INTEROP
NORMALIZED --> INTEROP
See the Architecture v2 Document and Diagram Notes for full subsystem details.
import { loadEpub } from "@reflowpress/epub";
const publication = await loadEpub("./book.epub");
console.log("Title:", publication.metadata.title);
console.log("Version:", publication.version);
console.log("Chapters:", publication.readingOrder.length);
console.log("TOC Items:", publication.navigation?.length);
console.log("Assets:", publication.resources.length);import { inspectEpub } from "@reflowpress/epub";
const inspection = await inspectEpub("./book.epub");
console.log("Package Path:", inspection.packagePath);
console.log("Title:", inspection.metadata.title);
console.log("Manifest Items:", inspection.manifest.length);
console.log("Spine Itemrefs:", inspection.spine.length);The inspector evaluates archive validity, verifies internal OPF references, checks that manifest resources exist in the archive, and enforces configurable safety caps (archive bytes, entry counts, XML document limits) without extracting files to disk.
- Free and open source: Licensed openly and community-auditable.
- Local-first: Books, catalogs, notes, and indexes stay on your local disk.
- Account optional: No mandatory sign-in, cloud accounts, or subscriptions.
- Standards-first: Compliant with EPUB 2/3, PDF (ISO 32000), HTML5, and CSS standards.
- No DRM circumvention: We respect legal boundaries; DRM files are safely detected, explained, and treated as unsupported.
- Reader and converter share one Publication Core: Unified data model eliminates duplicate parsers.
- Never silently corrupt a publication: Malformed input is surfaced transparently.
- Inspect before repair: Factual diagnostics always precede remediation.
- Non-destructive edits by default: Original books remain untouched; repairs and exports generate separate files.
- Automated repairs must be explainable and reversible: Every repair diff is previewable, and the original file is never modified, so discarding the
_repaired_output reverts a repair. - Quality is a product feature: Built-in verification gates guarantee document fidelity.
- AI is optional: 100% usable in offline, air-gapped environments without AI.
- Privacy by default: Zero telemetry, zero analytics tracking, zero silent network calls.
- Accessibility is a first-class requirement: Keyboard navigation, ARIA semantics, and contrast ratios are core design requirements.
Read the complete Product Vision and ADE Compatibility Matrix.
| Milestone | Scope | Status |
|---|---|---|
| 0.1 Foundation | Monorepo, contracts, CI, and Phase 1 EPUB Inspector | Complete |
| 0.2 Publication Core | EPUB Loader, resources, reading order, navigation, normalization | Complete |
| 0.3 Reader MVP | Reflowable EPUB rendering, PDF viewing, TOC, reading position, themes | Complete |
| 0.4 Library MVP | Local directory scan, covers, metadata catalog, collections, sorting | Complete |
| 0.5 Reading Tools | In-book search, bookmarks, highlights, notes, portable annotation export | Complete |
| 0.6 Japanese & A11y | Vertical Japanese (vertical-rl), ruby, kinsoku, keyboard nav, screen-reader |
Complete |
| 0.7 Export Workbench | EPUB to PDF (timestamp naming), HTML, Markdown, batch CLI | Complete |
| 0.8 Quality & Repair | Diagnostic health suite, non-destructive safe repair, PDF Quality Gate | Complete |
| 0.9 Interoperability | OPDS 2.0 streaming, multi-device 3-way sync, physical e-readers, Media Overlays | Complete |
| 1.0 Stable Release | Native installers, crash recovery, performance optimization, API freeze | Complete |
Read the full milestone descriptions in docs/roadmap.md.
ReflowPress provides a headless CLI (reflowpress) for offline, automated publication operations:
# Export an EPUB to PDF (default format)
reflowpress export book.epub --format pdf --output-dir ./dist
# Inspect publication health & Media Overlays
reflowpress inspect book.epub --json
# Validate exported PDF against quality gates
reflowpress validate exported.pdf --profile reader-export
# Safely repair EPUB package defects
reflowpress repair book.epub --apply --output-dir ./repaired
# Run local OPDS 2.0 catalog streaming server
reflowpress opds serve --port 3000 --catalog ./library.json
# Synchronize library with a Syncthing/Dropbox shared folder
reflowpress sync folder --target /Volumes/SyncFolder --catalog ./library.json
# Export portable backup bundle
reflowpress backup --output ./my-backup.json
# Detect connected e-reader devices (Kindle, Kobo, PocketBook)
reflowpress device list --target /Volumes/KOBOeReader
reflowpress device send /Volumes/KOBOeReader book.epubBuild the monorepo and launch the Electron application:
pnpm install
pnpm build
npx electron apps/desktop/dist/main/main.jsOr open a book directly:
npx electron apps/desktop/dist/main/main.js --open path/to/book.epubRequires Node.js >= 22.13.0 and pnpm >= 11.25.0:
pnpm install
pnpm lint
pnpm typecheck
pnpm test
pnpm test:cli
pnpm build
pnpm test:e2e- ADR 0001: Layered Publication Pipeline
- ADR 0002: Product Reboot to Local-First Ebook Workbench
- ADR 0003: Desktop Reader Runtime (Electron + React + Vite + PDF.js)
- ADR 0004: Library Persistence Architecture and Repository Abstraction
- ADR 0005: Annotation Locators, Selectors, and Storage Architecture
- ADR 0006: Japanese Typography and Accessibility Architecture
- ADR 0007: Export Rendering Pipeline (Playwright Chromium Headless)
- ADR 0008: Publication Quality Diagnostics and Safe Repair
- ADR 0009: Interoperability, Synchronization, and Device Architecture
- ADR 0010: Stable Runtime, Crash Recovery, and Release Hardening