polls on atproto pollz.waow.tech
atproto zig

Files
readme.md

pollz #

polls on AT Protocol: create a poll, vote, and watch results arrive in real time. polls and votes are records in each user's own repo; pollz is the app that indexes them.

live: pollz.waow.tech

how it works #

user's PDS ── jetstream ──→ backend (zig + sqlite) ──→ frontend (sveltekit)
     ↑                            │
     └──────── OAuth write ───────┘
  • records live with the user — creating a poll or voting writes a record to the signed-in user's PDS over OAuth. the backend never holds the canonical copy.
  • the index is rebuilt from the network — the backend subscribes to jetstream for the two pollz collections and folds them into sqlite. anything that writes a valid record shows up, whether or not it came through this app.
  • two lexicons — tech.waow.pollz.poll (a question and its options) and tech.waow.pollz.vote (a vote on a poll).

stack #

develop #

cd backend && DATA_PATH=pollz.db zig build run   # api on :3000, indexing from jetstream
cd frontend && pnpm install && pnpm dev          # vite dev server

DATA_PATH defaults to /data/pollz.db, the fly volume.

deploy #

just deploy            # backend, then frontend
just deploy-backend    # fly.io
just deploy-frontend   # cloudflare pages

docs #

docs/ holds design notes and operational detail, including the health endpoints and how the lexicons are checked and published. COSTS.md tracks what the deployment spends.