AnthoLume is a Progressive Web App (PWA) that manages your EPUB documents, provides an EPUB reader, and tracks your reading activity! It also has a KOReader KOSync compatible API, and a KOReader Plugin used to sync activity from your Kindle.
Go to file
Evan Reichard 45cef2f4af
continuous-integration/drone/push Build is passing Details
chore(formatting): djlint templates
2024-01-24 21:40:14 -05:00
_test_files [add] better error handling, [add] font selector, [add] tailwind generation 2023-10-25 19:52:01 -04:00
api chore(formatting): djlint templates 2024-01-24 21:40:14 -05:00
assets add: more statistics 2024-01-23 23:00:51 -05:00
client [fix] SyncNinja status message 2023-11-26 15:51:47 -05:00
config [add] better log page, [add] admin users page, [add] admin nav 2024-01-20 15:03:32 -05:00
database fix: potential null query 2024-01-24 18:43:33 -05:00
graph [fix] xpath & cfi resolution 2023-11-07 19:19:06 -05:00
metadata [add] parse local isbn metadata 2023-12-30 10:18:43 -05:00
notes [add] favicon 2023-11-25 19:21:18 -05:00
opds [add] opds catalog, [add] migrate to non-cgo sqlite driver 2023-10-05 19:56:19 -04:00
screenshots [add] rename to AnthoLume 2023-11-04 19:55:38 -04:00
search fix: downloads, fix: logging space 2024-01-22 18:03:01 -05:00
server [perf] dont immediately update view cache 2024-01-21 11:29:26 -05:00
templates chore(formatting): djlint templates 2024-01-24 21:40:14 -05:00
utils [add] migrate to percentages vs pages 2023-11-03 19:38:35 -04:00
.djlintrc chore(formatting): djlint templates 2024-01-24 21:40:14 -05:00
.drone.yml [fix] docker cicd build 2024-01-20 15:32:04 -05:00
.envrc Initial Commit 2023-09-19 08:01:15 -04:00
.gitignore [add] opds search, [fix] opds urls, [add] log level env var 2023-11-25 18:38:18 -05:00
.sqlfluff Initial Commit 2023-09-19 08:01:15 -04:00
Dockerfile [fix] docker cicd build 2024-01-20 15:32:04 -05:00
Dockerfile-BuildKit [add] better log page, [add] admin users page, [add] admin nav 2024-01-20 15:03:32 -05:00
LICENSE Initial Commit 2023-09-19 08:01:15 -04:00
Makefile [add] better log page, [add] admin users page, [add] admin nav 2024-01-20 15:03:32 -05:00
README.md [add] opds search, [fix] opds urls, [add] log level env var 2023-11-25 18:38:18 -05:00
banner.png [add] logo & banner, [fix] mobile alignment issue 2023-11-05 13:20:19 -05:00
banner.xcf [add] logo & banner, [fix] mobile alignment issue 2023-11-05 13:20:19 -05:00
docker-compose.yml [add] rename to AnthoLume 2023-11-04 19:55:38 -04:00
go.mod [add] better log page, [add] admin users page, [add] admin nav 2024-01-20 15:03:32 -05:00
go.sum [add] better log page, [add] admin users page, [add] admin nav 2024-01-20 15:03:32 -05:00
main.go [chore] rename package, [chore] rename vars 2024-01-10 20:23:36 -05:00
shell.nix [add] rename to AnthoLume 2023-11-04 19:55:38 -04:00
sqlc.yaml [fix] store times as rfc3339 format 2023-10-05 21:04:57 -04:00
tailwind.config.js chore(formatting): djlint templates 2024-01-24 21:40:14 -05:00

README.md

ScreenshotsDemo Server

user: demo • pass: demo


AnthoLume is a Progressive Web App (PWA) that manages your EPUB documents, provides an EPUB reader, and tracks your reading activity! It also has a KOReader KOSync compatible API, and a KOReader Plugin used to sync activity from your Kindle. Some additional features include:

  • OPDS API Endpoint
  • Local / Offline Reader (via ServiceWorker)
  • Metadata Scraping (Thanks OpenLibrary & Google Books API)
  • Words / Minute (WPM) Tracking & Leaderboard (Amongst Server Users)

While some features require JavaScript (Service Worker & EPUB Reader), we make an effort to limit JavaScript usage. Outside of the two aforementioned features, no JavaScript is used.

Server

Docker Image: docker pull gitea.va.reichard.io/evan/antholume:latest

Local / Offline Reader

The Local / Offline reader allows you to use any AnthoLume server as a standalone offline accessible reading app! Some features:

  • Add local EPUB documents
  • Read both local and any cached server documents
  • Maintains progress for all types of documents (server / local)
  • Uploads any progress or activity for cached server documents once the internet is accessible

KOSync API

The KOSync compatible API endpoint is located at: http(s)://<SERVER>/api/ko

OPDS API

The OPDS API endpoint is located at: http(s)://<SERVER>/api/opds

Quick Start

# Make Data Directory
mkdir -p antholume_data

# Run Server
docker run \
    -p 8585:8585 \
    -e REGISTRATION_ENABLED=true \
    -v ./antholume_data:/config \
    -v ./antholume_data:/data \
    gitea.va.reichard.io/evan/antholume:latest

The service is now accessible at: http://localhost:8585. I recommend registering an account and then disabling registration unless you expect more users.

Configuration

Environment Variable Default Value Description
DATABASE_TYPE SQLite Currently only "SQLite" is supported
DATABASE_NAME antholume The database name, or in SQLite's case, the filename
CONFIG_PATH /config Directory where to store SQLite's DB
DATA_PATH /data Directory where to store the documents and cover metadata
LISTEN_PORT 8585 Port the server listens at
LOG_LEVEL info Set server log level
REGISTRATION_ENABLED false Whether to allow registration (applies to both WebApp & KOSync API)
COOKIE_SESSION_KEY Optional secret cookie session key (auto generated if not provided)
COOKIE_SECURE true Set Cookie Secure attribute (i.e. only works over HTTPS)
COOKIE_HTTP_ONLY true Set Cookie HttpOnly attribute (i.e. inacessible via JavaScript)

Security

Authentication

  • Web App / PWA - Session based token (7 day expiry, refresh after 6 days)
  • KOSync & SyncNinja API - Header based - X-Auth-User & X-Auth-Key (KOSync compatibility)
  • OPDS API - Basic authentication (KOReader OPDS compatibility)

Notes

  • Credentials are the same amongst all endpoints
  • The native KOSync plugin sends an MD5 hash of the password. Due to that:
  • We store an Argon2 hash and per-password salt of the MD5 hashed original password

Client (KOReader Plugin)

See documentation in the client subfolder: SyncNinja

Development

SQLC Generation (v1.21.0):

go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
~/go/bin/sqlc generate

Run Development:

CONFIG_PATH=./data DATA_PATH=./data REGISTRATION_ENABLED=true go run main.go serve

Building

The Dockerfile and Makefile contain the build information:

# Build Local (Linux & Darwin - arm64 & amd64)
make build_local

# Build Local Docker Image
make docker_build_local

# Build Docker & Push Latest or Dev (Linux - arm64 & amd64)
make docker_build_release_latest
make docker_build_release_dev

# Generate Tailwind CSS
make build_tailwind

# Clean Local Build
make clean

# Tests (Unit & Integration - Google Books API)
make tests_unit
make tests_integration

Notes