Side project · 2026
Mafia IRL
A mobile-first web app for playing Mafia around a real table. Players join a room from their phones, the host runs the night and day phases, and every role, night action and vote stays in sync in real time.
- Server-side game engine on Express and Socket.IO: phase flow, night resolution, day voting, win conditions and reconnects
- A separate view for the host with a live feed of what happens each night
- Optional phase timers synced from the lobby, and bots for playtesting
- Vitest suite covering every phase, plus a full-game integration test
- Dockerised web and server apps, with a one-command LAN setup for testing on real phones
- Next.js
- React
- Tailwind CSS
- Node.js
- Express
- Socket.IO
- PocketBase
- Vitest
- Docker
Lobby
- Players join
- Roles are dealt
Night
- Detective checks
- Doctor protects
- Mafia picks
- Night resolves
Day
- Discussion
- Vote
- Day resolves
Night and day repeat until the town or the mafia wins.








