- API clients are auto-generated from OpenAPI specs in
definitions/ - Run
yarn generateafter spec changes - Generated types live alongside specs; clients in
ts/api/
- Use Sentry only for unexpected failures, not expected flows
- Reuse utilities from
ts/utils/errors.ts:getError,getNetworkError,convertUnknownToError - For complex UI, wrap in
Sentry.ErrorBoundarywith fallback - For validation errors (e.g., io-ts decode failures), use
readablePrivacyReportfromts/utils/reporters.tsto convert errors to readable messages for logging or error reporting.
- Mixpanel client centralized in
ts/mixpanel.ts - Each feature exposes tracking helpers under
analytics/ - Call domain helpers (e.g.,
trackLoginSpidError) instead ofmixpanelTrackdirectly