This guide helps automated agents submit high-quality PRs for this repo.
package/is the published library (TypeScript + native code via Nitro).example/is an Expo app used for manual verification.docs/is the technical documentation (Docusaurus, English). User-facing docs live underdocs/docs/(API, setup, guides, troubleshooting, etc.). Runbun run docs:startorbun run docs:buildfrom root.- Root
package.jsondefines the workspace.
bun install
cd package && bun install
cd example && bun install- Generate Nitro bindings:
cd package && bun run specs - Typecheck:
cd package && bun run typecheck - Lint:
cd package && bun run lint - Test (all):
cd package && bun run test - Test (single file):
cd package && bun run test -- src/hooks/__tests__/usePaymentCheckout.integration.test.ts - Run example:
cd example && npx expo prebuild && npx expo run:iosornpx expo run:android - Docs (dev):
bun run docs:start. Docs (build):bun run docs:build
- Specs and types are generated by Nitrogen.
- If you change any
*.nitro.tsspecs or Hybrid Object types, runcd package && bun run specs. - Regenerating specs updates the native bindings and TypeScript outputs under
package/.
- Keep PRs small and scoped to one objective.
- If you change public APIs, update
README.mdand any types. - Docs (
docs/): When you add, change, or remove public API, setup steps, or user-facing behavior, create, update, or delete the relevant pages underdocs/docs/so the Docusaurus docs stay in sync. Examples: new hook option →docs/docs/api/use-payment-checkout.md; plugin config change →docs/docs/setup/expo-plugin.md; new guide → add underdocs/docs/guides/and reference indocs/sidebars.ts. All docs content is in English. - If you touch native code, validate both iOS and Android paths.
- Avoid drive-by refactors and formatting-only changes.
Include these sections in your PR description:
- Summary: 2-5 bullets describing the intent and impact.
- Test plan: checklist of commands run and outcomes. If untested, say why.
- Risk: note compatibility, migration, or platform risk.
- Notes: assumptions, edge cases, or follow-ups.
Example template:
## Summary
- ...
## Test plan
- [ ] `cd package && bun run typecheck` (not run)
- [ ] `cd package && bun run lint` (not run)
- [ ] `cd package && bun run test:ci` (not run)
- [ ] `cd example && bunx expo run:ios` (not run)
- [ ] `cd example && bunx expo run:android` (not run)
- [ ] `bun run docs:build` (if you changed `docs/` or public API/setup; not run)
## Risk
- ...
## Notes
- ...