Files
final-wishes/README.md
Eric Bell a2fcc65759 Show the app version at the top of the page (Ver YYMMDDX)
Adds src/version.js, bump-version.js and a pre-commit hook that bumps the
version in commits that change the app.

Closes #15

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 19:01:33 -05:00

43 lines
2.1 KiB
Markdown

# 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 (sections, records, and the
optional print `header`); `src/ops.js` edit helpers
- `src/images.js` image-field helpers and the import pipeline (PNG/JPEG only,
downscaled and re-encoded in the browser)
- Visual sequences (numbered pictures with optional text, in any section) are
described in `docs/MAINTENANCE.md`.
- `src/version.js` the version shown at the top (`Ver YYMMDDX`); `npm run bump` advances it by hand;
a pre-commit hook (`npm run hooks` once per clone) does it on every commit
that changes the app
- `src/print.js` print helpers (secret masking, header layout)
- `src/app.js` + `src/style.css` the UI, including the Print header panel
- `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
## Upgrading a file to a newer build
The data lives in the encrypted payload of each `final-wishes.html`, not in
the app code, so a rebuild never changes an existing file. To move data into a
newer build: `npm run build`, open `dist/final-wishes.html`, choose
**Open your existing Final Wishes file**, unlock it, then Save under a *new*
file name and verify it before replacing the old one. Never point
`npm run seal --out` at a file you want to keep: it builds from `data/seed.json`.
## Never commit
`*.pdf` and `data/` hold real personal data and are git-ignored.