piech.dev

Back to Projects github.com/Tenemo/sealed-vote

sealed.vote

Netlify Status API status


Production E2E tests CI Tests coverage


Node version License


sealed.vote is a browser-based 1-10 score voting application built around homomorphic encryption. Voters score each choice from 1 to 10, and the system is designed so that individual votes remain hidden from everyone, including the server, while the final tally can still be computed.

Overview

The frontend and backend both rely on threshold-elgamal, a TypeScript cryptography library used for the encrypted voting flow.

How it works

  1. A poll creator opens a poll and shares it with voters.
  2. Voters register and receive voter-specific tokens.
  3. Once registration closes, each voter generates a keypair and submits a public key share.
  4. After all shares are present, voters encrypt their scores locally and submit only ciphertexts.
  5. The backend combines encrypted votes into encrypted tallies.
  6. Voters submit decryption shares so the final aggregate result can be revealed without exposing individual ballots.
  7. Once the poll is complete, the backend publishes the raw plaintext tally products, the rounded geometric-mean scores, and the ordered decryption shares used to reveal them.
  8. The frontend verifies the published results locally before showing the final ranking.

See docs/voting.md for the protocol and phase model, and docs/endpoints.md for the current API surface.

Tech stack

Offline and reconnect recovery

Offline and reconnect recovery is a core feature of the app, not a best-effort extra.

Local development

Requirements

Running the full stack

From the repository root:

pnpm install
pnpm local:reset
pnpm dev

pnpm local:reset recreates the Docker services, resets the database, and seeds local sample data in one step.

The default local setup serves:

Workspace documentation

License

This repository is licensed under AGPL-3.0-only. See LICENSE for the full text.