Reuse by responsibility
Import from a package’s public entry point when the symbol is part of its supported API. Avoid deep imports into another package’s internal files.
Keep adapters replaceable
Provider SDKs belong inpackages/<domain>/src/adapters. Domain consumers should depend on the package contract or registry, not directly on Firebase, RevenueCat, OneSignal, or another vendor SDK.
When adding an adapter:
Do not over-share
Keep code local when it is used by one screen and has no stable cross-feature contract. Promote it only when reuse is real and the owner is clear. Avoid these patterns:- copying a Zod schema instead of keeping the shared shape in its owning package
- rebuilding a button or token that exists in
@amisi-mobile-starter/uior@amisi-mobile-starter/theme - importing provider SDKs in route files
- reading environment variables directly outside the approved configuration layer
- creating circular dependencies between domain packages
- exposing package internals only to shorten an import
Review the boundary
Before adding a shared export, check who owns the behavior, whether callers need a contract, and whether a provider can still be replaced. Runbun run verify after updating package exports or dependencies.