Skip to content
All projects

Multiplayer game · Real-time 2026

Brownie Points

An office party game: one coworker is secretly the Boss's Pet.

Role
Solo — game design, server, client, infrastructure and CI/CD
Year
2026
Stack
  • TypeScript
  • Cloudflare Workers
  • Durable Objects
  • Next.js
  • Phaser
  • GraphQL
  • Supabase
  • PostgreSQL
  • LiveKit
  • Centrifugo
  • Terraform
  • AWS
  • GitHub Actions
Links
Live previewBrownie Points
20 Hz
authoritative game server per match
8
players per office, bots fill the rest
5
job roles, each with a power
280+
automated tests

[A]Overview

A real-time multiplayer browser game set on the fourth floor of a Bangalore office. Close tickets for Brownie Points, manage chai and sutta breaks, talk to whoever is in your room, and vote out the coworker stealing your credit before 5 PM. Empty desks fill with bots that look exactly like people.

[B]The problem

Social deduction games live or die on trust: if the client knows who the impostor is, someone will find out. I wanted a fast, funny office game that runs in a browser tab with no install, where the server decides everything and the wire never gives away a secret.

[C]Approach

  1. 01

    One Cloudflare Durable Object per match runs the game at 20 Hz and owns all state; clients only send inputs, validated against a versioned Zod protocol.

  2. 02

    Game rules live in a shared, deterministic package, so the browser predicts your movement with the exact code the server runs, then reconciles with server snapshots.

  3. 03

    Each player only receives what they can see: other rooms, roles and who is a bot never leave the server.

[D]Highlights

  • H-01

    Bots you can't tell apart

    Bots share the players' id format, avatar format and fields on the wire, path-find to tickets their role can do, take breaks when low on chai, and vote at standups.

  • H-02

    Proximity voice and a live lobby

    Self-hosted LiveKit for voice where only your room hears you, and Centrifugo for the live list of open offices, friend requests and invites, with Web Push when the game is closed.

  • H-03

    Infrastructure as code, no stored keys

    Terraform creates the voice and lobby server on AWS; GitHub Actions deploys through OIDC and SSM, generates secrets on the server and copies them into the Worker. No cloud keys exist anywhere.

  • H-04

    Security-audited

    Ran a structured security audit over the whole repository and fixed what it found: per-socket frame budgets, join rate limits, bounded match state, and sign-out that drops realtime channels.

[E]Under the hood

Brownie Points / explorer
  • apps/apiCloudflare Worker: GraphQL API and the match Durable Object
  • apps/webNext.js static export with a Phaser office scene
  • packages/shareddeterministic rules, collision and the WebSocket protocol
  • supabase/Postgres migrations with row-level security and rollbacks
  • infra/Terraform and docker-compose for LiveKit, Centrifugo and Caddy

[NEXT] Next project

lazystash

Browse, preview and pop git stashes in a terminal UI.