>Lies & Allies: Party Games Without the Ad Breaks
I built simple role-revealing web apps for Mafia and Spyfall because every existing option was either full of ads, abandoned, or both.
Every few weeks me and my friends get together for a night of beers, grilling, and social deduction games. Mafia and Spyfall are the go to choices. If you haven’t played them, the idea is simple. Everyone sits in a circle, roles get assigned secretly, and then you spend the next ten to thirty minutes lying to each other’s faces trying to figure out who’s who. The games themselves don’t need technology at all, they’re meant to be played in person. But the one thing you do need is a way to secretly assign and reveal roles to each player.
We used to rely on random apps and websites for this. Every single one of them had the same problems. Ads covering half the screen, sketchy permissions, domains that stopped working after a few months, or the app just disappearing from the store entirely. One time we spent fifteen minutes trying to find a working Spyfall site while the charcoal was burning down. That was the night I decided to just build my own.
What these apps actually do
Mafia and Spyfall are role revealing apps. That’s it. Someone creates a room, everyone joins with a four character code, and when the host starts the game each player sees their secret role on their own phone.
In Mafia, you configure which roles are in play. There’s always civilians and mafia, but you can also add a doctor who protects people and a police officer who investigates. Once the game starts, each player sees their role privately. Mafia members also see who their teammates are so they can coordinate. Everything else, the accusations, the voting, the dramatic reveals, that all happens out loud in the room. The app just handles the secret part.
Spyfall works a bit differently. Everyone gets told a location, like a hospital or a space station, except for one or two players who are the spies. The spies don’t know where they are and have to figure it out by asking questions without giving themselves away. The app shows regular players the location and shows spies nothing. There’s also a countdown timer so rounds don’t drag on forever.
Both apps handle reconnection gracefully. If someone’s phone locks or they accidentally close the tab, they get their role back when they rejoin. No need to restart the whole game because someone bumped their screen.
How it’s built
The whole thing is a monorepo with a shared Django backend and separate SvelteKit frontends for each game. The backend handles all the game logic, room management, and role assignment. The frontends are intentionally thin, they just display whatever the server tells them to.
Rooms and players communicate over WebSockets through Django Channels. When the host starts a game, the backend shuffles the roles, assigns them, and sends each player their own private message through the socket. Public events like “the game has started” go to everyone, but role information only goes to the player it belongs to. A spy in Spyfall never receives the location data at all, not even hidden in the payload.
I built a small plugin system on the backend so each game is self contained. Mafia and Spyfall each implement the same interface for validation, configuration, and state creation. Adding a new game means writing a new plugin without touching the core room or WebSocket logic. No plans to add more games right now but the door is open.
For the frontend, Svelte 5 with Tailwind keeps things fast and simple. Each game gets its own SvelteKit app which compiles down to a lightweight build. The whole experience loads instantly on a phone, which matters when you have eight people standing around a grill waiting for the game to start.
Deployment
Everything runs in Docker containers behind a Caddy reverse proxy on my server. PostgreSQL for persistence, Redis for the WebSocket channel layer. The Mafia frontend serves on one port, Spyfall on another, and Caddy routes mafia.xhepi.dev and spyfall.xhepi.dev to the right place. Same setup I use for everything else I self host.
Was it worth it
Absolutely. The apps are dead simple and that’s the point. No accounts, no ads, no tracking. Someone shares a four character code, everyone joins, and the game starts in under a minute. We’ve used them at every gathering since I deployed them and they just work. Sometimes the best project is the one that solves a small, annoying problem and then gets out of the way.