
01Overview
A public, fully simulated demo of a production chat-roulette app for the Pi Browser ecosystem, where users spend credits to be matched one-to-one with strangers for anonymous text chat. A frontend-only mock layer, written from scratch behind the same service contracts, replaces the proprietary backend.
02Problem
The production app runs on a real backend: WebSocket messaging, a long-polling matchmaking engine and an append-only credit ledger with holds, refunds and in-app payments. Strict NDAs meant none of it could be shown.
03My role
Frontend engineer at Hexifyer. I architected the Next.js and React frontend of the production Web3 browser app (matchmaking, digital wallets, authenticated flows, race-safe long-polling, WebSocket state, in-app payments and a role-gated admin console), then built Parley as its public, fully simulated demo.
04Approach
A custom mock layer behind the same service contracts simulates network latency and failures, matchmaking races, cross-tab state sync and persona-driven chat partners, without exposing proprietary backend logic.
05Key decisions
Mock behind the real contracts
The UI talks to the same service contracts as production; only the implementation behind them is simulated, so the demo exercises real frontend code paths.
Races are a feature of the demo
A cancel can lose to a match that has already landed. The simulation reproduces that race on purpose, and the ledger decides whether the hold is refunded or captured.
Rules under test
Vitest tests cover the ledger rules and race handling.
06The back of it
Cancel versus match
Press Find match, then Cancel. Cancel quickly and you win the race; wait and the match lands first.
Ledger
- Idle
Deterministic simulation written for this site.
07Highlights
- Frontend-only mock layer behind real service contracts
- Simulated latency, failures and matchmaking races
- Credit ledger with holds and refunds
- Cross-tab state sync
- Vitest tests for ledger rules and races
◆Gallery

Simulated demo. Everyone you meet is simulated, and nothing leaves the browser. 
Simulated demo. Everyone you meet is simulated, and nothing leaves the browser. 
Simulated demo. Everyone you meet is simulated, and nothing leaves the browser. 
Simulated demo. Everyone you meet is simulated, and nothing leaves the browser. 
Simulated demo. Everyone you meet is simulated, and nothing leaves the browser. 
Simulated demo. Everyone you meet is simulated, and nothing leaves the browser.