Thank you for considering a contribution!
- Fork the repository.
- Follow the Development Setup guide (
corepack enable,pnpm install,pnpm dev). - Skim the System Overview and the ADRs so your change fits the existing design.
- Check the open GitHub Issues.
- Feature requests are welcome. Open an issue to discuss before implementing anything large.
- Bug reports: include steps to reproduce, expected vs. actual behavior, and browser/OS.
PixelHub uses GitFlow. develop is integration branch; main is stable and deployable; all work happens on short-lived branches off develop.
| Branch | Purpose | Merges into |
|---|---|---|
main |
Stable. Every push of code builds and publishes images. | (release target) |
develop |
Integration branch. Topic branches merge here first. | main via release PR |
feat/* |
New features. Branch from develop. |
develop via PR |
fix/* |
Bug fixes. Branch from develop. |
develop via PR |
docs/* |
Documentation only. | develop via PR |
chore/* |
Deps, CI, tooling. | develop via PR |
refactor/* |
Restructure with no behavior change. | develop via PR |
# 1. Start from an up-to-date develop
git checkout develop && git pull origin develop
# 2. Create your branch
git checkout -b feat/private-zones
# 3. Commit as you go (Conventional Commits)
git commit -m "feat(world): add private zone tiles"
# 4. Push and open a PR into develop
git push -u origin feat/private-zonesFollow Conventional Commits:
<type>(<optional scope>): <short description>
[optional body]
[optional footer: Closes #123]
| Type | When to use |
|---|---|
feat |
New user-facing feature |
fix |
Bug fix |
refactor |
Code restructure, no behavior change |
perf |
Performance improvement |
test |
Adding or fixing tests |
docs |
Documentation only |
chore |
Build system, deps, CI |
ci |
CI/CD pipeline changes |
Examples:
feat(voice): persist mic choice across refresh
fix(movement): clamp diagonal speed to match cardinal
docs: add full docs structure (ADRs, architecture, deployment)
test(shared): cover audio gain falloff edge cases
Do not add AI attribution or co-author footers.
- TypeScript strict, no
any. Useunknownfor untrusted input and narrow it; give exported functions explicit types. - Immutability. Return new objects, do not mutate. The one exception is the Colyseus schema (
WorldState/Player), where in-place assignment is the framework contract. - Pure shared core. Deterministic, engine-agnostic logic (map, collision, movement, proximity, validation, rate limiting) lives in
@pixelhub/shared. Never import Phaser, Colyseus, or LiveKit fromshared. - Validate at the boundary. All untrusted client input is sanitized and validated server-side.
- Many small, focused files. Keep files well under 800 lines; organize by feature.
- No
console.login production paths, and no secrets in code.
PixelHub keeps a green suite (148 tests across shared, server, and client). Before pushing:
pnpm typecheck # all three packages
pnpm test # all three packages
pnpm -r build # shared, server, client- New behavior needs new tests. The deterministic core belongs in
@pixelhub/sharedunit tests; server behavior is covered with@colyseus/testingintegration tests; client UI and voice are tested under jsdom (voice uses the LiveKit fake). See docs/testing.md. - Do not weaken or delete a test to make a change pass; fix the implementation.
- Branch from
develop(feat/*,fix/*,docs/*, ...). - Ensure
pnpm typecheck,pnpm test, andpnpm -r buildall pass. - Confirm no secrets or
.envfiles are committed. - Open a PR targeting
develop. Assign @mateuseap as reviewer. - Give the PR a clear title (Conventional Commits style) and a description with a Summary and a Test plan.
- After merge to
develop, create release PR fromdeveloptomain. - At least one maintainer review is required before merge.
Do not open a public issue for a security vulnerability. Email mateuseap@mateuseap.com with details. See docs/security/security.md.
By contributing, you agree your contributions are licensed under the MIT License.