|
| 1 | +# Tome |
| 2 | + |
| 3 | +A self-hosted ebook library server. Scan, upload, browse, and read your entire collection from any device. |
| 4 | + |
| 5 | +Built with FastAPI, React, and SQLite. Ships as a single Docker image. |
| 6 | + |
| 7 | +> **Early release** -- actively developed, expect rough edges. |
| 8 | +
|
| 9 | + |
| 10 | +*Continue reading where you left off. Track streaks, pages, and reading time at a glance.* |
| 11 | + |
| 12 | +## Highlights |
| 13 | + |
| 14 | +- **Built-in reader** -- EPUBs, manga (CBZ/CBR), and PDFs render directly in the browser. Two-page spread, RTL mode, webtoon scroll, pinch-to-zoom on mobile. [Details](docs/reader.md) |
| 15 | +- **KOReader sync** -- custom TomeSync plugin syncs reading positions and sessions, works fully offline. [Details](docs/koreader-plugin.md) |
| 16 | +- **Bindery** -- an inbox for incoming books. Drop files in a folder, review pre-filled metadata, accept into your library. [Details](docs/bindery-deployment.md) |
| 17 | +- **Metadata from 3 sources** -- fetch and compare metadata from [Hardcover](https://hardcover.app), Google Books, and OpenLibrary with a side-by-side diff UI |
| 18 | +- **OPDS feed** -- browse and download from [KOReader](https://koreader.rocks), Panels, Chunky, or any OPDS client |
| 19 | +- **Reading stats** -- session tracking, streaks, time-of-day heatmaps, and charts |
| 20 | +- **9 themes** -- light, dark, Catppuccin (4 flavors), Nord, Neon, 8-bit |
| 21 | + |
| 22 | +Plus: series browsing, bulk operations, libraries with icons, saved filters, Quick Connect (6-char code sign-in), OPDS PINs (e-ink-friendly passwords), granular user permissions, audit logging, and a bulk import script. [Full feature list](docs/features.md) |
| 23 | + |
| 24 | + |
| 25 | +*Filter, sort, and browse your library. Bulk select for metadata edits, library assignment, or export.* |
| 26 | + |
| 27 | + |
| 28 | +*Drill into a series to see every volume, track progress per book, and pick up where you stopped.* |
| 29 | + |
| 30 | + |
| 31 | +*Full metadata view with cover, description, tags, and one-click reading.* |
| 32 | + |
| 33 | + |
| 34 | +*All your series at a glance with volume counts and descriptions.* |
| 35 | + |
| 36 | + |
| 37 | +*Reading activity, streaks, session history, and time-of-day patterns.* |
| 38 | + |
| 39 | +### Mobile |
| 40 | + |
| 41 | +Tome works as a PWA on mobile. Pin it to your home screen for a native app feel. |
| 42 | + |
| 43 | +| | | | | | |
| 44 | +|---|---|---|---|---| |
| 45 | +|  |  |  |  |  | |
| 46 | + |
| 47 | +## Quick Start |
| 48 | + |
| 49 | +```bash |
| 50 | +docker run -d \ |
| 51 | + -p 8080:8080 \ |
| 52 | + -v /path/to/data:/data \ |
| 53 | + -v /path/to/ebooks:/books:ro \ |
| 54 | + -v /path/to/bindery:/bindery \ |
| 55 | + -e TOME_SECRET_KEY=changeme \ |
| 56 | + ghcr.io/benedictpetutschnig/tome |
| 57 | +``` |
| 58 | + |
| 59 | +Open `http://localhost:8080` and follow the setup wizard to create your admin account. |
| 60 | + |
| 61 | +Or use Docker Compose -- copy `docker-compose.example.yml`, edit the values, and `docker compose up -d`. |
| 62 | + |
| 63 | +### Volumes |
| 64 | + |
| 65 | +| Mount | Purpose | |
| 66 | +|-------|---------| |
| 67 | +| `/data` | SQLite database and cover cache | |
| 68 | +| `/books` | Ebook library (read-only is fine) | |
| 69 | +| `/bindery` | Incoming folder for new books | |
| 70 | + |
| 71 | +### Environment Variables |
| 72 | + |
| 73 | +| Variable | Required | Default | Description | |
| 74 | +|----------|----------|---------|-------------| |
| 75 | +| `TOME_SECRET_KEY` | Yes | -- | JWT signing secret | |
| 76 | +| `TOME_DATA_DIR` | No | `/data` | DB and cover cache | |
| 77 | +| `TOME_LIBRARY_DIR` | No | `/books` | Library root | |
| 78 | +| `TOME_INCOMING_DIR` | No | `/bindery` | Bindery folder | |
| 79 | +| `TOME_PORT` | No | `8080` | HTTP port | |
| 80 | +| `TOME_HARDCOVER_TOKEN` | No | -- | [Hardcover](https://hardcover.app) API token for metadata | |
| 81 | + |
| 82 | +### Supported Formats |
| 83 | + |
| 84 | +| Format | Reader | Notes | |
| 85 | +|--------|--------|-------| |
| 86 | +| EPUB | Text reader | CFI position tracking | |
| 87 | +| CBZ | Comic reader | Streaming page delivery | |
| 88 | +| CBR | Comic reader | Auto-repacked to ZIP | |
| 89 | +| PDF | Browser viewer | Served directly | |
| 90 | + |
| 91 | +## Development |
| 92 | + |
| 93 | +Requirements: Python 3.12+, Node.js 18+ |
| 94 | + |
| 95 | +```bash |
| 96 | +./dev.sh # starts backend :8080 + frontend :5173 |
| 97 | +``` |
| 98 | + |
| 99 | +| Layer | Technology | |
| 100 | +|-------|------------| |
| 101 | +| Backend | Python 3.12+ / FastAPI | |
| 102 | +| Database | SQLite (WAL) / SQLAlchemy 2.0 | |
| 103 | +| Frontend | React 19 / Vite / TypeScript | |
| 104 | +| Styling | Tailwind CSS 4 | |
| 105 | +| Auth | JWT (python-jose) | |
| 106 | + |
| 107 | +Built with [Claude Code](https://claude.ai/code). |
| 108 | + |
| 109 | +## Documentation |
| 110 | + |
| 111 | +- [Reader](docs/reader.md) -- EPUB, comic/manga reader, keyboard shortcuts, ComicInfo.xml |
| 112 | +- [KOReader Plugin](docs/koreader-plugin.md) -- TomeSync setup, sync behavior, offline support |
| 113 | +- [Bindery](docs/bindery-deployment.md) -- setting up the incoming book inbox |
| 114 | +- [Import Script](docs/import.md) -- bulk importing an existing collection |
| 115 | +- [Features](docs/features.md) -- Quick Connect, OPDS PINs, permissions, themes, and more |
| 116 | + |
| 117 | +## Acknowledgements |
| 118 | + |
| 119 | +- [KOReader](https://koreader.rocks) -- the open source e-reader app that Tome's sync plugin and OPDS integration are built for |
| 120 | +- [Hardcover](https://hardcover.app) -- book metadata and cover art API |
| 121 | +- [foliate-js](https://github.com/johnfactotum/foliate-js) -- the EPUB rendering engine powering Tome's built-in reader |
| 122 | + |
| 123 | +## License |
| 124 | + |
| 125 | +MIT |
0 commit comments