How sudashiii/sake works
Sake is a self-hosted reading stack: a web library and reader backed by server APIs, with KOReader synchronization, provider-based book imports, annotations, statistics, and OPDS/WebDAV access. The principal workflow is managing or discovering a book, then reading it and syncing progress across devices. The graph preserves documented capabilities, but many route-to-use-case and UI-to-API connections are not shown in the sampled source, so those links are omitted rather than inferred.
Main entry points: +server.ts OPDS catalog · S3Storage.ts Object storage · library Library views · routes Auth client routes
Components 25
Web application
- Web interface
sake/src/lib/components - Account access
sake/src/lib/client/services/authService.ts - Auth client routes
sake/src/lib/client/routes
Library management
- Library views
sake/src/lib/features/library - Shelf management
sake/src/lib/components/sidebar/Sidebar/sidebarShelfManager.svelte.ts - Library API
sake/src/routes/api/library - Library operations
sake/src/lib/server/application/use-cases - Annotations hub
sake/src/routes/api/annotations
Reading and devices
- Web reader
sake/src/lib/features/reader - Device sync API
sake/src/routes/api/devices - Progress sync
sake/src/routes/api/library/progress/+server.ts - KOReader plugin delivery
sake/src/lib/server/application/use-cases/GetKoreaderPluginDownloadUseCase.ts
Discovery and insights
- Book search
sake/src/lib/features/search/searchView.ts - Search API
sake/src/routes/api/search/+server.ts - Reading statistics
sake/src/lib/features/stats/statsView.ts - OPDS catalog
sake/src/routes/api/opds/+server.ts - WebDAV access
sake/src/routes/api/dav/[...path]/+server.ts
Server and integrations
- Application services
sake/src/lib/server/application - Infrastructure config
sake/src/lib/server/config/infrastructure.shared.js - Object storage
sake/src/lib/server/infrastructure/storage/S3Storage.ts - Feed renderer
sake/src/routes/api/opds/feedBuilder.ts - Basic auth
sake/src/routes/api/opds/auth.ts - Object listing
sake/src/lib/server/infrastructure/storage/S3ListPagination.ts
Other components
- Web user
- S3-compatible storage
Connections 22
- Web user → Web interface: uses
- Web user → Library views: manages books
- Web user → Book search: finds books
- Web user → Web reader: reads books
- Web user → Annotations hub: manages notes
- Web user → Reading statistics: reviews activity
- Web user → OPDS catalog: browses catalog
- Web user → WebDAV access: uses access
- Account access → Auth client routes: calls
sake/src/lib/client/services/authService.ts - Auth client routes → Web user: requests account access
- Library views → Library API: manages collection
- Library API → Library operations: dispatches operations
- Shelf management → Library views: organizes shelves
- Book search → Search API: searches catalog
- Device sync API → Progress sync: syncs progress
- Web reader → Progress sync: syncs reading state
- KOReader plugin delivery → Device sync API: supports KOReader
- OPDS catalog → Basic auth: checks access
sake/src/routes/api/opds/+server.ts - OPDS catalog → Feed renderer: renders navigation
sake/src/routes/api/opds/+server.ts - Infrastructure config → Object storage: configures
sake/src/lib/server/infrastructure/storage/S3Storage.ts - Object storage → S3-compatible storage: reads and writes
sake/src/lib/server/infrastructure/storage/S3Storage.ts - Object storage → Object listing: lists objects
sake/src/lib/server/infrastructure/storage/S3Storage.ts