Opinionated boilerplate for slot games built on pixi-reels.
npm create slotplate my-slot
cd my-slot
pnpm install
pnpm devslotplate/
├── bin.js create-slotplate CLI — what `npm create` runs
├── template/ the boilerplate copied into new projects
└── docs/ Astro + Starlight docs site, deployed to slotplate.dev
- The root package is
create-slotplate. It is what people install. - The template is the project you get. It is opinionated: MobX stores, FSM phase handlers, pure domain, GSAP-driven timing,
pixi-reelsbehind one presenter, agent rules committed. - The docs site lives in
docs/and deploys independently. It reads../template/at build time so code examples never drift.
- Domain imports nothing from pixi or mobx.
- Time is owned by the FSM; no
setTimeoutin game code — useticker.schedule. - Views present state; presenters don't decide when.
- State mutates only through actions.
- Every subsystem is
Disposable; teardown cascades. - Fail loud — no silent catches, no untyped escape hatches.
- One composition root.
pixi-reelssits behind one presenter.- Paytables and reelstrips are data, not code.
- Every phase is a file; every file is testable without a canvas.
- The docs exist to be read by humans AND agents.
See docs/src/content/docs/principles.mdx for the long-form versions.
pnpm install # bootstraps root + docs (template is independent)
pnpm dev # serves docs site at http://localhost:4321
pnpm build # builds docs/dist (Astro + sitemap + llms.txt)
pnpm lint # biome on docs/
pnpm test:cli # scaffolds the CLI into a temp dir as a smoke testThe template/ directory is the scaffold output, not a workspace member —
its lockfile and node_modules stay independent so the scaffolded project
resolves cleanly. cd template && pnpm install to work on it directly.
Releases are managed by Changesets:
pnpm changeset # describe your change (patch / minor / major)
git add .changeset/*.md && git commit -m "feat: describe it"
git push # PR + merge to mainWhen a PR with a .changeset/*.md lands on main, release.yml opens a
"Version Packages" PR. Merging that PR triggers pnpm release, which
publishes create-slotplate to npm. See .changeset/README.md.
Snapshot previews ship from any non-main branch with a pending changeset:
pnpm dlx create-slotplate@<branch-name> my-app.
- Open an issue before a large PR.
- One logical change per PR.
- Run
pnpm changesetwhen the change is user-visible. docs/deploys on merge tomain.
MIT