The voting service invites eligible participants, accepts ballots, and publishes approved election or poll results.

Documentation

AreaStart here
Ballot behavior and result calculationVoting model
Authentication and invitation tokensAuthentication
Election administrationOperations guide
Routes and exact request behaviorAPI reference
Token lifecycle and recoveryToken management

The Resident voting home page with the election lookup form and election guide Resident voting home · July 2026

What a voter experiences

  1. Receive an email invitation or a magic link to a personal election list.
  2. Open the election and review its description, choices, and any supporting documents.
  3. Submit the ballot before the election closes.
  4. See a confirmation that the ballot was accepted.
  5. View results if and when the election administrator publishes them.

The service validates each voting token and prevents it from being reused. Ballots are stored separately from invitations and email addresses; the election ID is the only link back to the election.

What an administrator does

StageTypical work
PrepareCreate the election or poll, set its dates and ballot type, add choices, and optionally link a Notion page
InviteGenerate individual tokens or send a magic-link invitation covering multiple elections
MonitorCheck delivery, participation, audit events, and reminder status
CloseClose voting, review the calculated result, and publish or email it when approved

Scheduled jobs keep Notion status in sync, send reminders, and deliver result email when configured. The operations guide covers the checks to run before and after these actions.

Imported or certified results

An administrator can attach a certified legacy or imported result that replaces the calculated result on the public results page.

  1. Open the election and find Manual Results (Legacy / Imported).
  2. Add the certifier, certification time, or notes when available.
  3. Paste a result object and select Save Manual Results.
{
  "contests": [
    {
      "label": "President",
      "items": [
        { "label": "Alice", "votes": 120 },
        { "label": "Bob", "votes": 95 }
      ]
    }
  ]
}

Every item needs a label and a non-negative whole-number vote count. Use Clear Manual Results to return to calculated results. Maintainers can use PUT /admin/elections/:id/manual-results and DELETE /admin/elections/:id/manual-results for the same actions.

Notion pages and attachments

When an election is linked to the “Any Voting” Notion database, the service can:

  • pull its name, description, supporting files, and stable Notion page link;
  • push the election status and public results link; and
  • refresh signed file links during synchronization.

The public election page shows supporting documents only when they exist. If an individual Notion file link expires, use View attachments in Notion. See Notion integration for setup, timing, and retry behavior.

How the service works

  • A Hono application on Cloudflare Workers serves both public and admin routes.
  • D1 stores elections, token hashes, ballots, invitations, email groups, and audit events.
  • A Durable Object coordinates token validation.
  • Cloudflare Access protects browser-based administration; an admin API key supports approved service calls.
  • Resend sends invitations, reminders, and result email.
  • Per-route rate limits protect voting and administrative actions.
flowchart LR
  VOTER["Voter"] -->|invitation token| VOTE["Voting service"]
  ADMIN["Election administrator"] -->|Cloudflare Access| VOTE
  VOTE --> DB[("D1 elections and ballots")]
  VOTE --> TOKENS["Token coordinator"]
  VOTE --> EMAIL["Resend"]
  VOTE <--> NOTION["Notion"]

Guides by task

TaskGuide
Run or troubleshoot the serviceOperations
Choose a ballot and understand its resultVoting system and results calculation
Understand invitations and tokensMagic-link invitations and token management
Configure NotionNotion setup and integration behavior
Review email behaviorEmail system and distribution lists
Review security controlsAuthentication, rate limiting, and audit logging
Look up an endpoint or schema changeAPI reference and database migrations
Run the test suiteTesting strategy

For shared trust boundaries and response conventions, see the security model and API contracts.

3 items under this folder.