Inspiration

I run a home care agency and a small software studio, and the thing I keep noticing in both is how a screen in a room splits the people in it. Everyone looks down. A murder mystery dinner is the opposite. It is the one party format where four people lean in at the same table for an hour, and the only reason more families don't do it is the setup. Somebody has to buy the box, read the host booklet, deal the envelopes, keep the time and know the answer. Mystery Night gives that job to the AI, so the host gets to play too.

Two things on the hackathon side pushed me toward it. When I read through the public entries in early October there were more than 30, and none of them was a game or a story. And there is a precedent: St. Noire sold an Alexa murder mystery in 2019 at $40 with about 1,200 scripted lines. Boxed kits like Hunt a Killer still run about $30 a box, and a person still has to host. Nobody could build a host you can question live, who answers in character, in 2019. With Claude that part is a short prompt and one function.

What it does

Mystery Night is an AI-hosted murder mystery party for the living room. One screen faces the table (a TV, a laptop on the counter, or a phone), and Inspector Hartley hosts out loud.

Case one is Death at the Chili Cook-Off: 15 minutes, 3 to 4 players. Players type their names, then the phone goes around the table and each person sees only their own role, their secret, the lie they have to keep up and their goal. The Inspector sets the scene and puts the first piece of evidence on the table. In round one the table questions each other for five minutes. At any point anyone can question the Inspector, by voice or by typing, and he answers in character in two or three sentences. He knows the scene, not the answer sheet, and he will not name the killer. New evidence arrives, round two runs four minutes, then everyone points on three and the table locks in one name. The Inspector tells it the way it happened, and every secret comes out.

Roles are shuffled every game, so the same four people can play the case more than once.

How I built it

It is one static page (HTML, CSS and plain JavaScript, no framework) and one Vercel serverless function in Node. The function holds the case facts and the Inspector's rules server-side, so the browser never has the answer sheet. It calls Claude (claude-sonnet-5-5) through the official Anthropic SDK with a 200-token cap, and a clue gate keeps round one from mentioning round two's evidence. When no key is set or the call fails, the function answers from the Inspector's own case notes, in-character lines keyed to what the table asked, so the game never stalls on a judge.

The host's voice is the browser's speech synthesis and the mic is the browser's speech recognition. That is the simulated Alexa+ experience the track allows, and the page says so to the player behind the mic control in the header. The repo is public under MIT with a local dev server and a script that screenshots every screen at TV and phone widths.

Challenges I ran into

Keeping the Inspector honest was the main one. He has to know everything and say almost none of it, stay in character, be funny, and still move the table toward the answer. The fix was a short rule set in the prompt plus the clue gate per round, and a fallback that is also in character so the two Inspectors feel like the same man.

Voices were the second. Speech synthesis sounds different in every browser, and speech recognition only exists in some of them, so the mic control renders only where it works. On a real Alexa+ device both of these are solved, which is the point of building toward it.

The third was the token budget. With thinking on, a 200-token reply can spend itself before the first word, so the route turns thinking off for this call and gives the whole budget to the spoken line.

What's next

The Inspector on an Alexa+ device, with the game state held server-side, phones as the secret hands and the TV as the table's screen. More cases and themed packs: the app and case one stay free, new cases are about $6.99, and the paid catalog opens after judging ends on November 20, in time for party season. Fire TV is the natural living-room home and comes after that.

How to test it

Open https://mystery-night-nine.vercel.app on a laptop or TV browser, type three or four names and play. Chrome gives you the mic. Ask the Inspector where everyone was at 11:45.

Built With

Share this project:

Updates

Submission history