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.
Change flow
Section titled “Change flow”- Update the contract schema.
- Regenerate models with
bun run packages/contract/scripts/codegen-models.ts. - Validate fixtures with
bun --filter @repo/contract fixtures:validate. - Update native call sites and tests.
- Run contract checks and confirm
git diffcontains only intentional generated changes.
When to touch it
Section titled “When to touch it”Touch @repo/contract when a response shape crosses into native apps. Do not hand-edit generated native models as the source of truth.