Skip to content

ctaoist/cloud-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Reader

简体中文 | English

A self-hosted, multi-user web ebook reader where books, reading progress, notes, highlights, bookshelves, and more are stored on the server side, supporting EPUB, PDF, MOBI, AZW3.

The reader loads books lazily — it streams only the bytes it needs (EPUB resources per chapter, PDF/MOBI via HTTP range requests), never the whole file.

Features

  • EPUB / PDF / MOBI / AZW3 reading with paginated layout, themes (light / dark / sepia / green), adjustable font size and line spacing.
  • Shared library with cover + metadata extraction on upload; per-user reading progress, bookmarks, and text highlights with notes.
  • Reading stats and "continue reading".
  • Accounts: the first user to register becomes the admin (who uploads books); open self-signup for readers (configurable).
  • Pluggable database: SQLite, MySQL, or PostgreSQL, selected at runtime from a YAML config.

Tech stack

  • Backend: Rust, axum, SeaORM, JWT (httpOnly cookie) + Argon2.
  • Frontend: SolidJS, Vite, TailwindCSS, foliate-js (vendored, MIT) for rendering.

Quick start

# 1. Build the frontend
cd web-src
npm install
npm run build
cd ..

# 2. Run the server (SQLite, no external DB needed)
CLOUD_READER_CONFIG=config.dev.yaml cargo run --release

Open http://localhost:1123 and register — the first account is the admin.

For Postgres/MySQL, edit config.yaml (the default config) and run cargo run --release. Default port is 1123.

Configuration (config.yaml)

server: { host: 0.0.0.0, port: 1123 }
database:
  type: postgres        # postgres | mysql | sqlite
  host: localhost
  port: 5432
  username: postgres
  password: postgres
  database: cloud_reader
  path: ./data/cloud-reader.db   # used only when type: sqlite
storage:
  path: ./data/books    # uploaded files + extracted covers
auth:
  jwt_secret: change-me-please
  allow_signup: true
  token_ttl_hours: 720

Development

# Terminal 1 — backend on :1123
CLOUD_READER_CONFIG=config.dev.yaml cargo run

# Terminal 2 — Vite dev server on :5173 (proxies /api to :1123)
cd web-src && npm run dev

About

A self-hosted, multi-user web ebook reader where books, reading progress, notes, highlights, bookshelves, and more are stored on the server side, supporting EPUB, PDF, MOBI, AZW3.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages