Skip to content

Add borda.html: stateless ranked-choice voting tool#38

Closed
Quidge wants to merge 1 commit into
mainfrom
claude/borda-voting-tool-MA24o
Closed

Add borda.html: stateless ranked-choice voting tool#38
Quidge wants to merge 1 commit into
mainfrom
claude/borda-voting-tool-MA24o

Conversation

@Quidge
Copy link
Copy Markdown
Owner

@Quidge Quidge commented Apr 19, 2026

Summary

A single-file Borda-count ranked-choice voting tool for small groups.

  • Organizer opens the tool, enters a title + 2-12 choices + expected voter count, and gets a shareable URL. The entire election is packed into the URL fragment — nothing is stored on a server.
  • Voters open the link, type their name, rank the choices with up/down arrow buttons (simpler and more reliable than drag-and-drop on mobile), and copy the resulting short ballot string to send back.
  • Anyone can open the same link, flip to the Tally tab, paste all ballots, and see the Borda count result. Rejected ballots come with a human-readable reason; ties share a rank (standard competition ranking).

Designed mobile-first: large tap targets, 16px inputs to avoid iOS zoom-on-focus, system font stack, no external assets. URL-fragment encoding uses base64url with SHA-256 checksum derivation via Web Crypto.

Screenshots

Desktop — create a poll, generate a shareable link:

create

create-link

Mobile — vote and generate a ballot string:

Desktop — tally view with Borda-count results:

tally-desktop

Mobile — tally view:

Test plan

Manually tested end-to-end via Playwright (uv run python -m http.server + Playwright driving Chromium at desktop 900×700 and mobile 390×780 viewports):

  • Create mode: fill title + 3 choices + voter count, generate share URL with #e= fragment
  • Vote mode (mobile): rename, reorder with up/down arrows, generate ballot string
  • Tally mode: paste 3 ballots, see correct Borda count (Thai 4pts, Pizza 3pts, Sushi 2pts)
  • Invalid ballots surface with a reason (malformed + checksum mismatch)
  • Ties share a rank (two items tied for 1st → next distinct rank is 3rd)
  • Mobile layout at 390px wide — large tap targets, no horizontal overflow

A single-file Borda count tool for small groups. Organizer creates a
poll, shares a URL, each voter ranks the choices and sends back a short
ballot string. Anyone can paste the ballots into the tally view to see
the Borda-count result. Nothing is stored on a server — the election
lives entirely in the URL fragment and the ballot strings lives in
whatever message channel the voters use.

https://claude.ai/code/session_01819o9wgjDQMa7xHTBgKfAQ
@Quidge Quidge closed this Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants