Dogear: a self-hosted reading tracker in Go. It started as a Go port of Jelu.
  • JavaScript 41.8%
  • Go 38.6%
  • TypeScript 9%
  • Svelte 8.6%
  • HTML 1.4%
  • Other 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dixon D'Cunha 6a667bac70
All checks were successful
CI / changes (pull_request) Successful in 8s
CI / go-lint (pull_request) Successful in 32s
CI / web (pull_request) Successful in 4m32s
CI / go-test (sync) (pull_request) Successful in 2m41s
CI / go-test (parity) (pull_request) Successful in 6m14s
CI / go-test (wire) (pull_request) Successful in 12m17s
CI / go-test (usecases) (pull_request) Successful in 18m58s
CI / go-test (rest) (pull_request) Successful in 27m29s
CI / CI (pull_request) Successful in 15s
CI / changes (push) Has been skipped
CI / go-lint (push) Successful in 1m36s
CI / web (push) Successful in 4m19s
CI / go-test (parity) (push) Successful in 4m46s
CI / go-test (usecases) (push) Successful in 2m32s
Release / Release (push) Successful in 42s
CI / go-test (wire) (push) Successful in 11m18s
CI / go-test (rest) (push) Successful in 18m1s
CI / go-test (sync) (push) Successful in 15m18s
CI / CI (push) Successful in 9s
ci(dogear): restore retries for the required check
2026-12-01 02:22:41 -05:00
.forgejo/workflows ci(dogear): restore retries for the required check 2026-12-01 02:22:41 -05:00
cmd chore(deps): use the maintained YAML v3 module 2026-11-30 00:35:33 -05:00
docs fix(hardcover): retry the read-back of a new entry instead of calling it gone, repair the made read and its event 2026-11-25 21:33:45 -05:00
internal test(dogear): reuse a migrated SQLite seed per test process 2026-12-01 01:38:22 -05:00
scripts ci: run the reading-sync use-case tests in their own shard, internal/app outgrew 30 minutes 2026-11-25 07:54:13 -05:00
testdata feat(config): armature config (DOGEAR_*, YAML, schema, --check-config), legacy env guard, dogear.db rename, dogear_ tokens, DOGEAR_DB; adds caarlos0/env and invopop/jsonschema, the armature template's 2026-11-24 20:30:54 -05:00
web fix(web): remove stray spaces from Turkish start date 2026-11-30 01:03:41 -05:00
webui docs: describe Dogear as its own app in AGENTS.md, the READMEs and the design citations 2026-11-24 20:38:34 -05:00
.gitignore refactor: rename JeluGo to Dogear in the API paths, OpenAPI, metrics, export prefix, admin group and Go names 2026-11-24 20:04:13 -05:00
AGENTS.md ci(dogear): restore retries for the required check 2026-12-01 02:22:41 -05:00
CHANGELOG.md chore(main): release dogear v1.4.1 2026-11-26 03:10:19 +00:00
CLAUDE.md chore: add armature plumbing (AGENTS.md, mise tasks, CI, release, Renovate) 2026-11-05 04:48:11 -05:00
config.example.yaml feat(hardcover): pull reading data from Hardcover 2026-11-25 15:01:15 +00:00
config.schema.json feat(hardcover): pull reading data from Hardcover 2026-11-25 15:01:15 +00:00
go.mod fix(deps): Update all non-major dependencies (#67) 2026-11-30 09:31:14 +00:00
go.sum fix(deps): Update all non-major dependencies (#67) 2026-11-30 09:31:14 +00:00
LICENSE chore: MIT license with Jelu's notice, and drop the private brief, cluster name and LAN address before going public 2026-10-28 23:39:15 -04:00
mise.toml feat(config): armature config (DOGEAR_*, YAML, schema, --check-config), legacy env guard, dogear.db rename, dogear_ tokens, DOGEAR_DB; adds caarlos0/env and invopop/jsonschema, the armature template's 2026-11-24 20:30:54 -05:00
README.md fix(hardcover): first look fills gaps only, handle placeholder days and stopped runs, add the push preview and pause 2026-11-26 01:49:24 +00:00
releasaurus.toml refactor: rename JeluGo to Dogear in the API paths, OpenAPI, metrics, export prefix, admin group and Go names 2026-11-24 20:04:13 -05:00
renovate.json chore: add armature plumbing (AGENTS.md, mise tasks, CI, release, Renovate) 2026-11-05 04:48:11 -05:00

Dogear

Dogear is a self-hosted reading tracker. It records the books you own, want and read, with your reading history, reviews, tags, shelves and statistics. Alcove is the library beside it. Alcove holds the book files, and Dogear tracks what you read.

Dogear started as a Go port of Jelu 0.88.2, a self-hosted book tracker. Dogear is now its own app. It is not a drop-in replacement for Jelu.

Dogear is small. Jelu runs on the JVM (the Java virtual machine), and it uses about 440 MB of memory when idle. Dogear uses tens of megabytes. The measurements are under "Memory" in docs/design.md. That file is also the spec of Dogear.

Running it

The container image is built in Exikle/containers (apps/dogear). Its name is git.dcunha.io/exikle/dogear. The image listens on port 8080 and keeps all data under /data. The SQLite database is /data/database/dogear.db.

To run Dogear from source, use these commands:

go build ./cmd/dogear
DOGEAR_DATABASE_PATH=./data/database DOGEAR_WEBUI_DIR=./web/build ./dogear

DOGEAR_WEBUI_DIR names the directory that holds the built web UI. The image provides this directory. See "Web UI" below.

Configuration

Dogear reads built-in defaults first. Then it reads an optional YAML file, and then the DOGEAR_* environment variables. A variable beats the file. A variable name is DOGEAR_ plus the key path in upper case, with _ between the parts. For example, the key http.port is DOGEAR_HTTP_PORT.

  • config.example.yaml lists every key with its default and a short note. Set DOGEAR_CONFIG to the path of your copy.
  • config.schema.json is the JSON Schema of the file. An editor can use it to check your file.
  • dogear --check-config loads the configuration, logs it with the secrets hidden, and exits. A wrong key or value ends with exit code 78.

A secret never goes in the file. These are passwords, API keys, client secrets and the Postgres URL. Set each one with its variable, for example DOGEAR_ADMIN_PASSWORD.

To read your reading progress from Alcove, set DOGEAR_ALCOVE_URL to the base URL of your Alcove server (an http:// or https:// URL). If it is empty, the sync is off. DOGEAR_ALCOVE_INTERVAL is how often Dogear reads Alcove, 5m by default. Each user then saves their Alcove username and a device token. See entry 36 of docs/design.md.

To keep your library in step with Hardcover, each user saves a Hardcover personal token on the page Profile, Hardcover. The sync is off for a user until they do. DOGEAR_HARDCOVER_SYNC_INTERVAL is how often Dogear syncs with Hardcover, 10m by default. Changes go both ways. Dogear never deletes anything at Hardcover. A new link sends nothing until you press Start sending on that page, after a preview of what Dogear would send. At the first start after the update that added this, Dogear clears the to-read flag on every book that is being read or was read (the newest reading event is finished or reading), and logs how many it cleared. See entry 38 of docs/design.md.

Dogear adds three features on top of the configuration:

  • Settings page: An admin can change the runtime settings while Dogear runs. These settings are the metadata providers (enabled, order, configuration, API key), calibre, cover resizing, CORS origins, session duration, OAuth2 account creation, OIDC email verification, and the default language and theme of the UI. A change applies at once. Dogear stores it in its own jelugo_setting table. If an environment variable or a configuration file sets a value, the page shows that value as locked, with the name of the variable or file. The page shows startup-only settings (paths, port, OAuth2, LDAP, proxy auth) as read-only. The API is GET /api/v1/dogear/settings and PUT / DELETE /api/v1/dogear/settings/{key}. See /v3/api-docs, tag Dogear.
  • Admin from the environment: Set DOGEAR_ADMIN_LOGIN and DOGEAR_ADMIN_PASSWORD. For a mounted Secret, set DOGEAR_ADMIN_FILE to the path of the password file instead of the password. At startup, Dogear creates that admin, or it makes the existing user with that login an admin. Dogear resets the password only if DOGEAR_ADMIN_RESET=true.
  • Admins from OIDC groups: Set DOGEAR_AUTH_GROUPS_ADMIN=dogear-admin. At every login, Dogear makes an OIDC user an admin if the groups claim of that user has one of the listed groups. If it does not, the user is not an admin.

For details, see "Runtime settings and admin bootstrap" in docs/design.md.

Upgrading from JeluGo

Dogear is the new name of JeluGo. Read these points before you start the new version on an old data directory.

  • Remove every variable that starts with JELU_, JELUGO_, SPRING_, SERVER_ or LOGGING_LEVEL_, in upper or lower case. Dogear reads none of them. If one is set, Dogear logs an error that names it and exits with code 78. This check stops a setting that Dogear no longer reads from putting the database in a wrong place. Variables that Kubernetes sets for a Service of that name (JELU_SERVICE_HOST, JELU_PORT, SERVER_SERVICE_HOST and like them) do not count.
  • Use the DOGEAR_* names instead. The names are in config.example.yaml. For example, JELU_DATABASE_PATH is DOGEAR_DATABASE_PATH, JELUGO_ADMIN_LOGIN is DOGEAR_ADMIN_LOGIN, and LOGGING_LEVEL_IO_GITHUB_BAYANG_JELU is DOGEAR_LOG_LEVEL. An OAuth2 client moves from SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_<ID>_* to DOGEAR_AUTH_CLIENTS_<ID>_*. There is no application.yml any more. Use the YAML file of config.example.yaml.
  • Set DOGEAR_HTTP_FORWARDED=true behind a reverse proxy that is not on Kubernetes. Like JeluGo, Dogear turns it on by itself when KUBERNETES_SERVICE_HOST is set. DOGEAR_HTTP_FORWARDED=false turns it off.
  • The port is 8080 by default, not 11111. Change your probes, your Service and your proxy.
  • On the first start, Dogear renames jelu.db to dogear.db in the database folder, with its -wal, -shm and -journal files. It stops with an error if both files exist. The tables keep their names. Dogear also moves the stored settings and the stored login provider to the new names.
  • Roll back only to a copy of the data made before Dogear first started: Dogear renames jelu.db and rewrites user and setting rows, so JeluGo on the same volume starts empty.
  • Everyone signs in again. The names of the session attributes changed, so Dogear does not read the old sessions.
  • New API tokens start with dogear_. Tokens that start with jelu_ keep working.
  • The LDAP admin group is dogear-admin, not jelu-admin. For OIDC, list your admin group in DOGEAR_AUTH_GROUPS_ADMIN.

Web UI

Dogear ships its own web UI in web/. It uses SvelteKit. It works on phones (as an installable PWA, a web app that you install) and on desktops. You do not need Node on the host. To build the UI in a container, run scripts/web.sh run build. To make a directory for DOGEAR_WEBUI_DIR, run scripts/build-web.sh <dir>. To run the Playwright specs against a Dogear built from this repository, run scripts/web.sh run e2e.

The Vue UI of Jelu also works with Dogear. If you prefer it, webui/ builds it from the source of Jelu with the patches of Dogear. The script is scripts/build-webui.sh.

Database

By default, Dogear uses a sqlite database, <database.path>/dogear.db. This is the supported setup. Dogear can also run on Postgres. Then it can share a server and backups with other apps. Postgres support is experimental. Pages are 2 to 7 times slower than on sqlite (the measurements are in docs/design.md), and the default tests do not run on Postgres.

To use Postgres, set the database URL:

DOGEAR_DATABASE_URL=postgres://dogear:secret@db:5432/dogear?sslmode=disable

On first start, Dogear creates its schema in that database. If the URL has a search_path, Dogear creates the schema in the schema that the search_path names. Images and imports stay in the data directory. The settings page shows the URL as read-only, and it masks the password.

To move an existing sqlite library to Postgres, stop Dogear. Then run this command with your usual configuration, so that Dogear finds dogear.db:

dogear migrate-db --to postgres://dogear:secret@db:5432/dogear

The command copies every table into an empty database in one transaction. It makes sure that every table has as many rows as in sqlite. It refuses a database that already has the tables of Dogear. After the copy, set DOGEAR_DATABASE_URL and start Dogear. The command only reads the sqlite data. It opens the file in the same way as a normal start. So the sqlite data stays usable if you want to go back.

The script scripts/test-postgres.sh runs the whole test suite on an embedded PostgreSQL 18.6.

Behaviour

docs/design.md is the spec. It lists the documented behaviour of Dogear, entry by entry. Some examples:

  • The search index lives in memory. Jelu uses a Lucene directory.
  • There is no log file. Dogear logs JSON lines to stdout.
  • SSO signs in in the same tab.
  • An admin can add SSO providers and change settings in the UI.
  • Dogear does not bundle calibre.

The tests record request scenarios against real Jelu 0.88.2 and replay them against Dogear in go test. They are regression tests. They show that a change in the API is on purpose.

License

Dogear uses the MIT license, like Jelu. It carries the copyright notice of Jelu.