diff --git a/README.md b/README.md new file mode 100644 index 0000000..20dc234 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Final Wishes + +An encrypted, printable "in the event of my death or incapacity" guide that +lives on a thumbdrive as a single HTML file. No install and no network are +needed to use it. See `PLAN.md` for the design and `docs/MAINTENANCE.md` to +run it. + +## Develop +``` +npm test # unit + build tests (Node 20+) +npm run build # app only -> dist/final-wishes.html +npm run seal # encrypt data/seed.json -> dist/ +node build.js --data F.json --out PATH # custom input/output +``` +The passphrase is prompted for (hidden) or read from `FW_PASSPHRASE`. + +## Layout +- `src/crypto.js` passphrase encryption (PBKDF2 -> AES-256-GCM) +- `src/model.js` document schema and validation; `src/ops.js` edit helpers +- `src/print.js` print helpers; `src/app.js` + `src/style.css` the UI +- `src/template.js` the HTML skeleton shared by `build.js` and in-page Save +- `docs/thumbdrive/` what goes on the drive alongside the HTML file + +## Never commit +`*.pdf` and `data/` hold real personal data and are git-ignored. diff --git a/docs/MAINTENANCE.md b/docs/MAINTENANCE.md new file mode 100644 index 0000000..1537953 --- /dev/null +++ b/docs/MAINTENANCE.md @@ -0,0 +1,87 @@ +# Maintaining Final Wishes + +For the owner. The executor's instructions are in `docs/thumbdrive/README.txt`. + +## What you have +One file, `final-wishes.html`: the app plus your data, encrypted with a +passphrase (PBKDF2-SHA256, 600,000 iterations, AES-256-GCM). It runs in any +browser, offline. There is no recovery if the passphrase is lost. + +## Thumbdrive layout +``` +final-wishes.html the encrypted guide +README.txt copy of docs/thumbdrive/README.txt (fill in the blanks) +backups/ dated copies, final-wishes-YYYYMMDD.html +``` +Fill in the two blanks in `README.txt` with *where* the passphrase and any +printed copy are kept, never the passphrase itself. + +## First-time setup +Either route gives the same kind of file: + +- **In a terminal:** `npm run seal` encrypts `data/seed.json` (prompts twice + for a passphrase, minimum 12 characters). To write straight to the drive: + `node build.js --data data/seed.json --out /mnt/f/final-wishes.html` + (WSL needs the drive mounted: `sudo mount -t drvfs F: /mnt/f`). +- **In the browser:** `npm run build`, open `dist/final-wishes.html`, import + a JSON file or start a new document, then Save. You will be asked to + choose a passphrase. + +After sealing, `data/seed.json` is still plaintext. Delete it (and see +"Security clean-up" below). `data/` and `*.pdf` are git-ignored on purpose. + +## Updating +1. Open `final-wishes.html` from the drive, unlock, click **Edit**. +2. Change things, **Done editing**, **Save** (or Ctrl/Cmd+S). + - Chrome/Edge: pick the drive file once; later saves overwrite silently. + - Firefox/Safari: a new `final-wishes.html` downloads. Copy it over the + old one on the drive. +3. Saving updates "Last update" and the per-record dates, which show on the + printed footer. +4. If you changed the passphrase, the old file still opens with the *old* + one until you save and replace it. + +## Backups +- **Backup copy** downloads `final-wishes-YYYYMMDD.html` to your Downloads + folder. Move it into `backups/`. +- Keep a second copy off the drive. The file is encrypted, so cloud storage + or a second drive is reasonable. Thumbdrives fail without warning. +- After any important change, open the *copy* once and unlock it to prove it + works. + +## The passphrase (the real single point of failure) +- Do not store it on the drive or in the same place as the drive. +- Good options: a sealed envelope with your will in the fire safe, or with + your attorney, plus a second person who knows where it is. +- Make sure your executor knows the drive exists and where the passphrase + is kept. The blanks in `README.txt` exist for this. +- Use a few random words (12+ characters is enforced). Do not reuse the + LastPass master password. + +## Printing +**Print...** offers "Withhold secrets" (safe overview) and "Include +secrets" (full copy). Print on Letter paper with browser headers/footers +off. A full copy is as sensitive as the passwords on it: store it in the fire +safe and shred superseded copies. Check footer placement on your own printer +the first time; it was only verified in Chromium. + +## Keep it current +Nothing in the app reminds you to review. Set a yearly reminder. Things that +go stale: card expiry dates, account balances and metal values, advisors' +contact details, anything marked TBD. The "Still to add" section lists +known gaps. + +## Security clean-up (issue #8) +- Destroy plaintext copies of the source material once the encrypted file is + verified: `abi-wishes.pdf`, the Word version, and `data/seed.json`. +- Rotate every password and PIN that appeared in the PDF (LastPass master + password, computer PIN, ATM PIN, bank logins), since it existed in + plaintext for years. +- Treat the encrypted file like any sensitive file: an attacker who gets it + can try passphrases offline forever, so the passphrase strength is all that + protects it. + +## Limits +This is a guide, not a legal document. It does not replace a will, health +care directive or powers of attorney, and the executor may still need +those to be granted access to accounts. diff --git a/docs/thumbdrive/README.txt b/docs/thumbdrive/README.txt new file mode 100644 index 0000000..4e6a7f0 --- /dev/null +++ b/docs/thumbdrive/README.txt @@ -0,0 +1,44 @@ +IN THE EVENT OF MY DEATH OR INCAPACITY +====================================== + +This drive holds one file, final-wishes.html. It is an encrypted guide to +my affairs: accounts, documents, contacts, and what to do and in what order. +It was written for you to use. + +TO OPEN IT + 1. Plug in the drive. + 2. Double-click final-wishes.html (it opens in your web browser: + Chrome, Edge or Firefox all work). + 3. Type the passphrase. It is NOT on this drive. + The passphrase is kept: ______________________________________ + 4. Start with the "Start here" section, then read the section titled + "What to do with PC" (my business) when you are ready for it. + +You do not need internet access, and nothing you do here is sent anywhere. + +TO PRINT IT + Click "Print..." at the top, then choose: + - "Withhold secrets": a safe overview with no passwords or PINs. + - "Include secrets": the full copy. Keep it locked away and shred it + when you are finished. + In the browser's print window, set Paper size to Letter and turn OFF + "Headers and footers". Items marked TBD are things I never filled in. + +IF YOU NEED TO CHANGE SOMETHING + Click "Edit", make the change, click "Done editing", then "Save". + Chrome and Edge ask where to save the first time: choose this drive and + the same file name, final-wishes.html, and agree to replace it. + Firefox downloads a new final-wishes.html to your Downloads folder + instead: copy it onto this drive over the old one. + "Backup copy" makes a dated copy (final-wishes-YYYYMMDD.html); keep + those in the backups folder. + +IF THE PASSPHRASE DOES NOT WORK + It is case-sensitive and spaces matter. There is no way to recover a + lost passphrase: the file cannot be opened without it. A printed copy, + if one exists, is kept: ______________________________________ + +FILES ON THIS DRIVE + final-wishes.html the encrypted guide (the only file you need) + backups\ older dated copies of the same file + README.txt this page diff --git a/docs/thumbdrive/backups/.gitkeep b/docs/thumbdrive/backups/.gitkeep new file mode 100644 index 0000000..e69de29