Thanks for your interest in contributing. This doc covers how to get set up, run checks, and submit changes.
- Node.js (see .nvmrc or
enginesin package.json if present) - npm (or yarn/pnpm if the project supports it)
git clone <repo-url>
cd phuzzle
npm install
npm run doctorCopy .env.example to .env and fill in any required keys (e.g. Supabase, PostHog). See docs/SUPABASE_SETUP.md for backend setup.
npm run doctor is the quickest way to catch the common local setup issues before you burn time on a failing push. It checks:
- Node version and required CLI tools
- whether
node_modulesand key packages are installed - Playwright CLI/browser availability
- Docker/Supabase reachability for backend-dependent E2E work
- whether port
4173is already occupied by a local preview server
Run these locally before you commit; CI will run them on the PR as well.
| Command | Description |
|---|---|
npm run lint |
ESLint (TypeScript + jsx-a11y) |
npm run typecheck |
TypeScript (no emit) |
npm run test |
Unit tests (Vitest, 4 workers) |
npm run build |
Production build |
npm run precheck |
Matches the local pre-push gate |
Optional:
npm run test:e2e:smoke— Fast Chromium smoke suite for the highest-signal flows.npm run test:e2e— Full Playwright E2E matrix (runnpx playwright installonce; local runs reuse an existing Phuzzle server on port4173when available).npm run format:check— Prettier; usenpm run formatto fix.
Running the same commands before each commit helps catch issues early.
- Open an issue or comment on an existing one so we can align on scope.
- Create a branch from
main(e.g.feature/short-nameorfix/short-name). - Make your changes; keep commits focused and messages clear.
- Run the pre-PR checks above and fix any failures.
- Open a PR against
mainwith a short description and, if relevant, a link to the issue. - Address review feedback; we’ll merge once everything looks good.
- Lint: ESLint is in eslint.config.ts. Fix auto-fixable issues with
npm run lint:fix. - Style: Prettier handles formatting; use the project’s config.
- Types: Prefer TypeScript types over
any; the codebase is strict. - Storage: Use
safeLocalStoragefrom@/utils/safeLocalStorageinstead of rawlocalStorageso private/incognito or full storage doesn’t break the app. - Console: Use
console.warn/console.errorfor diagnostics; avoidconsole.log/console.debugin production paths (or guard withimport.meta.env.DEV).
- README.md — Overview, features, getting started, testing, PWA.
- docs/ — CHANGES, LIGHTHOUSE, SUPABASE_SETUP, SHARING, STREAK-FREEZE, FUTURE, etc.
- CONTRIBUTORS.md — List of contributors.
If you have questions, DM the maintainers or drop a note in the Discord (see README).
No gatekeeping. No ego. Just building something fun together.