Files
bookorbit/README.md
T
Oscar Nogueira Neto 4eed87a6fd feat(readwise): sync highlights to Readwise (#578)
* feat(types): add readwise_sync permission

* feat(types): add readwise settings types

* feat(db): add readwise_user_settings table

* feat(readwise): add constants

* feat(readwise): add throttle queue

* feat(readwise): add REST client

* feat(readwise): add repository

* feat(readwise): add settings service

* feat(readwise): add sync service with watermark

* refactor(readwise): drop unused logger in settings service

* feat(readwise): add debounced scheduler

* feat(readwise): add event listener

* feat(readwise): add controller and dtos

* feat(readwise): wire module into app

* test(readwise): add readwise_sync to authorization matrix

* feat(annotation): emit annotation.created on device sync ingest

* feat(client): add readwise api client

* feat(client): add useReadwiseSettings composable

* feat(client): add Readwise settings page

* feat(client): add Readwise settings route

* feat(client): add Readwise to settings nav

* fix(readwise): avoid typeof this in settings type annotation

Production build (nest build → tsc via tsconfig.build.json) rejects
`Parameters<typeof this.repo.upsertSettings>[1]` with TS2304. Reference
the repository class type directly so the prod image compiles.

* fix(client): add Readwise sync to admin permission list

The admin UserFormDrawer renders a hardcoded permission list, not an
iteration of PERMISSION_LABELS, so readwise_sync was ungrantable via UI.
Add it to the Devices & Access group and the Standard preset, mirroring
Hardcover sync.

* feat(readwise): send book cover to Readwise via OpenLibrary ISBN

Populate the Readwise highlight image_url with the OpenLibrary cover URL
built from the book's isbn13 (falling back to isbn10). Uses ?default=false
so a missing cover yields 404 (no image) rather than a blank placeholder.
Books without an ISBN send no image_url. BookOrbit's own cover endpoint is
auth-gated and stores no public source URL, so a public third-party cover
URL is the zero-infra way to give Readwise an image.

* test(readwise): add type parameters to vi.fn mocks

oxlint (vitest/require-mock-type-parameters) fails on untyped vi.fn()
in the settings page test; the pre-commit hook only runs eslint, so
this surfaced under full lint:check.

* docs(readme): add Readwise Sync to features list

* fix(readwise): surface settings fetch errors in the UI

The settings page destructured error from useReadwiseSettings but never
rendered it. A failed fetch on mount left the user with an empty default
form and no indication that loading failed. Render an error banner when
error is set, and cover it with component tests.

* test(readwise): cover settings page token test, save, and visibility toggle

Adds component tests for the Test-connection flow (empty/valid/invalid
token), Save (success clears the field, failure surfaces an error toast),
and the show/hide token toggle — the interactive handlers Codecov flagged
as uncovered in ReadwiseSettings.vue.

* test(readwise): match settings buttons by exact label in test helper

Use an exact text match instead of substring matching in the testButton
helper so it can never return the wrong button if labels overlap.

* fix(readwise): harden highlight sync

---------

Co-authored-by: neon <18559658+neonsolstice@users.noreply.github.com>
Co-authored-by: Oscar Nogueira Neto <oscarnogueira@gmail.com>
2026-07-07 19:09:28 -06:00

8.9 KiB

BookOrbit

A self-hosted library management and reading platform for ebooks, PDFs, audiobooks, and comics.

Latest release Stars CI Release Server Coverage

Website Demo GHCR Pulls Discussions Contributing License: AGPL v3


BookOrbit dashboard showing reading stats, widgets, and book shelves

What is BookOrbit?

BookOrbit is a self-hosted digital library and reading platform. Organize and read your books, sync progress and annotations seamlessly across Kobo, KOReader, and the web reader, enrich your collection with metadata from multiple providers, and push reading data to Hardcover automatically. Supports multiple users with OIDC/SSO, detailed reading statistics, OPDS, customizable dashboard widgets, Send-to-Kindle delivery, and Smart Scopes - all running on infrastructure you control.

Visit Website


Live Demo

Want to try BookOrbit before installing? Explore the live instance instantly: no account required!

Launch Live Demo

Experience the interface, built-in readers, and dashboard first-hand.

Note: The demo includes a sample library of public domain books. Some administrative features are limited in the public demo. Self-hosting BookOrbit provides the full experience.


Features

Reading Experience & Sync

  • Built-in Web Readers: Native support for eBooks (EPUB, MOBI, AZW3), PDFs, Comics (CBZ, CBR), and Audiobooks (M4B, MP3) with no extra plugins required.
  • Three-Way Sync (Kobo + KOReader + BookOrbit): Progress and annotations flow bidirectionally between Kobo devices, KOReader, and the BookOrbit web reader. Pick up on any surface where you left off on another - including highlights and deletes.
  • KOReader Plugin: Native on-device catalog browser with search, download, and status/rating management, alongside full progress and annotation sync.
  • Annotations & Highlights: Highlights from the web reader, KOReader, and Kobo merge into a unified searchable hub - filterable by color, style, and source, exportable as Markdown, CSV, or JSON.
  • Hardcover Sync: Automatically pushes status, progress, reading dates, and ratings to Hardcover on configurable triggers. Pull read history back from Hardcover to backfill blank BookOrbit entries.
  • Readwise Sync: Automatically pushes new highlights and notes to Readwise as you create them, from both the web reader and synced devices, with book covers matched by ISBN.
  • Achievements & Reading Goals: Yearly goals, daily streaks, monthly challenges, and 50+ achievements across five categories. Reading DNA profiles your reading style from your actual session history.
  • Reading Statistics: Track your daily reading time, view heatmaps, maintain streaks, and monitor library health.

Library Management

  • Multiple Libraries: Isolate content with per-library folders, custom scan rules, and format priorities.
  • Rich Metadata Providers: Fetch robust metadata from Google Books, Amazon, Goodreads, Open Library, Audible, ComicVine, and more.
  • Smart Scopes & Collections: Organize your collection using curated lists and dynamic, rule-based saved filters.

Platform & Delivery

  • Multi-User & SSO: Granular per-user permissions and isolated reading data, with native support for Authentik, Keycloak, and Authelia via OIDC.
  • Content Delivery: OPDS support for compatible apps, Send-to-Kindle via email, and browser drag-and-drop uploads.
  • Automated Ingestion: Configure a Book Dock drop folder for hands-free importing.

Quick Start (Docker)

mkdir bookorbit && cd bookorbit
mkdir -p books data/app data/postgres
curl -fsSLo .env https://raw.githubusercontent.com/bookorbit/bookorbit/main/.env.example
curl -fsSLo docker-compose.yml https://raw.githubusercontent.com/bookorbit/bookorbit/main/docker-compose.yml

Edit .env and set these required values:

APP_URL=http://your-server-ip:3000   # the URL you'll open in your browser
BOOKS_HOST_PATH=./books              # folder on your server where your book files live

POSTGRES_PASSWORD=         # database password           - openssl rand -hex 24
JWT_SECRET=                # signs login tokens          - openssl rand -hex 32
SETUP_BOOTSTRAP_TOKEN=     # one-time setup wizard token - openssl rand -hex 16

Optionally set LIBRARY_BROWSE_ROOT=/books to start the library folder picker at /books instead of /.

Then start:

docker compose up -d

Open http://your-server-ip:3000 and complete setup using your SETUP_BOOTSTRAP_TOKEN.

For the full installation guide including reverse proxy setup, file permissions on NAS, external databases, and environment variable reference, see bookorbit.app/installation.


KOReader Plugin

The BookOrbit plugin for KOReader adds progress sync, two-way annotation sync, and a native catalog browser: navigate, search, and download books from your library without leaving the device.

  1. In BookOrbit, go to Settings > Integrations > KOReader and click Download Plugin.
  2. Unzip bookorbit.koplugin.zip.
  3. Copy bookorbit.koplugin to koreader/plugins/ on the device.
  4. Restart KOReader and open a book.
  5. Use Tools > BookOrbit Sync to connect.

The download is pre-configured with your server URL and credentials; no manual entry on the device. For full setup and sync options, see bookorbit.app/koreader-plugin.


Documentation and Contributing

Full documentation is at bookorbit.app - covering libraries, metadata, readers, Kobo sync, OPDS, users and permissions, OIDC setup, and more.

For local development, see docs/DEVELOPMENT.md. To contribute, see docs/CONTRIBUTING.md for the full workflow: branch naming, test expectations, PR checklist, and commit format.


Support


License

BookOrbit is licensed under the GNU Affero General Public License v3.0.