Mafia Game Manager
Real-time Strategy & Role Management
Mafia Game Manager is an immersive digital engine designed for both in-person and virtual Mafia games. It handles the complex "behind-the-scenes" work of a Game Master—tracking secret identities, resolving night actions, and managing phase timers—allowing players to focus on the social deduction experience.
Technical Deep Dive
I wrote a comprehensive breakdown of the architecture, engineering challenges, and performance optimizations for Mafia Game Manager.
🎯The Problem
Orchestrating Mafia games manually is prone to errors, especially when tracking multiple secret roles and resolving complex nighttime interactions.
💡The Solution
Built a real-time engine with a centralized state machine that automates role assignment, private nighttime voting, and deterministic outcome resolution using NestJS and Redis.
Tech Stack
Key Features
My Responsibilities
Architected the real-time communication layer with Socket.io
Implemented a priority-based "Morning Resolver" for action resolution
Designed the mobile-first, dark-mode user interface
Managed Redis-based session state for low-latency synchronization
Maintained strict TypeScript type safety across frontend and backend
Outcome & Impact
Created a fully functional "Second Screen" experience used for game nights with friends, streamlining phase transitions and role management.
Real-time state sync with Socket.io
Automated "Morning Resolver" logic
Zero-leak "Ghost Mode" for spectators
Immersive dark-mode UI with phase animations