__________ ____ ______ __ _____ ______________
/ ____/ __ \/ __ \/ ____/ / |/ / | / ____/ _/ |
/ / / / / / / / / __/______/ /|_/ / /| | / /_ / // /| |
/ /___/ /_/ / /_/ / /__/_____/ / / / ___ |/ __/ _/ // ___ |
\____/\____/_____/_____/ /_/ /_/_/ |_/_/ /___/_/ |_|
< "Trust no one. Not even `git blame`." >
Status: Active Development
Current State: Release 1 (Alpha)
This is an early preview. Features are being shipped faster than your average npm install.
Expect bugs, chaos, and rapid improvements.
Code Mafia is not just a game; it's a social deduction experiment for developers.
Think Among Us meets LeetCode, but with more race conditions.
Players are dropped into a codebase (spaceship).
Developers (Crewmates)
Complete coding tasks, fix bugs, and optimize the system to win.
The Mafia (Impostors)
Blend in, sabotage the code (delete semicolons, inject infinite loops), and eliminate the devs.
The catch?
You have to code your way out of it.
game_specs:
genre: "Social Deduction / Coding Simulation"
stack: [Go, React, WebSocket, Redis, Supabase]
vibe: "Dark Mode Everything"
difficulty: "O(n!)"We didn't just build a game — we built a global platform.
Most hackathon projects are stuck in en-US.
Code Mafia is ready for the world.
global_domination_protocol:
engine: "Lingo.dev"
automation: "100%"
ci_cd_integration: "Active"
supported_locales: [English, Hindi, German, French, Spanish]
manual_effort: 0- We push code
- Lingo.dev CI/CD pipeline triggers automatically
- AI extracts, translates, and validates keys in < 5 minutes
- The game updates instantly for users in Mumbai, Berlin, and Paris
We like our backend fast and our frontend reactive.
Backend (Go) ██████████ (Gorilla Mux, Goroutines)
Realtime ██████████ (WebSockets, Redis Pub/Sub)
Frontend █████████░ (React, Vite, Tailwind)
Code Engine █████████░ (Monaco Editor, Yjs)
Database ████████░░ (Supabase, PostgreSQL)
Localization ██████████ (Lingo.dev Automated Pipeline)
Sleep █░░░░░░░░░ (Who needs it?)
Want to see how everything connects? Check out our high-level architecture diagram:
Demo Link:- https://www.loom.com/share/a56a54b6d2c942c1acf0ad0f4944d851
.
├── backend/ <-- The Brain (Go + WebSockets)
│ ├── hub.go <-- Manages all active game rooms
│ ├── room.go <-- Handles game logic & broadcasting
│ └── main.go <-- Entry point
├── frontend/ <-- The Face (React + Vite)
│ ├── src/lingo/ <-- Automated translation cache (The Magic)
│ ├── src/game/ <-- Game panels (Chat, Sabotage, Tasks)
│ └── vite.config.js <-- Lingo compiler integration
└── docker-compose.yml <-- Spin it all up in one command
You want to run this locally?
Good luck, Detective.
git clone https://github.com/iYashMaurya/Code-Mafia.git
cd Code-MafiaDocker & Docker Compose (Recommended)
OR
- Go 1.21+
- Node.js 20+
- Redis (Local or Cloud)
- Supabase Account
Create a .env file in the root directory (mandatory).
# =====================================================
# CODE MAFIA - ENVIRONMENT VARIABLES
# =====================================================
# Backend Configuration
PORT=8080
ENVIRONMENT=development
# Redis Configuration (Local or Cloud)
REDIS_URL=redis:6379
REDIS_PASSWORD=
# Supabase Configuration
# Get these from: https://app.supabase.com > Project > Settings > API
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
# Frontend Configuration
# Get this from: https://lingo.dev
LINGODOTDEV_API_KEY=lng_your_key_hereSpins up Backend, Frontend, and Redis automatically.
docker-compose up --build- Frontend → http://localhost/
Terminal 1 — Backend
cd backend
go mod download
go run main.goTerminal 2 — Frontend
cd frontend
npm install
# Initialize the Translation Engine
npm run lingo:setup
npm run lingo:sync
npm run devWe are just getting started.
- Voice Chat Integration — Because typing "It wasn't me" is too slow
- IDE Extensions — Play directly from VS Code
- Ranked Matchmaking — Elo system for debugging skills
- More Languages — Japanese & Portuguese via Lingo CI/CD
Found a bug?
It's probably a Sabotage feature. (Just kidding — PRs welcome.)
- Fork the repo
- Create your feature branch
git checkout -b feature/cool-mechanic
- Commit your changes
git commit -m "Add sabotage" - Push to the branch
git push origin feature/cool-mechanic
- Open a Pull Request
/\_/\
( o.o ) < "Code compiled." >
> ^ <
Code Mafia
Developed by Yash Maurya