Files
idlegame/docs/adr/0001-tech-stack.md

1.1 KiB

ADR 0001: Web Stack And Engine Boundary

Status

Accepted, 2026-06-11.

Context

Idlegame is a text-first idle/incremental RPG. The UI is mostly panels, progress bars, action lists, resources, logs, and branching story choices. It must run well on phones from day one and remain easy to wrap later for desktop or mobile stores.

Decision

Use TypeScript strict, Vite, React 19, Zustand, Tailwind v4, Vitest, Biome, and vite-plugin-pwa.

Keep gameplay rules in a pure TypeScript engine under src/engine/. React, Zustand, browser storage, requestAnimationFrame, and lifecycle hooks belong outside the engine.

Use plain JavaScript numbers behind src/engine/num.ts for M0/M1. Human-readable values are a design pillar; a Decimal-style dependency is deferred until a later layer proves it is needed.

Consequences

  • Engine behavior is headless-testable with Vitest.
  • UI and wrapper changes should not force gameplay rewrites.
  • Offline progress uses the same fixed-timestep simulation path as online play.
  • Save/load validation sits at explicit boundaries with versioned schemas.
  • Dependencies must be permissive; no GPL packages are allowed.