Zag.js is a pnpm monorepo (~96 workspace packages) with no external service dependencies (no databases, Docker, APIs). All development is purely frontend/library work.
See CLAUDE.md and .claude/docs/commands.md for the full reference. Summary:
| Task | Command |
|---|---|
| Install deps | pnpm install |
| Build all packages | pnpm build |
| Lint | pnpm lint |
| Unit tests (JS/core) | pnpm test-js --run |
| Unit tests (React) | pnpm test-react --run |
| Unit tests (all) | pnpm test |
| Start React dev server | pnpm start-react (port 3000) |
| E2E tests (React) | pnpm e2e-react |
| Typecheck | pnpm typecheck |
- Build before dev server:
pnpm buildmust complete before running any example dev servers or E2E tests, since workspace packages useworkspace:*references and need compileddist/output. - Build is slow: The full
pnpm buildtakes ~2 minutes across all packages. It only needs to run once unless package source changes. - Node version:
.nvmrcspecifies Node 24, but Node 22 (pre-installed) works fine. The engine constraint is>=18.0.0. - pnpm version:
packageManagerfield specifiespnpm@10.33.0. Corepack or the pre-installed pnpm handles this. - Husky hooks: Pre-commit runs
lint-staged(prettier on changed files). Commit-msg runscommitlintenforcing conventional commits. Both are non-blocking for development. - E2E tests: Playwright auto-starts the appropriate dev server. Set
FRAMEWORKenv var to target a specific framework (default:react). Playwright browsers must be installed first viapnpm exec playwright install. - No secrets required: No environment variables, API keys, or external services are needed for development.