Skip to content

concepts

Architecture

The packages, what each holds and the direction of their imports.

Keystone is a set of packages, each scoped @elsikora/keystone-<name>, written in strict TypeScript as ES modules. Each package lists only its allowed imports, and every import points to a lower level, so the graph has no cycle.

Client

  • Level 0: protocol (wire types), i18n (locales, messages, formats).
  • Level 1: content (schemas for a game's data).
  • Level 2: core, the headless engine.
  • Level 3: web (browser ports), field (PixiJS and GSAP), ui-react (the reference interface).
  • Level 4: one package per mechanic.
  • Level 5: client, the composition root, and devtools.

core, protocol, i18n and content compile without the DOM library, so a browser API in them fails the type check. The build preset, build, is Node tooling and never part of a game bundle.

Server

event-schema and ports at the bottom, then game-contract, then the pure round-core; the server application, which the platform runs, on top; a testkit beside them. See the round server.

The full table, with what each package may import, is in Packages.