Back to the game
Engineering case study

A tiny strategy game with a deliberately serious core.

Hexaweft is an original, replayable browser game designed to demonstrate the parts of full-stack work that are easy to hide in a conventional CRUD app: deterministic state, simultaneous commands, adversarial validation, persistence, and accessible spatial interaction.

Pure deterministic engine

Rules, validation, bot decisions, scoring, state hashes, and replay reconstruction live in framework-independent TypeScript.

Simultaneous resolution

Both moves validate against one start-of-beat snapshot. Same-cell placements intentionally become neutral splices.

Durable match records

Cloudflare D1 stores indexed results and compact replay event logs while anonymous ownership stays browser-scoped.

Accessible SVG board

The visual grid remains crisp at every size, while each cell exposes labels, focus, and complete keyboard operation.

Resolution pipeline

One beat, one canonical result.

  1. 01

    Validate both commands against the unchanged snapshot

  2. 02

    Apply rotations, overloads, placements, and collisions

  3. 03

    Traverse reciprocal ports from each source independently

  4. 04

    Score exclusive relays, hash state, append replay record

Verification

  • Canonical port-mask and rotation vectors
  • Same-cell collision and neutral splice tests
  • Exclusive, contested, target-score, and beat-limit outcomes
  • Seeded bot determinism and exact replay reconstruction
  • Typecheck, lint, production build, API and D1 smoke tests

Stack

TypeScript all the way down.

React 19, Vinext, accessible SVG, Tailwind CSS, Cloudflare Workers, D1, Vitest, and a pure shared game engine. The visual board is code-native; the four optional cosmetic finishes are original generated artwork.

Play Hexaweft