Werewolf Game-Master Assistant

An assistant for the game master of an in-person werewolf (Mafia) table — it never forgets the order, miscounts the antidote, or plays favourites. Opens 12 player seats plus one game-master seat, with a workshop for authoring boards and roles.

What it does

  • A three-layer model — board rules → roles → abilities. Cross-role rulings (same-target guard+antidote kills, the mech-wolf learning map, "this board's knight cannot flip") belong to the BOARD, not to any one role.
  • Board studio: describe a board in one sentence and an LLM (DeepSeek) assembles it — but only by picking templates from an allowlist and filling parameters, never writing code or inventing syntax, so the output is legal by construction. A missing role is treated as an error and substituted, with the change shown.
  • Role studio: 12 ability templates (faction check, night kill, one-shot save, shot on death, charm-and-die, flip-to-survive…) compose new roles, stored in SQLite so they survive a restart and appear in every board's seat dropdown.
  • A room is 12 player seats plus one game-master seat. Permissions come from which seat you occupy — there is no separate host token. The game-master seat can be delegated to the app, mid-game as well.
  • Privacy holds by construction: the player view is projected from the server-side seat, so other players' role fields are never serialised at all; only the game-master view carries every identity.

Stack

  • TypeScript
  • Node.js
  • WebSocket
  • SQLite

Project link

Back to work