david anderson
← All work Project 04 · Social

Movie Night Vote

Ranked voting for picking a movie with friends. Everyone ranks a top three on their own phone, nobody sees anyone else's picks, and ties are broken by a set rule.

Roles
Product owner, analyst, engineer
Platform
Mobile web app
For
Friends and families
Runs on
Cloudflare Workers and D1, or Docker
01 · Problem

Picking a movie as a group takes too long.

Single-choice polls tend to end in a tie, or in a film most people only tolerate, because nobody's second choice counts.

A group-chat poll gives everyone one vote. With five people and five films, that's often a five-way tie. Seeing live results also nudges late voters toward whatever's winning. Passing one phone around doesn't work when people are in different rooms or different houses.

  • Job to be done: “Get us to a pick most of us are happy with, quickly.”
  • Idea: Ranking a top three shows how much people like each option, not just their favourite.
02 · Roles

Choosing the voting rules, then building around them.

I picked the voting method, wrote the rules (points, tie-breaks, when results show), decided how private ballots should be, and took it from a pass-the-phone page to shared links on two kinds of hosting. I built it with Claude Code, and the rules are covered by unit tests.

  • Business analystVoting methodCompared voting methods and chose 3-2-1 points, because anyone can check the result by hand.
  • Product ownerRulesTie-breaks: most first-place picks, then most second-place picks, then a shared place.
  • Product ownerPrivacyResults appear only once everyone has voted, and never show who picked what.
  • Software engineerHostingOne codebase with two targets: Cloudflare Workers with D1, or Docker on a home network.
  • Software engineerAbuse limitsUnguessable links, rate limits, expiry and storage caps for the public version.
  • Project managerQualityUnit and UI tests (Vitest, Testing Library) that every change has to pass.
03 · Requirements

What it had to do

An excerpt of the requirements, each written so it could be tested.

movie-night-vote / rules.mdexcerpt
  1. Enough to vote on. At least 2 voters and 3 movies before a vote can start.
  2. Ranked ballot. Each voter picks 3 different movies: 1st gets 3 points, 2nd gets 2, 3rd gets 1.
  3. Tie-break. Equal points are split by more 1st-place picks, then more 2nd-place picks. Movies still level share the place.
  4. Hidden until complete. Until the last vote is in, the link shows only how many people have voted. Not even the creator sees picks.
  5. One vote each. Each name votes once, even if two votes arrive at the same moment (one database row per ballot).
  6. No keys in the page. Movie search runs on the server, so the API key never reaches the browser.
04 · Decisions

Decisions and trade-offs

Points instead of instant runoff

A simple 3-2-1 count rather than round-by-round elimination.

WhyAnyone can check the result in their head. For movie night, being easy to follow mattered more than being theoretically optimal.

The link is the key

No accounts. Links are 128 random bits, and there's no list of votes anywhere.

WhyFriends won't sign up to pick a film. The trade-off is written down: fine among friends, not a secure ballot.

Two hosting options, one codebase

Cloudflare Workers with D1 for a public site, or Docker restricted to a home network.

WhySome people want nothing to set up; others want nothing on the internet.

Keep the offline mode

“Vote on this device” still runs the original pass-the-phone vote, with nothing saved.

WhyIt works without a signal and is the most private option.

05 · Alternatives

How it compares

The usual options are a group-chat poll, a general-purpose poll site, or a random-movie picker.

Movie Night Vote and typical alternatives
NeedTypical alternativeMovie Night Vote
How much people like each optionOne vote each; second choices are ignoredA ranked top three, scored 3-2-1
TiesA coin flip, or a debateBroken by first-place, then second-place picks
HerdingLive results sway late votersHidden until the last vote is in
Adding filmsType titles by handTitle search with posters (OMDb)
PrivacyAccounts, ads, trackingNo accounts; votes expire after 30 days
06 · Stack

What it's built with

Frontend
React 19, TypeScript, Vite, Tailwind CSS 4
Cloudflare API
A Worker with static assets, a D1 database, a daily cleanup cron, platform rate limiting
Home API
A Node and TypeScript server in Docker, limited to the local network by default
Integrations
OMDb movie search, cached for a day to stay within the free tier
Security
128-bit links, per-visitor rate limits, a 64 KB request cap, strict headers
CI
Vitest, Testing Library, coverage, ESLint, TypeScript checks; Renovate for updates
AI-assisted coding
Claude Code
How it was built

The rules and the privacy model were mine to decide. Claude Code implemented them, and the tie-break rules have unit tests so the scoring can't change by accident.

07 · Status

Where it is now

Working. It runs on Cloudflare Workers with D1, or in Docker at home.

Next: A filter for films everyone in the group can stream tonight.