How mosalah992/arcaneum works
The Arcanaeum is a browser-based archive for Skyrim’s books, combining a searchable catalogue with live in-game holdings. Readers enter through the disc-and-passphrase screen, then browse or search the catalogue; the client fetches metadata, full-text matches, call-number lookups, and availability from separate API routes. The API uses D1 for catalogue/search and visit-count data, and Google Sheets for holdings. The README documents the gate middleware and FTS5 search; some route and middleware implementation details were not sampled, so uncertain internal links are omitted.
Main entry points: api.ts API client · _middleware.ts Route guard · 0001_create_tables.sql D1 archive · insert.ts Disc entry
Components 18
Reader experience
- Disc entry
src/screens/insert.ts - App frame
src/main.ts - Hash router
src/lib/router.ts - Catalogue
src/screens/catalogue.ts - API client
src/lib/api.ts
Archive API
- Gate route
functions/api/gate.ts - Route guard
functions/api/_middleware.ts - Tome listing
functions/api/tomes/index.ts - Full-text search
functions/api/search.ts - Call lookup
functions/api/resolve/[callNumber].ts - Holdings route
functions/api/availability.ts - Holdings logic
functions/lib/availability.ts - Visit register
functions/api/register/index.ts
Archive data
- Book corpus
content/library/AR-I-001.md - D1 archive
migrations/0001_create_tables.sql
External services
- College register
- Google Sheets
Other components
- Reader
Connections 26
- Reader → Disc entry: starts at
- Disc entry → API client: checks gate
- Disc entry → Hash router: navigates
- App frame → Hash router: mounts routes
- App frame → API client: counts visits
- Hash router → Catalogue: renders
- Catalogue → API client: requests data
- API client → Gate route: checks or opens
- API client → Tome listing: lists tomes
- API client → Full-text search: searches text
- API client → Call lookup: resolves number
- API client → Holdings route: fetches holdings
- API client → Visit register: reads count
- Route guard → Gate route: exempts route
- Route guard → Tome listing: guards routes
- Route guard → Full-text search: guards routes
- Route guard → Call lookup: guards routes
- Route guard → Holdings route: guards routes
- Tome listing → D1 archive: reads metadata
- Full-text search → D1 archive: searches corpus
- Call lookup → D1 archive: reads metadata
- Visit register → D1 archive: reads count
- Holdings route → Holdings logic: loads holdings
- Holdings logic → Google Sheets: reads register
- Google Sheets → College register: accesses
- Book corpus → D1 archive: seeded as tomes