02

24 Daily

A daily math puzzle based off a card game I used to play with my brother growing up.

24daily.vercel.appOPEN ↗
24 Daily screenshot
LOADING...
TRY IT NOW

THE STORY

Growing up, my brother and I used to play this math puzzle card game. We'd grab a deck of cards, deal four, and race to make 24. The first to solve the round won the hand, and then four new cards were dealt. It's deceptively fast and more satisfying than it has any right to be. I wanted to build a daily version of that: the same four cards for everyone, everywhere, all at once. I wanted to build something that reminded me of playing games like Wordle and Immaculate Grid, these daily puzzles with results that could be shared with friends and family.

KEY DECISIONS

Seeded RNG as the coordination layer

A Mulberry32 PRNG keyed on the ET date string gives every player the same four cards with zero server coordination. The puzzle resets at 8 AM ET — not midnight — because that's when people actually play.

AST canonicalizer for fair deduplication

A naive string comparison flagged (5+8+9)+2 and (2+9)+(5+8) as different solutions. The fix: parse each expression into an AST, flatten every associative chain, sort operands alphabetically, then compare. One solution, correctly.

Solvability guarantee

A recursive brute-force checker tries all permutations, operator combinations, and parenthesizations before showing a puzzle. Every hand is guaranteed to have at least one solution.

Percentile rankings over raw scores

Results show where you ranked for both speed and solution count against everyone who played that day. Gives every player something to chase — not just the fastest.

Server-side date logic always

Puzzle dates are recomputed on the server. The client value is ignored. Computing dates client-side is exploitable — and producing the wrong puzzle for a timezone edge case would break the whole shared-experience premise.

RESULT

Shipped to production at 24daily.vercel.app. All puzzles guaranteed solvable. Equivalent solutions correctly deduplicated. Real-time percentile rankings against all players that day. Full session history stored permanently in Supabase. Runs entirely serverless with zero ongoing maintenance.

STACK

FRONTEND
React (Next.js Pages Router), CSS-in-JS
BACKEND
Next.js API Routes
DATABASE
Supabase (PostgreSQL)
HOSTING
Vercel
AUTH
Anonymous (localStorage UUID)
← PREVIOUSGroup TripperNEXT →NBA Trade Forcer