Every December, viral "decorate my tree" web apps blow up across Instagram Stories and group chats—friends hang ornaments and leave anonymous wishes sealed until December 25.

When building Snibbly Decorate My Tree on snibbly.com, I wanted to fix three real engineering and UX flaws common in seasonal web toys:

  1. Client-side-only note hiding: Hiding locked notes with CSS or client JS leaks every secret in the Network tab.
  2. In-app WebView session loss: When users create a passwordless tree inside Instagram or TikTok's built-in browser, closing the WebView often wipes localStorage and cookies.
  3. Heavy bundle cold starts: Loading big 3D WebGL frameworks kills mobile conversion inside Story browsers.

If you want to click around first without signing up, here is the zero-database live 3D Christmas tree demo.

1. True Server-Side Sealing via SQL Column Projection

Instead of encrypting messages client-side or filtering them in JS after SELECT *, our D1 repository dynamically selects the message column only when the server verifies access:

  • Christmas morning (Dec 25 12:00 AM EST) has arrived; or
  • The requester is the owner and has unlocked optional early-peek access.

Before unlock, message is literally omitted from the SQL SELECT statement and API response, while optional public Mystery Clues (hint) and Secret Elf display names remain visible to build curiosity.

2. Dynamic 1200×630 PNG Cards & 9:16 Story Invites

Holiday links spread visually. We needed crisp preview cards on X, iMessage, and Discord without spinning up headless Chrome:

  • Server-side Open Graph PNGs: Using @cf-wasm/resvg inside the Cloudflare Worker with an embedded Baloo 2 font buffer, /og/tree/:slug.png renders a live 1200×630 PNG reflecting each user's chosen 3D pine theme and ornament count.
  • Client-side 9:16 Story Cards: On the tree page, an HTML5 Canvas builder exports a 1080×1920 Instagram/Snapchat Story graphic with a dedicated Link Sticker zone.

3. Single-Request Viral Tree Creation + Web Audio Music Box

Instead of forcing friends to bounce back to the homepage to make their own tree, submitting an ornament includes an optional Also plant my own free tree toggle. In a single POST /api/tree/:slug/ornaments request, the backend validates Turnstile once, saves the friend's ornament (keeping Secret Elf anonymous if toggled), plants their separate tree inheriting the vibe, and returns the Set-Cookie owner credential immediately.

For festive ambiance without heavy MP3 downloads, the tree stage synthesizes a 98-second polyphonic Christmas music box (Celesta, Harp, and Bass voices with stereo hall reverb) directly via the browser Web Audio API.

Try It Live

Would love any feedback from fellow Cloudflare Workers builders on edge caching, D1 query patterns, or in-app browser workarounds!