# About EnigMafia

EnigMafia is an open-source rules engine, Discord bot and moderator console for large social deduction games: mafia games in the spirit of Town of Salem with fifty to sixty players, played over two weeks on a Discord server.

## Why it exists

The fun of a big mafia game is human: alliances in the town square by day, whispered plans in faction chats by night. The pain is administrative. The moderators, called gods, resolve dozens of interacting abilities across fourteen priority tiers from forms and spreadsheets, every night, for weeks, and the role bible gets harder to run every time they invent something new.

EnigMafia keeps the game on Discord and exactly as social as it was, and takes the paperwork away. Roles are data, nights resolve deterministically with a receipt for every step, nothing in the bible is silently guessed, and the engine never writes the story. Gods do.

## Who makes it

EnigMafia is built and maintained by Karthik Subramanian, an independent developer, for the EnigMafia community's games. It is not affiliated with Town of Salem, BlankMediaGames or Discord.

## How it is built

Everything is written in Rust: a pure engine crate with no I/O, a Cloudflare Worker with Durable Objects that talks to Discord, a Leptos web app that runs the engine in your browser through WebAssembly, and a command-line tool for testing rulesets. The source code is public under the MIT license on [GitHub](https://github.com/KarthikSubramanian07/Enigmafia), including the architecture notes, the decision log and every ruling.

## Cost

EnigMafia is free. There are no accounts to buy, no ads and no tracking. Questions are welcome on the [contact page](https://mafiosa.pages.dev/contact).
