[ 01 / CASE STUDY ]
A real-time multiplayer PWA in production, with the cost model published.
Codebasis · 2024–present · Design, build, operate
- frames measured
- 172,681
- concurrent games modelled
- 10→1,000
- modelled monthly cost
- $85→$1,150
Challenge
A four-player real-time game with a 3D board had to work on a phone and a desktop, hold state under concurrency, support bots, and stay cheap enough to run.
Approach
- React 18 and TypeScript PWA, with a Three.js 3D board, Redux Toolkit, and RTK Query
- ASP.NET Core 10 API with a SignalR hub, and PostgreSQL via EF Core with JSONB columns
- A Swagger-generated TypeScript client keeps the contract between the two repos honest
- ONNX bot models trained per game variant, falling back to heuristic mode when absent
- Stripe Checkout for in-app purchases
- Docker to ECR to ECS Fargate, with GitHub Actions CI/CD and Aurora Serverless v2
- A Storybook component library; Vitest on the web, xUnit and Moq on the API
- Published capacity and cost analysis measured over 377 matches and 172,681 frames
Stack
- asp.net core
- signalr
- postgresql
- react
- three.js
- rtk query
- onnx
- stripe
- ecs fargate
- github actions