Skip to content

Architectural context for LLM

The browser only calls HTTP. The frontend maintains ephemeral UI/state; the backend holds domain, paths, credentials, and persistence. Nginx/Vite act as proxies. Do not move filesystem/metadata rules to the client.

Backend: route β†’ controller β†’ service β†’ PostgreSQL/Redis/storage/provider. Watcher and jobs live in the same process. PostgreSQL is the source of truth; Redis and derivatives are regenerable. Filesystem is the primary source, Drive is optional.

Reader: Library File β†’ capability β†’ content/page endpoint β†’ frontend engine β†’ progress /reading-state β†’ cleanup. PDF requires Range; archives may require limited extraction.

Work is canonical; Library File is a physical file. Category is categoryPath. Existing IDs are contracts.

Administration is an explicit domain: modular frontend in features/admin, reusable APIs, and server-side authorization via requireAdmin. Never confuse users (authentication) with profiles (consumption context), nor persist administrative configuration exclusively in Redis. Consult docs/architecture/admin-panel.md before changing setup, header, roles, profiles, or settings.

Details: architecture, data flow, ADRs.