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.

Role
Solo Developer
Duration
2 months
Company
Side Project
Team
Solo

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

NestJSNext.jsSocket.ioRedisMongoDBFramer MotionTailwind CSS

Key Features

4-character unique room codes
Custom Role Deck Builder
Tap-to-Flip secret identity reveals
Private night action targeting
Shared discussion & voting timers
Comprehensive Game History for GM

My Responsibilities

1

Architected the real-time communication layer with Socket.io

2

Implemented a priority-based "Morning Resolver" for action resolution

3

Designed the mobile-first, dark-mode user interface

4

Managed Redis-based session state for low-latency synchronization

5

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

Interested in Working Together?

Let's build something amazing for your business.

Start a Conversation