Design decisions
The architecture decision records (ADR) of Rostdav: why the stack, storage model, sign-in, sharing, trash, web interface, two-factor and database were chosen.
Every large decision is recorded here with its context, the alternatives and the consequences.
- ADR 0001 · Technology stackRostdav is a lean file server that supports the unmodified Nextcloud apps. Requirements that influence the stack:
- ADR 0002 · Storage model for files and metadataRequirements: stable file IDs across rename/move, separation of logical and physical paths, versioning, atomic writes, protection against path traversal,...
- ADR 0003 · App passwords, Login Flow v2 and brute-force protectionNextcloud apps sign in through Login Flow v2 and afterwards send username + app password via HTTP Basic on every request (docs/compatibility.md, fixtures...
- ADR 0004 · Shares and the permission modelUntil now a node is reachable only by its owner (authorize() compares owner IDs). M9 adds sharing with other users and public links, as the Nextcloud apps...
- ADR 0005 · TrashClients delete with DELETE and later list, restore or purge through /remote.php/dav/trashbin/<user>/. Versions and shares of a deleted file must come back...
- ADR 0006 · Web interface — sessions, CSRF, first sliceUntil now only apps sign in (Basic with app password / account password, Login Flow v2). The web interface is the first place where a browser holds...
- ADR 0007 · Optional two-factor authentication (TOTP)Browser sign-in (web interface and the Login Flow v2 page) is protected by the account password only. Users who want more can add a time-based one-time...
- ADR 0008 · Metadata database: Turso Database instead of SQLiteRostdav kept its metadata in SQLite through sqlx. The project owner decided to move to Turso Database (formerly Limbo), a from-scratch rewrite of SQLite in...
- ADR 0009 · Version check and updaterThe project owner asked for an About page, release notes, a version check and an updater. The About page and the release notes of the running build are...
- ADR 0010 · The admin socketSince the move to Turso Database (ADR 0008, release 0.3.0) the process that opens the database locks its file for itself. A second process, such as rostdav...
- ADR 0011 · Importing a Nextcloud data directoryA server that already runs Nextcloud has a data directory with the files of its users (<user>/files/…), the versions Nextcloud kept...
- ADR 0012 · The search indexSearch was a filter on one folder. The owner asked for search by name across everything a user can reach, and full-text search, for the web interface and...
- ADR 0013 · PDF and Office files in the searchUsers want to find a file by the words inside a PDF, Word, Excel, PowerPoint or OpenDocument file. The parsers for these formats read files that anybody...