···11# spacebee
2233-A WebDAV shim that impersonates a cloud sync backend for [Moon+ Reader] and
44-translates its `.po` position files into ATProto reads/writes on your
55-[bookhive.buzz] book records.
33+A WebDAV shim for syncing [Moon+ Reader](https://www.moondownload.com) reading position. Translates
44+the `.po` position files into ATProto reads/writes on your
55+[bookhive.buzz](https://bookhive.buzz) book records.
6677-Point Moon+ Reader at `https://spacebee.yourdomain/` (Basic auth). Open a
88-book, read for a while, pause the app — your `bookProgress` on your PDS
99-updates. Flip to `bookhive.buzz` and the progress is already there. Flip
1010-between devices and spacebee hands each one the current state.
77+```json
88+{
99+ "$type": "buzz.bookhive.book",
1010+ "bookProgress": {
1111+ "percent": 11,
1212+ "updatedAt": "2026-04-17T10:01:24.000Z",
1313+ "moonReader": {
1414+ "file": "The Necromancers House - Buehlman Christopher.epub.po",
1515+ "position": "1703297605115*21@0#4826:11.1%",
1616+ "syncedAt": "2026-04-17T10:01:24.000Z"
1717+ },
1818+ "currentChapter": 22
1919+ }
2020+}
2121+```
2222+2323+Also serves a static page showing your reading progress.
2424+2525+> 🚨 *This is vibecoded, I don't know what I'm doing but it works 👍️*
11261227## How it works
13281414-```
1515-MoonReader ─[WebDAV: PROPFIND / GET / PUT]──→ spacebee ──→ ATProto PDS
1616- (buzz.bookhive.book)
2929+```mermaid
3030+graph LR
3131+ MR[Moon+ Reader] -->|"WebDAV: PROPFIND / GET / PUT"| SB[spacebee]
3232+ SB -->|"buzz.bookhive.book"| PDS[ATProto PDS]
1733```
18341935- `PROPFIND /Books/.Moon+/Cache/` synthesizes a directory listing from your
···2541 matching bookhive record (or catalog-searches and creates one), and
2642 updates `bookProgress.{percent,currentChapter,moonReader}` on your PDS.
27432828-Non-position WebDAV paths (`Books/.Moon+/Settings/`, etc.) fall through to a
2929-local-disk scratch area rooted at `$PASSTHROUGH_ROOT`. Those files are not
3030-synced anywhere — they just keep Moon+ Reader happy.
4444+Non-position WebDAV paths (`Books/.Moon+/Settings/`, backups, etc.) fall through to a local-disk scratch area rooted at `$PASSTHROUGH_ROOT`.
31453246spacebee also serves a small read-only HTML dashboard at `/` that renders
3347your bookhive records (currently-reading, finished, etc.). The dashboard and
···4256| --- | --- |
4357| `BSKY_HANDLE` | The handle spacebee writes records as |
4458| `BSKY_APP_PASSWORD` | An [app password] for that handle |
4545-| `PDS` | *Optional.* PDS host (e.g. `bsky.social`). If unset, resolved from the handle at first use via the public bsky appview + PLC directory. |
4659| `DAV_USER` / `DAV_PASSWORD` | Basic-auth credentials Moon+ Reader will send |
4760| `PASSTHROUGH_ROOT` | Local-disk scratch dir for non-`.po` paths |
6161+| `PDS` | *Optional.* If unset, resolved from the handle. |
48624963## Running locally
5064···56705771Point a test device at `http://<your-laptop>:8080/` as the WebDAV target.
58725959-## Deploying
6060-6161-Single Docker container. Build locally or pull an image you've pushed to a
6262-registry, then:
6363-6464-```sh
6565-IMAGE=ghcr.io/you/spacebee:latest docker compose up -d
6666-```
6767-6868-The provided `docker-compose.yml` takes the image tag from the `IMAGE`
6969-environment variable and defaults to `spacebee:latest` (expects a local
7070-build). Put behind a reverse proxy with HTTPS — Moon+ Reader requires TLS
7171-for WebDAV.
7272-7373-## CI
7474-7575-`.forgejo/workflows/ci.yml` runs lint + tests on every push and PR. On
7676-pushes to `main` it will also build and push a Docker image, **but only if
7777-`REGISTRY` is set as a repo/org variable**. To enable image publishing,
7878-configure:
7979-8080-- Repo/org vars: `REGISTRY` (e.g. `ghcr.io`), `IMAGE_NAME` (e.g. `you/spacebee`)
8181-- Repo/org secrets: `REGISTRY_USER`, `REGISTRY_TOKEN`
8282-8383-If `REGISTRY` is unset, the build job is skipped and the workflow is
8484-test-only — safe to fork without needing any registry credentials.
8585-8673## Related
87748888-- [`bookhive.buzz`] — the AT Protocol book tracker whose records spacebee
7575+- [bookhive.buzz](https://bookhive.buzz) — the AT Protocol book tracker whose records spacebee
8976 reads and writes.
9090-9191-[Moon+ Reader]: https://www.moondownload.com/
9292-[bookhive.buzz]: https://bookhive.buzz/
9393-[app password]: https://bsky.app/settings/app-passwords
7777+- [Moon+ Reader](https://www.moondownload.com/) - Android eReader app