Guild Archives — Lending Library
Problem
Guild members want access to RPG books (physical and digital) without buying every title. A shared lending library builds community value and justifies higher membership tiers, but we need a catalog system, checkout tracking, and gated digital access.
Approach
Digital Library — Calibre-Web Automated
Self-host Calibre-Web Automated via Cosmos Cloud.
Why CWA over vanilla Calibre-Web:
- Auto-ingests new books (27+ formats) with configurable conversion to EPUB/PDF
- Metadata fetching via Hardcover API, duplicate detection, cover management baked in
- OIDC/OAuth support → tie into guild portal auth later
- Per-user content filtering by category and custom columns → tier gating
- Kobo sync + Hardcover reading progress integration
- Docker-native, fits the existing Railway/Cosmos infra pattern
Infrastructure (live):
- Cosmos LXC on Proxmox (kuroda.cloud, Beelink PC, 106GB root disk, ~350GB free on LVM thin pool)
- CWA container on
network_mode: host, port 8083 - PDF/comic formats (pdf, cbz, cbr, cb7, cbc, djvu) set to skip EPUB conversion
- Cloudflared container (wisdomsky/cloudflared-web:latest, host mode, web UI on :14333)
- Tunnel
kurodarouteslib.dungeon.club→localhost:8083 - Tailnet stays private — tunnel only exposes CWA, not Cosmos admin or Home Assistant
- SMTP via Resend (
smtp.resend.com:465, fromDungeon Club Library <noreply@dungeonbooks.com>)
Access model:
- Public at
lib.dungeon.clubvia Cloudflare Tunnel - Manual accounts for now, public registration disabled, login rate-limited
- Discord OAuth/OIDC for automated provisioning (next step)
- Discord application → OAuth2 redirect to
lib.dungeon.club - CWA’s OAuth Group-Based Admin Role Management maps Discord roles → CWA permissions
- Discord roles = membership tiers → determines shelves, downloads, features
- Same Discord auth can extend to future
dungeon.clubservices (portal, events, etc.)
- Discord application → OAuth2 redirect to
- Higher tiers unlock more shelves/categories
Physical Lending
- Track inventory in CWA catalog (tag physical copies separately)
- Checkout/return via guild-kiosk NFC tap
- 21-day loan period, auto-reminders via Marty (Discord DM)
- Overdue → XP penalty or checkout freeze (align with rpg-loyalty-system-design)
Tier Gating
| Tier | Physical | Digital |
|---|---|---|
| Base ($10) | 1 checkout at a time | Browse + download core collection |
| Mid ($20) | 2 concurrent checkouts | Full library + new releases + Kobo sync |
| Top | 3 concurrent checkouts | Full library + new releases + physical lending |
Exact tier names TBD — align with roles-classes-jobs once finalized.
Open questions
-
Tailnet-only access or also expose via guild portal with auth proxy?→ Cloudflare Tunnel tolib.dungeon.club - Discord OIDC setup — create Discord app, configure CWA OAuth, map roles to permissions
- Physical book inventory — start with what we own or accept donations?
- If/when nonprofit: revisit licensing terms for institutional digital lending
- Overdue penalty specifics — XP dock, checkout freeze, or both?
- How to handle book requests from members