1. True server-side midnight sealing
Client-side timers are trivial to bypass by changing your phone clock or inspecting DevTools. In Advent With Friend, the calendar exterior endpoint (GET /api/awf/c/:slug) never returns note text, Polaroid images, or voice clip data. It only returns non-spoiler Living Exterior Footprints (seal count, initials, and media icons).
Note content is served exclusively by GET /api/awf/c/:slug/doors/:day, which compares current server UTC time against the precomputed receiver-local midnight timestamp (unlock_at) and returns HTTP 403 DOOR_SEALED until midnight arrives.
2. The 5-layer anti-abuse guardrail
| Layer | What it does |
|---|---|
| 1 · Human Gate | Optional Cloudflare Turnstile verification blocks automated spam bots without annoying image CAPTCHAs. |
| 2 · Database Rate Limit | Per-IP hashed sliding-window rate limits prevent flood submissions on any single calendar. |
| 3 · Link & PII Stripping | External URLs, email addresses, and phone numbers are automatically sanitized out of friend notes to stop phishing and doxxing. |
| 4 · Holding Box Moderation | Flagged phrases or OpenAI Moderation alerts route straight to the owner’s private Holding Box—never displayed on a door unless explicitly approved. |
| 5 · Anonymous Guardrail & Shadow-Ban | Anonymous notes require 18+ opt-in, are restricted to text-only (no photo/voice uploads), and banned hashes receive silent fake-success responses. |
3. Search engine isolation for personal calendars
Every user-created calendar (/:slug, /manage/:slug, /:slug/open, /:slug/zine, and /gift/:slug) is blocked in robots.txt AND emits noindex, nofollow meta headers so your friends’ personal notes never appear in Google or Bing search results.
4. Passwordless HttpOnly owner keys
Creating a calendar sets an HttpOnly; SameSite=Lax owner cookie whose SHA-256 hash is stored in the database—we never store raw owner keys in plaintext on the server. Want to read the full legal details? See our Privacy Policy.