Why skip accounts at all
An account is a wall between someone and the thing they came for. A bank should have accounts. A puzzle your friend texted you probably shouldn't, and neither should a game night where five people need to be playing in the next two minutes. There it's mostly a reason to leave. Accounts also mean storing emails and passwords, resetting them, and protecting them. If I don't store them, I can't leak them.
So both projects start from the same question: what is the least we need to know about someone to give them a good experience?
madtown.today: your browser is you
The first time a browser loads madtown.today, it makes itself a random id and keeps it in local storage. There's no name, email or password behind it. The id lets the site count you once in “who's here”, count your finished puzzle once in the city's results, and give you a nickname for the guestbook.
// Anonymous per-browser id, shared by the visitor counter and stats dedupe.
const STORAGE_KEY = "mt:visitor-id";
export function getVisitorId(): string {
try {
const stored = localStorage.getItem(STORAGE_KEY);
if (stored && VISITOR_ID_RE.test(stored)) return stored;
const id = randomId();
madeNow = true;
localStorage.setItem(STORAGE_KEY, id);
return id;
} catch {
// Storage blocked: fall back to an id that lasts for this page load.
memoryId ??= randomId();
return memoryId;
}
}
Your game history stays in your browser. Each day's game is saved there, and your streak is worked out from those saved days whenever the page loads. The server only counts finished games toward the city's results; it keeps no copy of yours.
Where it breaks, and the patch
A browser is a good account until you add the site to an iPhone home screen. Home-screen apps on iOS have historically had their own storage, so a player who installs madtown.today could open it and find their streak gone. Rather than add accounts, the site carries the streak across: before you add it, it uploads just your saved games under a random 12-character code that expires in 24 hours, and the installed app imports them once on first launch. Every missing day is added, a finished day beats an unfinished one, and the streak is worked out again from the merged days.
This is basically the whole idea. Find the one spot where “the browser is the account” breaks and fix that spot, don't add accounts for everyone.
Dungeon Garden: a link and a key
A game of D&D needs more than a browser id, because one person, the DM, has powers the others don't, and players need to be told apart at the table. So Dungeon Garden uses links that carry identity.
When someone starts a campaign, the server makes 24 random bytes as the DM's key, hands it over once inside the DM's link, and keeps only its SHA-256 hash. The key sits after the # in the link, the part browsers don't send to servers. The app saves it on the device and removes it from the address bar.
/** A new campaign's DM key: 24 random bytes, URL-safe. Only its hash is stored. */
export function newDmKey(): string {
return randomBytes(24).toString("base64url");
}
A player's link only has their name. The first phone to show up with that name makes its own key, and the name is locked to it. Anyone else arriving as that name is told it's taken. To add a second device, the player copies a sign-in link from the first. If a phone is lost, the DM can reset the lock.
That is trust on first use. If someone claims your name before you do, it's theirs until the DM steps in. With friends that's not really a security problem, you just tell them to knock it off.

Side by side
| madtown.today | Dungeon Garden | |
|---|---|---|
| Who you are | A random id your browser makes on its first visit | A name in your link, locked to a key your device makes |
| Where your stuff lives | In your browser: saved games and streaks | On the server, in your group's own room |
| A second device | Starts fresh, except the home-screen transfer | Copy a sign-in link from the first device |
| Clear your browser | Your streak is gone | Open your sign-in link again, or ask the DM to reset your name |
| What a cheater can do | Send a made-up result to the city's counts. The server checks it's consistent, but it's a fun counter, not a leaderboard. | Claim an unclaimed name first. Anyone with the DM link is the DM, so the DM can make a new key any time. |
What I'd tell someone trying this
- Decide what the server truly needs to know. For madtown.today it's “have I counted this browser?”. For Dungeon Garden it's “is this the DM?”.
- Keep people's own history on their own device when you can. It's free storage and I never see it.
- Write down what it doesn't protect, in plain words. Both projects do, and it keeps the claims honest.
- When the accountless model breaks, fix that one moment, like the home-screen transfer, before reaching for accounts.