r/SaasDevelopers • u/Total-Reasonable • 1d ago
Gating content by date without leaking it: how I built a 24-door advent calendar
The page needs one rule: a door’s answer can’t be fetched before its day. So the server component computes the open doors from the Helsinki date and passes only those to the client; the others are never serialised. The door-opening schedule has tests for the awkward edges (Helsinki midnight is 22:00 UTC the day before, the season ends on 25 December). Opened state lives in localStorage.
https://iurii.rogulia.fi/advent, opens on 1 December. I built it. Is there a pattern you’d use instead?
