Skip to content
Back to endeavors
Aleckx logo

Aleckx

One name a day, decided by a stranger

  • First-visitor naming
  • Midnight ET rollover
  • Zero build step
  • KV-backed daily lock
  • HTML
  • CSS
  • JavaScript
  • Cloudflare Pages
  • Cloudflare KV
Jump to: Choose a section

The idea

My name is Alek. It gets misspelled as Alec or Alex constantly — so I stopped fighting it. Each day, the first person to visit aleckx.com decides how my name is spelled. Their pick sticks for every visitor until midnight ET, when the next first visitor takes over. One page, one joke, played completely straight: a real API, real storage, a live countdown to the next naming, and an all-time tally of which spelling is winning.

Who it’s for

  • The first visitor. Lands on an unclaimed day, gets a “You’re first today” banner, and picks Alek, Alec, or Alex — or hits “Let fate decide” and the server picks. Their choice is official for everyone.
  • Everyone after. Sees today’s locked spelling on a big name tag, a countdown to midnight ET, the last three days of history, and the running tally.
  • The people who misspell my name. Now they can point at the site and claim they were right that day.
  • Me. Wanted the smallest possible complete product — a domain, a design system, an API, storage, and a deploy pipeline — with zero build step and nothing to maintain.

The daily lock

First write wins

Problem: The whole product is “the first visitor decides” — a once-a-day lock that has to resolve globally, roll over at midnight ET, and run with no server, no cron, and no database.

Solution: A single Cloudflare Pages Function backed by a KV namespace. The day’s key is day:YYYY-MM-DD, computed in America/New_York. GET returns today’s name (or { unset: true }), a three-day history, and the all-time tally per spelling. The first POST of the day writes the name and bumps the tally; every later POST returns the locked name with alreadySet: true. Because the key is the ET date, the midnight rollover is automatic — a new date is a new empty key.

Outcome: The date key is the entire state machine. No scheduler, no migrations, no cleanup — about sixty lines of function code run the whole product.

Honest about the race

Problem: KV is eventually consistent and not transactional. Two simultaneous “first” visitors can both see an empty key and both write.

Solution: Accepted the race and documented it in the README instead of engineering around it. The second write overwrites the first within seconds, and both visitors still see a name. A Durable Object or an atomic lock would solve a problem this site doesn’t have at its traffic level.

Outcome: The trade-off is a recorded decision, not a surprise. If there’s ever a stampede at midnight ET, that’s a good problem to have — and the upgrade path is already known.

The page

A design system for one sticker

Problem: A one-page joke lives or dies on presentation. It needed to look like a physical object, not a default-styled HTML page.

Solution: The classic “HELLO my name is” name tag, rebuilt in CSS: Archivo for the label, Permanent Marker for the handwritten name, the red header, a ruled baseline across the face. Design tokens are inlined as CSS custom properties. Dark mode flips the page and chrome, but the sticker deliberately stays a paper object — and the theme is applied before first paint from localStorage or the OS preference, so there’s no flash. Rotated ghost tags sit behind the content for depth.

Outcome: The whole site reads as one name tag. The design carries the joke before a single word is read.

Three screens, no framework

Problem: The page has real states — chooser, locked-in (just chosen vs. arrived late), and error — and shipping a framework to manage one <main> element felt wrong.

Solution: Vanilla JavaScript renders three screens: a chooser with the three spellings and a random option, a locked screen with the day’s tag, a live countdown to midnight ET, recent-day badges, and the tally, plus an error screen when the API is unreachable. If someone beats you to the POST, the response says so and the UI shows their pick instead of yours.

Outcome: No build step, no dependencies, nothing to compile. The repo is index.html, styles.css, app.js, and one function — push to main and Cloudflare Pages deploys it.