Server architecture¶
This document describes the back-end architecture, including the self-hostable server, file storage backends, and synchronization mechanisms that enable cross-device functionality.
Architecture overview¶
flowchart TB
subgraph Clients["Clients"]
Android["Android"]
iOS["iOS"]
Web["Web"]
Desktop["Desktop"]
end
subgraph Server["Server"]
subgraph Metadata["Metadata storage"]
M1["User accounts"]
M2["Book metadata"]
M3["Reading progress"]
M4["Annotations & bookmarks"]
M5["Shelves, tags, series"]
M6["Reading goals"]
M7["Sync coordination"]
end
subgraph FileStorage["File storage (optional)"]
F1["Book files"]
F2["Cover images"]
end
end
subgraph AltStorage["Alternative file storage"]
direction LR
G["Google Drive"]
O["OneDrive"]
D["Dropbox"]
W["WebDAV"]
S3["S3"]
L["Local device only"]
G --- O
O --- D
D --- W
W --- S3
S3 --- L
end
Android --> Server
iOS --> Server
Web --> Server
Desktop --> Server
Server -.->|"OR (user's choice)"| AltStorage
linkStyle 0,1,2,3,4 stroke:transparent,stroke-width:0px;
API endpoints¶
The Papyrus Server exposes a RESTful API:
Category |
Endpoints |
Description |
|---|---|---|
Auth |
|
Register, login, OAuth, refresh tokens |
Users |
|
Profile, preferences, account deletion |
Books |
|
CRUD operations, metadata, cover images |
Shelves |
|
Create, update, organize books |
Tags |
|
Tag management |
Series |
|
Series management and ordering |
Annotations |
|
Highlights, notes, bookmarks |
Progress |
|
Reading position, sessions, statistics |
Goals |
|
Goal creation and tracking |
Sync |
|
Change synchronization |
Storage |
|
Backend configuration |
Files |
|
File upload/download (when server is file backend) |
Full server’s API specification in described in the API section.