Hackathon Stopwatch
Admin-controlled live stopwatch mirrored to a Twitch stream
Typeinternal
Statusshipped
Updated2026-07-12
Commits6
SourcePrivate
What it is
A single-purpose site for a hackathon day: a public page shows a count-up clock that an admin starts, pauses and resets from a phone. Time is server state in Supabase, mirrored to every viewer through Realtime with a polling fallback.
The problem
A livestreamed hackathon needed one authoritative clock that organizers could control remotely.
How it works
- One Supabase row holds status, accumulated_ms and started_at; elapsed time is derived and nothing is written while the clock runs
- RLS grants the browser SELECT only; every write goes through a Vercel Function holding a server-only key
- scrypt password check with rate limiting, HMAC-signed HttpOnly session cookie, CSRF token and a strict CSP
- Vanilla JS with vendored supabase-js and per-client clock-skew correction
Stack
JavaScriptSupabase RealtimeVercel FunctionsHTML/CSS
Disciplines
For your business
Small real-time tools with proper security, built and deployed in a day.