Build encrypted file storage and, before the code, write the threat model. The README opens with it. The threat model must state plainly: who this protects against (a curious or breached server operator), who it does not (a hostile server serving modified client code, malware on your own machine, anyone with your passphrase), and what happens when the passphrase is lost. Stack: a client — command-line and a browser page — plus a dumb storage server. The server stores ciphertext and metadata and can decrypt nothing. Consider standing on an existing audited encryption tool rather than writing the primitives. Key hierarchy, which is the design decision everything else follows from: - A random 256-bit **master key** encrypts per-file keys. - The master key is wrapped by a key derived from your passphrase with Argon2id at parameters you document. - Changing the passphrase re-wraps the master key only. Files are never touched. Demonstrate this in a test: change the passphrase, prove every file still decrypts, prove no ciphertext byte changed. - Each file gets its own random key, wrapped by the master key. Sharing a single file means sharing that file's key, not the master. Recovery, and be honest about it: generate a recovery code at setup that wraps the master key a second way, displayed once, with a forced confirmation that the user has stored it. State in the interface, not just the docs, that losing both the passphrase and the recovery code means the files are unrecoverable — because that is the actual property, and hiding it is how people lose their data. Sharing: a share produces a link with the file key in the URL fragment, so the server still learns nothing. Expiry and download limits enforced server-side on the ciphertext. Metadata: encrypt filenames and folder structure too, and say clearly what necessarily leaks anyway — file sizes, upload times, the shape of the folder tree, and access patterns. Integrity: authenticated encryption throughout, and a verification command that checks every stored file's tag and reports corruption, since silent bit rot in ciphertext is unrecoverable. Write tests for passphrase change not re-encrypting files, for recovery-code unwrapping, for tampered ciphertext being rejected rather than producing garbage, and for the verification command detecting a flipped bit. Do not invent primitives, and do not add a password-reset path — it would be a back door by definition.