<link rel="stylesheet" href="/fonts/devicon/devicon.css" data-beasties-skip>

Lumina Games

Server-Authoritative Slot Provider — Five Titles, Fastify RGS + Canvas Clients

Role
Full-stack game systems engineer
Year
2026
Status
In Development
Stack
Fastify · Node.js · TypeScript · PostgreSQL · Zod · Vitest · HMAC · Ed25519 · REST API Design · HTML5 · Canvas · Docker · Caddy · GitHub Actions · SQLite · Parity Testing · E2E Testing
Games
5 titles, one RGS
Crash test
0 lost rounds (kill -9)
Simulation
30M + 200M + 100M rounds
Request integrity
HMAC + nonce

Overview

Lumina Games is a server-authoritative slot provider with five titles, all playable in the demo lobby: Vault 20K, Moth & Lantern, Relic Forge, Glasshouse and Clockwork Menagerie. Each game has its own maths engine, and that same engine runs unchanged in the browser, in the Fastify/TypeScript RGS and in the seeded RTP tools, so a spin resolves identically everywhere; a game registry runs every engine in its own isolated VM context. All five games share one player interface, the Lumina Shell (spin, bet, autoplay with stop conditions, menus, big wins, per-market switches), while each keeps its own board, art and sound. Casinos integrate through an HMAC-signed operator API (signatures over raw request bytes, nonce replay protection, timestamp skew checks, rate limiting), launch tokens and a seamless-wallet webhook flow, proven end to end against a runnable demo casino. Every round comes from a deterministic seeded RNG and is written to a hash-chained, Ed25519-signed, append-only ledger, with optional Postgres write-through persistence crash-tested with kill -9 under 500-player load without losing a round. Vault 20K, the flagship, is a 6x5 pays-anywhere game with tumbles, multiplier plates, free spins, ante bet and buy feature, now in its Colchis Treasury look: art generated with Gemini and cut into symbols, every board effect drawn frame by frame from art, and a scatter coin that turns as it lands. The math is checked at scale: Moth & Lantern's RTP is exact from its reel counts, and the other titles are measured with seeded simulations of 10M to 200M rounds. Pre-launch: not yet licensed for real-money play.

Problem

The project needed a slot provider a casino could actually integrate: the server owns every outcome, operator calls are cryptographically verifiable, every round can be replayed and audited, and the math is simulated at certification scale before any lab conversation.

What I built

  1. Built one maths engine per game that the browser, the RGS and the RTP tools all load unchanged, and a game registry that isolates each in its own VM context
  2. Built backend-owned RNG outcomes and session-based gameplay APIs on Fastify/TypeScript
  3. Signed the operator API with HMAC over raw bytes, plus nonce replay protection, skew checks and rate limiting; players enter through signed launch tokens
  4. Recorded deterministic seeded-RNG rounds to a hash-chained, Ed25519-signed append-only audit ledger on Postgres
  5. Made money flow crash-safe: round intents committed before the casino debit and recovered on boot, proven with kill -9 under load
  6. Built a demo casino with seamless-wallet webhooks, idempotent debits and lost-debit rollback to prove the integration end to end
  7. Extended the RGS to stateful games (per-session feature state, per-player state across sessions, server-checked player choices) for Relic Forge, Glasshouse and Clockwork Menagerie
  8. Built the Lumina Shell, one player interface every game mounts, with shared motion timings, big-win ladder and per-market switches
  9. Rebuilt Vault 20K's look from generated art: keyed symbols, a 9-slice frame, frame-by-frame effects and a coin that turns from art frames
  10. Validated RTP with seeded, sharded simulations (10M to 200M rounds) and computed Moth & Lantern's RTP exactly from its reel counts
  11. Checked every game in real Chrome on each pull request: layout at 9 sizes, idle frames at rest, hit areas and contrast from the pixels
  12. Shipped separate provider and operator admin consoles with scrypt + TOTP 2FA, RBAC and tenant scoping
  13. Kept a security findings register (2 High fixed) backed by a 57-test abuse suite in CI

Architecture

Lumina Games architecture diagram

Key decisions

Games
5 titles, one RGS
Crash test
0 lost rounds (kill -9)
Simulation
30M + 200M + 100M rounds
Request integrity
HMAC + nonce

Stack

Fastify · Node.js · TypeScript · PostgreSQL · Zod · Vitest · HMAC · Ed25519 · REST API Design · HTML5 · Canvas · Docker · Caddy · GitHub Actions · SQLite · Parity Testing · E2E Testing

Outcome

kill -9 under 500-player load: 0 lost rounds, 0 unrefunded debits. In Development · 2026. Live at provider-flame.vercel.app. For slot systems, the flashy part only works when the math and event flow are boringly deterministic to inspect. Keeping the server authoritative and the audit ledger hash-chained made tumbling, retriggers, and multiplier payouts much easier to audit.

Plates

11 screens

Next case — 03 / 10

Elite Weddings Premium Wedding Landing Platform · 2026 All work