Thanks for your interest in contributing! This guide will help you get set up and explain how we work.
For questions or ideas, open a GitHub issue before starting large work.
- Node.js >= 22
- bun (install via bun.sh)
# Fork then clone
git clone https://github.com/<your-username>/paykit.git
cd paykit
bun install
bun buildbun dev # Watch mode (Turbo)
bun typecheck # tsc --build
bun lint # oxlint --deny-warnings
bun lint:fix # Auto-fix lint issues
bun format # oxfmt
bun format:check # Check formatting without writingpackages/
paykit/ # Core orchestration package
stripe/ # Stripe provider
dash/ # Dashboard
polar/ # Polar provider
apps/
demo/ # Demo app
web/ # Next.js web app
e2e/ # End-to-end tests
We use Vitest. Run a specific test file or pattern:
vitest /path/to/test-file -t "pattern"- Bug fixes and new features must include tests.
- For regression tests, add a
@seeJSDoc comment with the issue URL:
/** @see https://github.com/getpaykit/paykit/issues/123 */
it("does not throw when ...", () => {Enforced by oxlint and oxfmt (not Prettier or Biome; do not add them). For a deeper reference on conventions and tooling, see AGENTS.md.
Key rules:
- TypeScript strict mode; no
any, no@ts-ignore(use@ts-expect-errorwith an explanation) import typefor type-only imports, separated from value importsimport * as z from "zod", neverimport { z } from "zod"- No enums; use
as constobjects or union types - No classes; use plain functions and objects
- Node.js built-ins use the
node:protocol (node:fs,node:path) - No
Bufferin library code; useUint8Array
We follow Conventional Commits:
feat(stripe): add webhook handler
fix(paykit): correct subscription renewal logic
docs: update README setup steps
chore: bump bun to 1.3.13
The scope is the package name (paykit, stripe, dash, polar).
- PRs target
main - For bug fixes or non-breaking improvements, a PR is enough
- For new features or breaking changes, open an issue first to discuss
When you change anything under packages/, run:
bun changesetFollow the prompts to describe the change. Commit the generated .changeset/*.md file with your PR.
Search existing issues first. If none match, open a new one with:
- A minimal reproduction
- Expected vs. actual behavior
- Node.js version and relevant package versions
Do not open a public issue for security vulnerabilities. Email security@paykit.sh instead.
AI-assisted PRs are welcome. The bar is the same as for any other PR: the change solves a real problem, includes tests, and the contributor can speak to the code in review.