PERSONAL PROJECT / FULL-STACK WEB GAME

ALIBI.
TRUST YOUR INSTINCTS.

A multiplayer murder-mystery game for 1 to 10 players, built as a real-time web app. Ten original cases, private roles for every player, and a server that never lets the solution reach a player’s browser before the reveal.

Public web beta · Free · Plays in any modern browser

The Alibi repertoire: ten illustrated case posters, each in its own colours
01 / THE PROBLEM

A party game where
nobody can cheat.

In a deduction game, the whole fun depends on information staying hidden until the right moment.

Each player in a group game gets a private role, and one of them is secretly the culprit. Clues are released in three timed acts, and votes lock once cast. If the answers lived in the page’s code, anyone could open developer tools and read them. So the game state lives on the server, and each player only ever receives their own view of it.

02 / ARCHITECTURE

Server-authoritative,
edge-hosted.

Stack

React 19 and TypeScript on Vite, rendered with an App Router framework that runs on Cloudflare Workers. Game data lives in Cloudflare D1, a SQLite database, with six versioned schema migrations.

One source of truth

Every action (create, join, ready, advance, vote) goes through a single JSON API. The server validates it, updates the room and returns a projection built for that player only: their role, their private clues, never anyone else’s.

Credentials without accounts

Players do not sign up. Each seat gets a random bearer token; the server stores only its SHA-256 hash, so a database leak cannot be used to take over a seat. Lost seats can be recovered with a ten-minute, single-use code.

Solutions stay on the server

Case solutions and private clues sit in server-only modules. A release audit scans the built browser bundle for 187 private strings and fails the build if any of them leak.

03 / HARD PROBLEMS

The details that
took the longest.

Fair group sizes

Two or three players cooperate against six suspects. Four to six each play a suspect, one of them guilty. Seven to ten add detective seats. Every one of the ten cases is tested at every group size, 90 combinations in all.

A video that would not play on iPhone

The tutorial stalled at 00:00 in iPhone Safari while the same file played fine on desktop. Safari requires HTTP range requests and the static host ignored them. The fix was an endpoint that serves exact 206 partial responses and 416 errors, with tests for each byte range.

Abuse without tracking

Rate limits stop spam room creation, but storing visitors’ IP addresses would be a privacy cost. Limits are keyed on an HMAC of the address that rotates daily, so the database never holds a raw IP.

Never trust the client

Moving hosts exposed a header the old platform used for signed-in users. A browser could have faked it to dodge rate limits, so the new Worker strips it and a regression test guards the fix.

Evidence in Alibi shown as physical objects: ticket stubs and photographs
04 / DESIGN

Ten cases,
ten worlds.

Each case is staged as its own production, with its own colours, typography and hand-drawn poster.

Evidence appears as the object a detective would hold: a ticket stub, a logbook page, a photograph or a tape transcript. On phones the game switches to a one-handed layout with a bottom tab bar. Motion respects reduced-motion settings, audio is off until a player turns it on, and every control works by keyboard.

05 / QUALITY

Tested like
production software.

48 automated tests

Game rules, privacy gating, seat recovery, voting, request limits and video byte ranges, run against a real SQLite database.

Release checks

Type checking, the bundle leak audit and an end-to-end script that plays a full four-player game against the deployed site.

Hosting I control

Migrated from a hosted builder to my own Cloudflare account: separate staging, a fresh database, secrets set outside the code, and a planned DNS cutover with rollback.

Play a case