
Web & phone apps
twodate
An hourly events agent that reads local agendas and keeps only the few worth leaving the house for.
- When
- Jul – Nov 2026
- Status
- Live, private use
- Built with
- PythonFastAPIJinja2SQLiteAPSchedulerClaudeServer-Sent Events
twodate is a personal events agent for a couple. Every hour it collects listings from structured local feeds, drops anything already seen, has Claude score the rest against the couple's own likes and exclusions, and shows only the events that clear the bar. It is a private, server-rendered site, not a public listings page.
The need
Local agendas carry far more events than two people who go out once or twice a week can sift through. The value is in throwing away the roughly 95% that isn't for them.
What was built
- A fetch, normalise, dedup, score and store pipeline with one module per source and structured feeds only (APIs and iCal, never scraping); a failing source logs and returns empty instead of stopping the run.
- Dedup before scoring, so an hour with nothing new makes zero model calls, plus a daily cap on Claude calls reserved before every request.
- Taste as two editable lists, likes as examples and exclusions as rules; each event gets a score from 0 to 100 and up to three category badges.
- A This week page that picks six events with a hard per-category cap and scarcity as the tie-break, using scores already paid for and no extra model call.
- Progressive enhancement throughout: every page renders and every form submits with JavaScript off, and the refresh button upgrades to a live progress view over Server-Sent Events.
- A password on the whole site, locked by default for any new route and limited in wrong attempts per IP, plus on-demand research for any event card.
What was hard
- A silent four-day outage: dropping a field from the model left a NOT NULL column on the deployed SQLite database, so every save failed. Tests only ever saw fresh tables, most hourly runs never inserted, and the failed flush poisoned the session so the error was recorded blank. The fix rolls back before recording a failure, tests the migration against a hand-built legacy table, and makes marking events as seen atomic with storing them, so a failure can no longer swallow a batch.
- The minimum score only applied when an event first arrived, so raising it in Settings changed nothing already stored. It became one predicate shared by the write and the read, with a link to reveal what falls below.
- Null island: two sources send 0,0 coordinates for venues not yet announced, a real point thousands of kilometres away, which the distance filter would have used to bin exactly the secret-venue parties one source was added for. Zero coordinates now mean no coordinates.