An advent calendar for each other sounds good, and then it stalls, because somebody would have to collect 24 messages and put them together.

I built Secret Advent, a free online advent calendar your friends fill. You make a calendar, post one link in the group chat, and each friend picks an empty door and leaves a short note. You open one door a day from December 1 to 24.

The twist I cared about most is Guess who mode: names stay hidden until Christmas Eve, you guess who wrote each note, and on the 24th you get a score card.

No accounts, no app, no email. Here's how it works under the hood.

One Durable Object per calendar

Each calendar is its own Durable Object, addressed by the calendar's id:

const cal = (env, id) => env.CALENDAR.get(env.CALENDAR.idFromName(id)); 

That gives every calendar its own little SQLite database and serializes writes for free. Two friends grabbing the same door at the same moment can't both win, because the object handles one request at a time. The notes table is just door → note:

CREATE TABLE IF NOT EXISTS notes ( door INTEGER PRIMARY KEY, -- 1..24, so a door can only be taken once writer TEXT NOT NULL, -- random id kept in the friend's browser body TEXT NOT NULL, ... ); 

Tables are only created when a calendar is actually made, so requests for random ids store nothing.

No accounts: links are the keys

When you create a calendar you get two links: a friends link and a private owner link. The owner link carries a random key; the server only stores its SHA-256 hash and compares hashes on each request. Lose the link and nobody (including me) can open the calendar as owner, which is a trade-off I'm fine with for a 24-day toy.

Friends get a random writer id saved in their browser. That's how the calendar knows which doors are "yours" (you can edit or remove your own note) and how it limits each friend to 3 doors, so one enthusiastic friend can't fill all 24.

Guess who: hiding names until the 24th

In Guess who mode the server simply doesn't send names before Christmas Eve. When the owner opens a door, the response has the note but from: null, unless the viewer wrote that note themselves. The owner types a guess per door; on the 24th the names come back and the page compares them.

Doing it server-side matters: if names were in the JSON and hidden with CSS, anyone could open DevTools and spoil the game.

Deleting everything on February 1

I didn't want to keep people's notes forever. Each calendar sets a Durable Object alarm when it's created:

await this.ctx.storage.setAlarm(deleteAt(year)); // February 1 of next year 

When the alarm fires, the object deletes its storage. There's no cleanup cron and no database of old calendars.

Bonus: a Secret Santa draw without emails

There is also a Secret Santa generator, with no email and no sign-up. You type the names, it draws, and the organizer gets one private link per person to send on WhatsApp or anywhere. Each link shows only that person's giftee; the organizer only sees who has opened theirs.

The draw is a random derangement (nobody gets themselves). Couples can be excluded from drawing each other; with a few banned pairs, simply reshuffling until the result is valid is fast enough for up to 40 names:

for (let t = 0; t < 20000; t++) { const a = shuffle([...Array(n).keys()]); // crypto.getRandomValues inside if (a.every((v, i) => v !== i && !banned.has(i + ">" + v))) return a; } return null; // impossible with these exclusions: tell the user 

The exclusion pairs are used for that one draw and never stored.

Small things that mattered

  • Server-rendered pages. Landing pages are plain HTML rendered by the Worker, with a little JS for the calendar itself. The Worker's median wall time is about a millisecond.
  • Five languages (English, Japanese, German, Spanish, Portuguese). LINE matters in Japan, WhatsApp almost everywhere else, so the share buttons follow that.
  • Rate limits on creating calendars and filling doors, and no links allowed inside notes or names, to keep shared calendars free of spam.

Try it

It's free and there's nothing to sign up for. Feedback on the Durable Objects setup is very welcome too.