Start from the user behavior, identify its owning layer, and extend an existing package when one already owns the domain.
Choose the location
- Add route composition and layouts under
apps/mobile/app.
- Add app-specific components under
apps/mobile/src.
- Add reusable domain behavior under
packages/<domain>/src.
- Add provider SDK code only inside the domain’s
adapters directory.
- Keep request, response, and persisted-data schemas in the existing package that owns the domain.
- Add environment fields and flags through
@amisi-mobile-starter/config.
For a new domain library, the local generator can create a minimal package:
The generator does not add useful behavior, tests, lint setup, or runtime schemas. Treat its output as a starting point.
Build the vertical slice
- Define or reuse the contract for data crossing a boundary.
- Implement domain behavior in the owning package.
- Keep provider details behind an adapter.
- Export the package’s public surface from
src/index.ts.
- Compose the feature from an active route under
apps/mobile/app.
- Reuse
@amisi-mobile-starter/ui, @amisi-mobile-starter/theme, @amisi-mobile-starter/i18n, and typed analytics interactions.
- Cover success, failure, and cancellation paths with focused tests.
A route-only file can be as small as:
Use that pattern only when the package owns the complete screen. Otherwise, keep route-specific navigation and composition in the route while moving reusable logic out.
The current screen generator writes routes under inactive
apps/mobile/src/app. Expo Router reads apps/mobile/app, so relocate the
generated route before using it.
Verify
Run the affected project’s checks while iterating. Before completion, run the repository gate: