Get points by finding card sets.
- TypeScript for the game source and tests.
- Vite for bundling and the dev server.
- Phaser 3 game framework.
- pnpm as the package manager (enable with
corepack enable). - Vitest for unit tests.
- Node.js 24 LTS (see
.nvmrc).
Install dependencies
git clone git@github.com:elematch/elematch.git
cd elematch
pnpm installRun the development server
pnpm devBuild the project (output in dist/)
pnpm buildpnpm build type-checks with tsc --noEmit before bundling. To type-check on its own:
pnpm typecheckRun the tests
pnpm testCommits follow the Angular Conventional Commits convention, enforced automatically by commitlint (@commitlint/config-angular) via the Husky commit-msg hook (.husky/commit-msg). This is the same convention semantic-release uses to decide version bumps (see Releases), so well-formed messages are what drive automated releases.
- Subject line:
<type>(<scope>): <summary>.typeis lowercase and one of:build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test. (choreis added on top of Angular's set for maintenance commits likechore(deps)and the semantic-releasechore(release)bot — keepcommitlint.config.jsand this list in sync.)summaryis lowercase, imperative mood, no trailing period; keep the whole header ≤ 72 characters.
- Use a focused scope when useful (e.g.
card,game,scene,ui,build,deps); omit it only for broad repository changes. - The hook requires dev dependencies installed (
pnpm install); bypass only in genuine emergencies withgit commit --no-verify.
Examples:
feat(scene): add tutorial replay button
fix(card): correct set-matching for duplicate symbols
chore(deps): update phaser to 3.90
Versioning is fully automated by semantic-release — there are no manual version bumps. On every push to master, .github/workflows/release.yml:
- derives the next SemVer from the Conventional Commits since the last
vX.Y.Ztag (feat→ minor,fix/perf→ patch,!/BREAKING CHANGE:→ major); - updates
package.jsonand prepends a section toCHANGELOG.md, then runspnpm buildas a gate (a broken build aborts the release before anything is tagged); - commits those back to
master, tagsvX.Y.Z, and creates the GitHub Release.
The new tag triggers deploy-og.yml, which deploys og.elemat.ch with the bumped version. If the GitHub Release notes and CHANGELOG.md ever drift, pnpm release:sync-notes rewrites each release body from the changelog (requires an authenticated gh CLI).
The site is deployed as a static-assets Worker named elemat-ch (see wrangler.jsonc).
pnpm deploy # builds, then runs `wrangler deploy`Authenticate first with wrangler login if you have not already.
Build the docker image
git clone git@github.com:elematch/elematch.git
cd elematch
docker build -t elematch .Run the container
docker run -d -p 80:80 elematch
