MafiaMagic

Blockchain-powered Mafia party game with bots, World ID, and fair voting—onchain!

MafiaMagic

Created At

ETHGlobal New Delhi

Project Description

This project is a Mafia Party Mini App built for the World App ecosystem, combining onchain gameplay, World ID zero-knowledge authentication, and bot-filled lobbies for fast, verified party games. Up to 8 players (or bots) join a lobby, with random roles: 3 Mafia (Godfather, allies) and 5 Villagers (Detective, Doctor, Insomniac, and plain villagers). Gameplay progresses in classic phases (night, day) with all actions/votes recorded onchain for transparency and auditability. Integrated Farcaster-inspired UI design uses electric blue, vivid purple, and bold accents for modern, playful web3 aesthetics. The project leverages Next.js 15, Foundry contracts, MiniKit, Supabase, and viem for World Chain. Bot logic mimics real players—random (but plausible) night moves and day voting. No personal data ever stored; privacy assured by ZK-proofs.

How it's Made

  • Next.js 15 App Router & server components
  • World ID login via MiniKit, Mini Apps UI Kit
  • Foundry smart contracts manage roles, votes, actions
  • Supabase stores chat, analytics, bot actions
  • viem wallet for World Chain Sepolia onchain game state
  • Bot logic fills empty lobby seats and performs all critical roles
  • UI theme matches Farcaster game standards—bright accents on dark backgrounds, high-contrast game phase banners, role cards with icons, rounded CTAs, pill-shaped lobby containers, animated microfeedback
background image mobile

Join the mailing list

Get the latest news and updates