Rah6 — Roll a Hard 6

A Balatro-leaning co-op craps game with 1:1 real-casino bet fidelity.

Welcome to the living documentation for Rah6. The dice and bet menu at the table are real-casino faithful — odds, payouts, and working/off behavior all match a real table. A Balatro-style chip/joker layer sits on top: shooter chips bend dice physics, bettor chips multiply payouts. Runs play through rising “blinds”; between blinds you shop for chips, level rare bets, and recruit shooters.

The canonical source of truth is docs/design.md in the repository. This site is the navigable mirror of that design plus developer onboarding.

Game Design

Developer Guide

Internal


The Two Load-Bearing Rules

Everything in Rah6 hangs off two non-negotiable invariants:

  1. The purist test. Strip every chip and the table must play as a faithful real-money craps game. No exceptions. This is enforced mechanically by the chip dispatch contract, not by convention.
  2. Engine purity. The engine is a pure reducer over JSON-serializable state, deterministic from a seed — no I/O, no clocks, no Math.random. This is what makes online co-op, save/resume, replay, and deterministic tests all the same problem, solved once.

Stack

LayerTechResponsibility
engine/Pure TypeScriptReducer + bet catalog + chip registry. No I/O.
server/Express + ws + PostgresThe only thing that runs the reducer. Persists + broadcasts.
client/React + ViteRenders state, sends actions over HTTP + WS.

Default port: 6336 (“hard six: 3+3 = 6, 6”). Postgres is optional — the server boots in memory-only mode if DATABASE_URL is unset.


This documentation is kept in sync with the implementation. When a decision changes, update docs/design.md first, then mirror it here.