CASINO GAME KIT Play demo
Approach & security

Casino games where the server decides.

Slots, roulette, blackjack and crash — designed so the rules, the random numbers and the money live on your servers. The player's browser only draws the result.

Server-authoritativeProvably fairAuditable
The one rule

The browser shows. The server decides.

Anything that runs on a player's device can be read, copied and changed by that player. So nothing that decides money is ever allowed to live there.

This demo

Everything is in the player's browser ScreenRulesRNGBalance

Rules, random numbers and the virtual balance run inside the page, so the demo works offline from a single file. That is exactly what makes it right for judging look, feel and maths — and wrong for real money.

A production build

Browser Screen Your server RulesRNGBalance

The page is only a screen. It sends button presses and draws the results it is given. Everything that decides an outcome or moves money runs on the server.

Built for this move: each game's rules and maths already sit in their own files, apart from the screens, and our test suite already runs them in plain Node, with no browser.

Architecture

Where the code runs

Six pieces, one rule: only the first one sits with the player, and it is treated as untrusted.

Untrusted

Game screen

Graphics, sound, animation and input only.

NEVER HOLDSrules · RNG · pay tables · balances
Trusted · your servers

Edge

TLS ends here. Blocks floods, bots and bad traffic.

Game API

Checks the signed session, validates every field and enforces limits.

Game engine

Rules, pay tables and the random number generator. Decides every outcome.

SERVER-ONLY

Wallet & ledger

Atomic debit and credit. Every change is tied to one round and safe to retry.

⇅ API to your accounts & wallet

Round log

Append-only record of every bet, seed and result, for audits and disputes.

Across every layer: monitoring and alerts · least-privilege access · secrets in a vault · audit trail

A round, step by step

What happens when a player presses Spin

  1. Game screen → Game server

    Place the bet

    The screen sends the game, the stake and a unique request ID. Nothing else.

  2. Game server

    Validate

    Checks the signed session, the stake limits, and that no round is already open.

  3. Game server → Wallet & log

    Reserve the stake

    One atomic step. If it fails, the round never starts.

  4. Game engine

    Draw the result

    The engine uses the server's random numbers and the pay table. The result exists nowhere else yet.

  5. Game server → Wallet & log

    Settle

    Pays the win and writes the round to the append-only log: bet, seed, result, balance.

  6. Game server → Game screen

    Return the result

    A finished result, the new balance and a round ID.

  7. Game screen

    Animate

    Reels spin, the wheel turns, cards are dealt — to the answer the server has already given.

The screen gets answers, not decisions

It receives a finished result. It cannot change it, see it early, or ask for a better one.

Multi-step games

Blackjack repeats these steps for every hit or stand; the server keeps the shoe.

Crash fixes its crash point before take-off and judges each cash-out on the server's clock.

Security

Assume the browser is hostile

Every defence below follows from one choice: the client is never trusted with anything that matters.

  • Player edits the game in DevTools

    There is nothing to edit. Rules, random numbers and balances never reach the browser — it only receives finished results.

  • Forged or replayed requests

    Signed, short-lived session tokens · a unique ID on every bet so a retry can never pay twice · one open round per player · every field re-checked on the server.

  • Predictable or tampered randomness

    Cryptographic RNG on the server (operating-system entropy) with unbiased sampling. No result is revealed to anyone until the bet is settled.

  • Wrong balances or double payouts

    Atomic ledger: stake and win are written together against one round ID. Failures roll back, and books are reconciled against the round log.

  • Bots, scripts and abuse

    Rate limits at the edge and per player, bet and loss limits, and alerts on unusual patterns.

  • Snooping or tampering on the wire

    TLS everywhere with HSTS, strict security headers and a locked-down content policy. No third-party scripts on the game page.

  • Insiders, leaks and disputes

    Append-only round log (bet, seed, result) · role-based, least-privilege access · audit trail on admin actions · secrets held in a vault, never in client code.

Fairness

Random, provable and checked

Where a game suits it, every round can be verified by the player. The maths behind each game can be re-checked by anyone.

  1. Commit

    Before the round, the server shows the SHA-256 hash of a secret seed.

  2. Play

    The player's own seed and a round number are mixed in. Result = HMAC-SHA256(server seed, client seed : round).

  3. Reveal

    After the round the server reveals the secret seed.

  4. Verify

    Anyone can re-hash it and recompute the result. The Crash demo has this verifier built in.

Unbiased randomness

  • Cryptographic random numbers — never Math.random
  • Rejection sampling removes modulo bias, so every outcome is equally likely
  • Production: the same approach on the server, seeded by the operating system

Maths that can be re-checked

Slots95.5 % returnexact calculation + 1,000,000 spins
Roulette97.3 % every betevery bet type returns exactly 36/37
Blackjack3:2, 6 decks150,000 simulated rounds
Crash≈ 96 % any target120,000 rounds vs theory

219 automated checks (118 on the maths, 101 in a real browser) pass on every build, so the maths stay reproducible for an independent lab.

Services

From demo to a live, server-side game

What we do, in the order we do it.

  1. This build

    Demo

    Four playable games with verified maths and virtual credits. Judge the look, feel and quality.

  2. Server-side engine

    Move rules and RNG behind an API on your servers. The browser becomes a thin screen.

  3. Integrate

    Connect to your accounts and wallet. Add limits, logging and admin views.

  4. Harden & verify

    Load and penetration testing, independent RNG and maths certification where your market requires it, monitoring — then launch.

What we can do

  • Re-brand and re-skin — colours live in one block of CSS
  • Tune pay tables, reel strips and bet limits; the tests recompute the exact return
  • Add new games on the same pattern: rules, interface, tests
  • Run the engine on your servers and connect it to your wallet

Separate workstreams (not in this demo)

  • Real-money payments and wallet integration
  • Player accounts, KYC and responsible-gaming tools
  • Back-office, admin and reporting
  • Licensing, compliance and certification by an accredited lab
See it in action

A quick walkthrough

All four games in about a minute and a quarter.

Try it yourself

Play all four games now

Fully playable in your browser. Virtual credits only — nothing to install, no sign-up.

The demo runs entirely in your browser by design. The approach above is how the same games would run in production.

Playable demoVirtual credits only · space bar spins / deals
New tab ↗