SP slotplate
v0.1 · MIT · client-only · agent-ready

Slot clients
that don't rot.

An opinionated boilerplate for slot game clients on pixi-reels. FSM-driven flow, MobX stores, GSAP timing, Pixi behind one presenter. The server owns the math; the client renders what it's told.

FSM phases MobX stores pixi-reels server-authoritative GSAP ticker no setTimeout Spine wrappers typed events composition root disposables anticipation slam-stop bonus sub-FSM llms.txt agent-ready FSM phases MobX stores pixi-reels server-authoritative GSAP ticker no setTimeout Spine wrappers typed events composition root disposables anticipation slam-stop bonus sub-FSM llms.txt agent-ready

A client that knows its place.

slotplate is a boilerplate for slot game clients. That word matters. The server owns the math, the paytable, the RNG, and the source of truth for balance. The client renders what the server said happened — with the timing, feel, and polish that makes a slot worth playing.

Who owns what
CLIENT · slotplate presentation + flow rendering reels animations, timing, skip HUD, bet input, sound FSM phase orchestration optimistic balance display request spin from server paytable logic RNG / stop positions win evaluation RTP / math certification balance truth SERVER · RGS math + truth paytable + payouts RNG + reelstrip lookup grid selection per spin win evaluation anticipation trigger rule bonus trigger decision balance authoritative state session lifecycle RTP certification rendering / animation sound / HUD / speed modes SpinRequest { bet } SpinResponse grid, winlines, totalWin, teasingReels
If it's math, it's server. If it's pixels, it's client. Crossing this line is the fastest way to a cert failure.

What slotplate gives you: a shape that resists the common failure modes of slot codebases. Spin-then-settle spaghetti, bespoke reel engines that reinvent pixi-reels badly, setTimeout timers leaking across scenes, paytables hardcoded into TS that the math team never sees. We've seen each of those ship. Each has the same fix shape; slotplate bakes it in.

The mile-high view

Layers with enforced import direction. Domain at the bottom holds only wire types — the shapes that cross between client and server. No win evaluation lives here.

SLOTPLATE · CLIENT UI plain DOM · optional React/Vue scenes Pixi application lifecycle · mounts pixi-reels flow · FSM + phase handlers idle → spin → stopSpin → winShow → idle owns GAME TIME · only writer to stores presenters ReelsPresenter · HUDPresenter state → view infrastructure Ticker · Network · AssetLoader · Analytics I/O boundary state · MobX RootStore = Balance + Data + UI domain · WIRE TYPES ONLY SpinRequest · SpinResponse · Grid · Winline config columns · rows · symbolIds (client-side only) ↓ import direction (enforced by Biome) SERVER (RGS) not slotplate paytable reelstrips RNG + spin eval RTP / math balance (truth) SpinResponse The client never computes these. It renders what the server said happened.
For agents

Designed to be edited by AI

Every scaffolded project ships with CLAUDE.md, AGENTS.md, slash commands, and Biome rules that encode the principles. Point your agent at /llms-full.txt and it stays on-spec.

How to use slotplate with an AI agent →