2 votes · 1 poll
Votes, proposals, elections and meeting times, shared by link: twelve voting methods, and anyone can edit any poll.
What fold does here
Polls, their options and their votes are tables, with one ballot per voter, so voting again replaces your ballot. Every tally is a view kept current as ballots arrive: mentions and points per option, availability for meeting times, turnout, grouped rankings for elections, and reasons. Search across polls is a view too.
Fold refuses a vote outside its poll's open window or of the wrong shape. That rule joins every vote with its poll and is checked on each write.
Why it shows off fold
Tallies are the textbook case for incremental views: each new ballot adjusts a few counts instead of a recount. Editing is where it gets interesting. Remove an option and every tally reads ballots through the options that still exist, so results correct themselves, with no migration or batch job. And because a vote is a replaceable row, changing your mind is just a new ballot: fold retracts the old one from every total.
Worth trying
- Open a poll in two windows, vote in one, and watch the other's results move.
- Vote, then change your vote: the old ballot leaves every total.
- Make a ranked-choice poll and watch the rounds.
Still app code
Instant-runoff and STV rounds, which are iterative and transfer fractional votes, run in the app over fold's grouped rankings, as does checking a ballot's shape before it's written.
Press \ in the app to watch fold's commits as they happen.