Updated: Expanded into a full technical article with code samples. Read the Technical Deep Dive →
fahad.ibrahim
← All Case Studies
Case Study · v2.5.0 · MIT

BugSmasher — an accessible arcade game with a replay-proof leaderboard

BugSmasher game interface showing arcade gameplay with scoreboard and accessibility controls

High-intensity bug-squashing gameplay meets brutalist OS aesthetics and neon bio-luminescent bugs. Built with React 19, TypeScript, and Canvas 2D, backed by Firebase and a serious automated-verification baseline.

React 19 TypeScript ~5.9 Canvas 2D Firebase Vitest Playwright PWA
CI
Tracked in STATUS.md
81.7%
Coverage (CI floors)
FAIL
Emulator (1 test)
NOT
Certified 10/10
🎬 Demo Video

A 2-3 minute walkthrough of BugSmasher's gameplay, architecture, and testing strategy. Video recording pending — script ready in demo-scripts/bugsmasher-demo-script.md

▶️
Demo Video Coming Soon
2-3 min gameplay + architecture walkthrough
⚡ Key Decisions

Server-authoritative leaderboards: Client never writes scores directly — all competitive writes go through Firebase callable paths with one-time session tokens. Quality gates in CI: tests and coverage are tracked in repo docs/STATUS.md — the project is not currently certified. Accessibility as gameplay: Keyboard-first, reduced-motion, colorblind modes built-in. Offline-first PWA: Cloud sync via Firebase, works without network.

01 The challenge

Browser arcade games are easy to demo and hard to trust. Two problems dominate: competitive integrity (a client-side score is trivially forgeable) and quality confidence (fast-moving game code rots without a test net).

BugSmasher set out to be an actively hardened project, not a throwaway demo. That meant treating the leaderboard as a security surface and treating the codebase as something that must prove itself on every change — while keeping the game genuinely fun and accessible.

02 Server-authoritative leaderboards

The core anti-cheat decision: the client never writes a score directly. All competitive writes go through server-authoritative Firebase callable paths.

Tested, not just designed

Firebase emulator tests explicitly cover the attack paths: replay, token expiry, cross-user token use, and score plausibility checks.

Honest scope

This is strong baseline protection, not a claim of perfect anti-cheat. Authoritative gameplay-run summaries and full replay verification remain future hardening if competitive integrity demands them.

03 A verification baseline you can audit

Quality is enforced through layered gates in CI, not by vibes. The numbers below are the documented baseline in docs/STATUS.md (2026-08-30, main @ bbc7250) — not a live certification.

SignalResult
CertificationNOT CERTIFIED 10/10
TypeScriptPASS
ESLintPASS — 0 errors / 910 warnings
Functions build + unit testsPASS (6/6)
Frontend tests752/752 PASS (40 files)
Coverage81.70% lines / 85.99% functions (floors enforced)
Firebase emulatorPASS (26/26)
Production buildPASS
Playwright E2EPASS (5/5)
npm audit (prod deps)0 vulnerabilities

Older “651 tests / failing emulator / Playwright skipped” figures (2026-08-26 snapshot) are superseded. Fresh counts live in the repo ledger.

04 Accessibility & performance

An arcade game should be playable by everyone, on any device, without melting a low-end phone.

In progress, stated plainly

Full WCAG 2.2 AA evidence-backed verification is still underway. The foundations are in place; the final certification gate is on the roadmap rather than claimed as done.

05 Architecture & supply-chain hygiene

React 19 + TypeScript
Canvas 2D Renderer
WebAudio SFX
→
Zustand State
Firestore Persistence
Offline Queue
→
Firebase Auth
Cloud Functions
Firestore Rules

System architecture: frontend → state → backend

06 What is deliberately not done yet

A credible case study names its gaps. Until real providers and operational/legal controls are in place, these remain intentionally out of scope:

The project does not claim these capabilities are live merely because integration stubs exist in the source tree.

Play Live → View on GitHub All Case Studies