A mobile-first pocket reference for the Ironsworn and Starforged tabletop RPGs — every move from both books, searchable and readable at a glance, installable as a PWA and fully offline after first load. Built for use during play, primarily on a phone.
Live: https://sergiosjs.github.io/iron-moves/
| Mobile (Starforged, dark) | Mobile (Ironsworn, light) | Desktop |
|---|---|---|
![]() |
![]() |
![]() |
- Complete moves reference — all 53 Ironsworn and 52 Starforged moves, extracted verbatim from the official PDFs, with triggers, roll options, Strong Hit / Weak Hit / Miss outcome blocks, tables and sidebars.
- Dice roller tied to the move — tap a move's "Roll +edge" option (or its Roll button) and the roller offers that move's stats, with remembered stat values, adds and momentum; progress moves get a progress roll. The result is a compact bar that scrolls to and highlights the matching Strong Hit / Weak Hit / Miss block, flags a match, and offers "burn momentum" when it would help. Physics-based 3D dice (via
@3d-dice/dice-box) or a lightweight 2D animation; reduced motion skips both. - Fast lookup — ranked, accent-insensitive search (English titles work in Portuguese too), stat filter chips, query kept in the URL; recently opened moves one tap away; or browse game → category → move in ≤3 taps.
- Cross-referenced moves — references like Pay the Price render as tappable links that open in a stacked bottom sheet (Back closes them one at a time), so you never lose your place. A jump bar reaches Strong / Weak / Miss in one tap.
- Favorites — star frequently-used moves (Face Danger, Pay the Price…) for one-tap access, with undo and sort by category; persisted in
localStorage. - Per-game visual identity — each book gets its own display font (Metamorphous / Orbitron), body font (Georgia / Exo 2), layered background and category colors taken from the books themselves, mirroring the companion oracle app iron-oracle.
- Light & dark themes — respects
prefers-color-scheme, with manual override in Settings; WCAG-AA-checked contrast throughout. - Offline-first PWA — installable, ~1 MB precache (the 3D dice engine is cached on first use), updates itself on the next visit; works with no signal.
- Responsive — bottom tab bar and thumb-reach action bar on mobile; sidebar, master-detail and a side drawer for move detail at
mdand up. - English + Portuguese — UI strings via i18next; pt-BR move text from the official Brazilian edition (Tria Editora), with en fallback per move.
- Vite + React 19 + TypeScript (strict) — static SPA, no backend
- Tailwind CSS with a design-tokens theme (
src/styles/tokens.tsis the single source of truth for color) - React Router (hash router — GH-Pages-safe, shareable links)
- Fuse.js for client-side fuzzy search
- i18next + react-i18next for UI strings
- vite-plugin-pwa (Workbox) for offline caching and installability
- Vitest + Testing Library for unit tests, Playwright for a mobile-viewport e2e smoke test
- pnpm as package manager
Requires Node 22+ and pnpm 9.
pnpm i
pnpm dev # local dev server| Command | What it does |
|---|---|
pnpm dev |
Dev server (regenerates content JSON first) |
pnpm build |
Production build → dist/ |
pnpm preview |
Serve the production build locally |
pnpm typecheck |
tsc -b (strict, no any) |
pnpm lint |
ESLint |
pnpm test |
Vitest unit tests |
pnpm test:e2e |
Playwright mobile-viewport smoke test (builds + previews itself) |
pnpm format |
Prettier write |
pnpm typecheck, lint, test and build all run on every PR (.github/workflows/ci.yml) and must pass before merge.
├── content/ # source-of-truth rules text (hand-curated, verbatim)
│ ├── ironsworn_moves.md
│ └── starforged_moves.md
├── docs/ # original PDFs (reference only) + screenshots
├── scripts/
│ └── build-content.mjs # content/*.md → src/data/<locale>/*.generated.json
├── src/
│ ├── app/ # routing shell, layout, providers
│ ├── components/ # MoveCard, CategoryChip, OutcomeBlock, TabBar, …
│ ├── features/ # browse, move-detail, search, favorites, settings
│ ├── data/
│ │ ├── schema.ts # TS types shared by content + UI
│ │ └── en/ # generated content JSON (gitignored, rebuilt every run)
│ ├── i18n/locales/ # en + pt-BR UI strings
│ └── styles/
│ ├── tokens.ts # all colors (book-extracted tokens + WCAG math)
│ └── gameTheme.ts # per-game fonts, backgrounds, scanlines
└── .github/workflows/ # ci.yml (PR gate) + deploy.yml (Pages)
The rules text in content/*.md is the human-readable source of truth — never edit it to "fix" wording without checking the source PDFs in docs/ first; it's a faithful extraction.
scripts/build-content.mjs parses those files into typed JSON (src/data/en/*.generated.json, per src/data/schema.ts) and runs automatically before every dev/build/typecheck/test. The generated JSON is gitignored — fix the parser or the .md, never the JSON. Cross-referenced move names (*Pay the Price*) become tappable links via {move:...} tokens.
src/styles/tokens.ts— the only place book colors are defined: extracted ink/paper/accent tokens, Starforged's 11 category colors (Ironsworn is two-tone by design), and WCAG contrast math that derives the light/dark surface ramps and picks per-accent text colors.src/styles/gameTheme.ts— per-game personality mirroring iron-oracle: display font for titles, body font for content, layered per-game × light/dark backgrounds, and the horizontal scanline texture (a background layer onbody/.app-tabbar, not an overlay).- Wiring lives in
tailwind.config.tsvia thedata-current-gameattribute on<html>; dark variants use compound selectors (.dark[data-current-game=...]).
UI strings ship in en and pt-BR (switcher in Settings; Portuguese-language devices get a one-time prompt). Move content is locale-namespaced (src/data/<locale>/) with per-move fallback to en. The pt-BR move text follows the official Brazilian edition by Tria Editora — Ironsworn — Livro Básico and Starforged — Livro Básico, text licensed CC BY-NC-SA 4.0 by Shawn Tomkin — and is hand-curated in src/data/pt-BR/*.json. Delve moves have no Portuguese edition; their translation follows the official terminology.
Every push to main runs .github/workflows/deploy.yml: install → pnpm build with VITE_BASE=/iron-moves/ → publish dist/ via actions/deploy-pages to https://sergiosjs.github.io/iron-moves/.
There is no manual build-and-upload step, and dist/ is never committed. Pages source is "GitHub Actions" (repo setting).
This repo is built collaboratively by multiple AI coding agents across sessions — see SPEC.md (full product/technical spec) and AGENTS.md (quick-reference conventions, gotchas, and definition-of-done) before changing anything. In short: strict TS, no any, colors only from tokens.ts, one ticket per PR, CI green before merge.
- Ironsworn and Ironsworn: Starforged are by Shawn Tomkin — the rules text extracted in
content/comes from the official PDFs under their Creative Commons licenses. Get the books at ironswornrpg.com. This is an unofficial fan-made reference app. - Visual theme inspired by this project's companion app, iron-oracle (oracle tables for the same games).
- Fonts: Metamorphous, Orbitron, Exo 2, Oswald (all OFL, self-hosted via Fontsource).


