System Architecture

Warp 12 is a TypeScript Nx monorepo with strict separation between rules engine, presentation, and transport.

warp-12/
├── apps/
│   └── Warp12/                 # The Bridge — React client (Firebase, lobby, game table)
├── libs/
│   ├── engine/                 # warp12-engine — rules, AI, advisor (npm)
│   ├── react/                  # warp12-react — adapters, coach, hand layout (npm)
│   └── theme/                  # warp12-theme — DoubleEighteen skins (npm)
├── vendor/
│   └── double-eighteen/        # Domino rendering submodule (own Nx workspace)
└── RULES.md                    # Navigational Operations Manual (repo root)

Layers

LayerPackageResponsibility
Enginewarp12-engineDeterministic state machine: turns, scoring, Distress Beacon, Subspace Fracture, Warp AI, advisor explanations
React adapterswarp12-reactRoundState → trains, tactical coach, hand layout hooks
Themewarp12-themefederation domino tile presets for DoubleEighteen
Renderingdouble-eighteenReact domino components, train layout, chicken-foot geometry, pip theming
Client@warp12/Warp12Space-themed UI, Firebase Auth + Firestore sync
MultiplayerFirebase (warp-12)Auth, game documents, action log, private hands

Vendor boundary (vendor/double-eighteen)

double-eighteen is a git submodule with its own Nx workspace. Warp12 treats it as an opaque dependency:

  • Parent Nx only runs double-eighteen:build-lib (Vite → dist/)
  • Develop DoubleEighteen standalone: cd vendor/double-eighteen && yarn start
  • Do not run parent nx against DoubleEighteen’s internal projects

Development quickstart

Run all commands from the monorepo root:

yarn install
git submodule update --init vendor/double-eighteen
yarn build:all
yarn serve:bridge

See the repository README for Firebase setup, deployment, AI calibration commands, and troubleshooting.


Warp 12 — a Double-Twelve domino variant for the NX Epoch.