Developer Guide · Updated for Poker Engine v0.0.42
Welcome to the Poker Engine developer guide. This documentation is for developers who want to understand, extend, or contribute to the codebase.
Prerequisites
Software
Version
Purpose
Node.js
20.19+
Runtime
npm
10.x+
Package manager
Docker
24.x+
PostgreSQL container
Git
2.x+
Version control
Quick Start
# 1. Clone and install
git clone <repository-url>
cd poker-engine
npm install # Root install covers the client and packages/* workspaces
# 2. Start PostgreSQL
docker compose up -d postgres
# 3. Configure environment
cp .env.example .env
# Edit .env — the placeholder secrets are rejected at startup; see setup.md
# 4. Set up the database
npm run db:generate
npm run db:migrate
npm run db:seed
# 5. Start development servers
npm run dev # Backend: http://localhost:3000
npm run dev:client # Frontend: http://localhost:5173
Verify Installation
curl http://localhost:3000/health # "status" is "ok" when healthy
npm test # Run the test suite
npm run typecheck # Type-check backend, scripts and workspaces
Game settings are in the database, not env vars. SMTP, rake, buy-in limits, feature flags — all managed via the Admin Panel.
Environment variables are validated at startup via Zod (src/config/env-schema.ts, loaded by src/config/env.ts). Missing required vars will crash on startup.
WebSocket events flow through a typed pipeline (validation → authorization → rate limiting → idempotency, then the event handler and its broadcasts).
Poker variants each have a dedicated evaluator registered in HandEvaluatorFactory. To add a new variant, register a new evaluator there.
Tournament procedure claims must match the active rule profiles and the deterministic compliance matrix in src/game/verification/tournament-compliance.ts. See Tournament Engine and Gameplay Verification Suite.