Skip to content
shiva.wm
--:--

pixel-wall

an infinite collaborative canvas, engineered like a product

activereal-time graphics2025 — present

A real-time collaborative pixel-art platform on a vast ±10-million coordinate plane (a 20M × 20M space), built on a custom Node.js server that runs Next.js and Socket.IO in a single process over PostgreSQL and Prisma. The realtime layer shards the plane into 10k × 10k chunk rooms so each client subscribes only to its viewport, keeping pixel and live-cursor broadcasts targeted at scale; every socket is pinned to a server-resolved identity (a DB-validated session, an admin token, or an HMAC-SHA256-signed anonymous id) and every write path is gated on it.

The standout engineering is the monetization: a dynamic viewport-zone pricing economy keyed to real screen resolutions, settled through a signature-verified, idempotent Stripe webhook that activates premium codes and cosmetics and, on refund or dispute, revokes them and removes the placed art. Territory protection uses alpha-aware, pixel-perfect overlap detection that decodes images to raw RGBA via Sharp and fails closed, so paid artwork can never be silently overdrawn.

The codebase is large and coherent — 62 Prisma models, 143 API routes, ~119K lines of TypeScript and a 21-page admin console — shipping chat/DMs, an in-game economy, full moderation and custom Google/Discord/GitHub OAuth, all hardened with per-request CSP nonces, CSRF, Turnstile and reCAPTCHA v3, tiered-trust rate limiting, fail-fast env validation, and a CI pipeline that spins up PostGIS, enforces migration-drift checks and runs a production dependency audit.

stack
TypeScriptNext.js 15Node.jsSocket.IOPostgreSQL + PostGISPrismaRedis (ioredis)StripeHTML5 CanvasSharpZodTanStack QueryCloudflare TurnstilereCAPTCHA v3SentryJestGitHub Actions