Inspiration
When someone dies, their family inherits a puzzle. Which bank? Which insurer? Who has the spare key? Picture Alex, whose parents live in Lisbon and are more comfortable in Portuguese. If Alex died tomorrow, they would not know which bank to call. Most families find out what is missing when it is too late to ask.
So the task was clear: let people leave that map now, keep it private while they are alive, and release it only if they stop checking in, without trusting a server with the keys.
What it does
Check in, and get a calavera. You pick a rhythm. Checking in is one press, and each one earns a calavera: a playful mock epitaph about you, in the Day of the Dead tradition of calaveras literarias. An optional proof-of-life ping lets a phone automation extend the deadline when you open an app, up to a hard cap, so you still have to check in yourself.
Stop checking in, and the switch runs. A reminder, a final reminder, a grace period, then release. Each keeper gets a one-time link to a calm release portal. Property tests check that the state machine never releases early.
Nobody can read the vault but your keepers. Entries are encrypted in your browser with AES-GCM. The vault key is split into k-of-n shares with Shamir's secret sharing, and you send each keeper their share from your own email app. The server never sees a share in plain form. Keepers combine any k shares in their own browser, and a memorial candle lights for each one.
Rehearse your death. The Death Drill sends AI only the entries you mark "AI may use", plays out what your family would face on day 1, 3, 7 and 30, and lists the gaps, like a bank with no instructions. Each gap has a button that opens the right entry form. A rule-based drill takes over if the AI is unavailable.
Before I die I want to... A short private list of goals. It is never released.
A demo anyone can finish. "Try the demo" needs no sign-up. A demo day lasts one second, emails land in an in-app outbox, and a spotlight tour walks through the whole loop: check in, rehearse, stop, then open the vault as a keeper, in about two minutes.
Why it is a Frankenstein
It stitches together parts that were never meant to meet:
- a 1979 secret-sharing scheme
- browser cryptography
- a language model that rehearses your death
- a serverless cron state machine
- phone automations as a liveness signal
- Mexican folk poetry
The owner side is playful, with papel picado, a candle that burns down, a ghost guide and calaveras. The keeper side is quiet and kind, because the person reading it may be grieving.
How I built it
- Server: a Cloudflare Worker serves a Hono API and an hourly Cron Trigger that advances the check-in state machine. Data lives in D1.
- Client: React with Vite and Tailwind CSS v4.
- Cryptography: Web Crypto (AES-GCM, PBKDF2) and the audited shamir-secret-sharing library.
- AI: Groq runs the calaveras and the Death Drill, with Workers AI as a fallback. A validator with reason codes checks every reply, and every AI feature has a non-AI fallback.
- Email: Resend sends reminders and release links.
- Tests: Vitest and fast-check.
- Fonts: self-hosted, so the app makes no third-party font requests.
Challenges I ran into
- Showing time passing. A dead man's switch is about weeks of silence, so the demo needed a clock the visitor controls (one day per second) and a guided path that never loses them.
- Keeping shares off the server. Each share goes out through the owner's own email app. The server only keeps a copy encrypted with the vault key, which is useless on its own.
- Making AI dependable. A free tier with tight rate limits meant validation, retries and real fallbacks for every AI feature.
- Two tones in one product. Jokes for the owner, never for the grieving keeper. Steering and a test keep that line.
Accomplishments that I'm proud of
- Live and complete: the whole loop runs in about two minutes with no sign-up.
- Tested: 188 app tests, including property tests for the cryptography and the state machine, plus 12 for the video pipeline.
- Private by design: shares never touch the server in plain form, and the AI sees only what you flag.
- Accessible: WCAG 2.1 AA contrast recorded for every colour pair, keyboard-only and reduced-motion runs, and live regions for status changes.
- Built fast, with a record: six specs, 83 journal entries and 120 commits in nine days.
What I learned
Specs made a long build with an AI agent predictable. Each task had a definition of done, and the journal recorded what happened. Steering kept the voice and the data rules consistent across sessions. And checking the live site after every deploy found the bugs that mattered most to a first-time visitor.
What's next for Last Will.exe
- A security review of share delivery, the release thresholds and in-browser recombination
- Legal review of the disclaimer
- A native app that uses on-device signals as proof of life
- A "living wake", where friends write your eulogy now and it is held for release
How Kiro was used
Kiro built the whole app, spec first, in the Kiro IDE.
Specs. Six specs in .kiro/specs/, each with requirements, design and tasks, adding up to 109 requirements, over 550 acceptance criteria in EARS form, and 98 completed tasks and sub-tasks (the rest are optional):
| Spec | Covers |
|---|---|
vault-checkin-release |
the core switch |
legacy-rehearsal |
AI calaveras and the Death Drill |
haunted-ui |
the spooky owner side and the calm keeper side |
owner-redesign |
a researched redesign of the owner screens |
demo-tour |
the spotlight tour |
demo-video |
the pipeline that recorded this project's demo video |
Code followed the spec, and the spec changed when the build exposed a gap. Bugs found later went through the same flow: each one became a numbered task or a follow-up commit tied to its spec, not an ad hoc edit.
Steering. Five files load into every session:
product.mdtech.md, which rules out unaudited crypto librariesstructure.mddata-policy.md, which holds the must-not-store list and the AI data boundaryux-tone.md, which sets playful owner screens, calm keeper screens, and all copy in one file
A copy-style test enforces the voice rules on every build.
Hooks.
- Run property-based tests on crypto/stateMachine save: a PostFileSave hook that reruns the property tests whenever the crypto code or the state machine changes.
- Spec Task Journal: a PostTaskExec agent hook that appends a line to
docs/kiro-journal.mdafter each spec task, with the date, the Kiro features used and one notable fact. It has 83 entries.
MCP. The Cloudflare docs MCP server answered platform questions during the build. For example, it showed that D1 returns BLOBs as number arrays, so ciphertext is stored as base64 text.
Property-based tests. fast-check properties check that:
- any k shares rebuild the key and k minus 1 do not
- tampered ciphertext fails
- the state machine never releases early, and pings never hasten a release
- no "Before I die" row is ever released
- the AI request contains only rows the user flagged
- the tour never moves backwards
- a tour bubble never covers its target
They caught real bugs. One property found a 1e+21 index leaking into a link before any user could.
Kiro checked its own work. Each task ended with scripted headless browser runs at desktop and phone sizes, with reduced motion on and off, plus a keyboard-only pass. One example: 42 of 42 checks per size for the tour.
The live review loop. After each deploy, checks on the live site fed new tasks back into the specs:
- The demo clock started ticking behind the disclaimer, so it now waits for the visitor.
- The Death Drill once suggested writing down account details, so a credential filter now drops those tips.
- AI replies failed validation half the time. Reason codes, one retry and tighter prompts took that from 5 of 10 to 10 of 10.
- Mail scanners open links, so a check-in link now waits for a deliberate press.
Kiro made the demo video. Spec 6 is a recording pipeline Kiro wrote and ran. It drives the live site through the tour in a headless browser and captures frames at 1080p. It adds a visible cursor, voices the script with a macOS voice, and times the clock narration to each state change on screen. Then it assembles everything with ffmpeg, along with captions. The pipeline has 12 tests of its own.
Built With
- cloudflare-d1
- cloudflare-workers
- fast-check
- ffmpeg
- groq
- hono
- kiro
- playwright
- react
- resend
- shamir-secret-sharing
- tailwindcss
- typescript
- vite
- vitest
- web-crypto
- workers-ai