Playground of Stacks smart-contract mini-games with a matching Next.js frontend and curated learning resources.
stacks-arcade/— Clarity contracts for each mini-game plus Vitest suites (npm test) and Clarinet config.frontend/— Next.js app for the arcade UI (npm run dev,npm run build).docs/— Short gameplay and contract notes (e.g.,docs/games/coin-flip.md,docs/games/emoji-battle.md).stacks/— Stacks knowledge base with a quick index atstacks/INDEX.md.
- Install dependencies:
cd stacks-arcade && npm installcd frontend && npm install
- Run contract tests from
stacks-arcade/:npm testfor unit tests (Vitest + clarinet simnet env)npm run test:reportfor coverage and cost outputnpm run test:watchto re-run on contract/test changes (uses chokidar)
- Run the frontend from
frontend/:npm run devthen openhttp://localhost:3000
- Optional: Clarinet CLI
clarinet checkto lint contractsclarinet consolefor quick manual calls
- Node.js 18+ (tested) and npm.
- Clarinet CLI if you want local REPL/inspection (not required for Vitest runs).
- Git for branching and workflow.
- Node.js 18+ is recommended for both workspaces.
- Clarinet CLI is optional for extra contract inspection; core tests run via
vitestwith the Clarinet SDK environment. - Vitest is configured with
maxWorkers: 1to avoid simnet contention—keep it when adding tests.