Something went wrong. Try again.
polls on atproto pollz.waow.tech
atproto zig
Something went wrong. Try again.
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) andtech.waow.pollz.vote(a vote on a poll).
stack #
- backend — zig 0.17, zat for AT Protocol (OAuth, jetstream, identity), zqlite for sqlite. runs on fly.io.
- frontend — sveltekit with the static adapter, on cloudflare pages.
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.
·
Copy SHA
·
Copy SHA
·
Copy SHA
·
Copy SHA
·
Copy SHA
·
Copy SHA
- Zig 73%
- Svelte 20%
- TypeScript 3%
- JavaScript 2%
- Docker 1%
- 2 more languages 1%