Skip to content

Native contract

@repo/contract is the source of truth for native wire models. It defines Zod schemas and emits Swift/Kotlin model code consumed by the native iOS and Android apps.

  1. Update the contract schema.
  2. Regenerate models with bun run packages/contract/scripts/codegen-models.ts.
  3. Validate fixtures with bun --filter @repo/contract fixtures:validate.
  4. Update native call sites and tests.
  5. Run contract checks and confirm git diff contains only intentional generated changes.

Touch @repo/contract when a response shape crosses into native apps. Do not hand-edit generated native models as the source of truth.