Application structure
apps/mobile uses Expo SDK 58, React Native and file-based Expo Router routes. Auth routes sit outside the protected tabs. The NativeTabs are Garage, Finances, Service and Profile; Profile contains Sessions, passkeys, Organizations and optional subscriptions. The app is dark-only and monochrome by default (handoff/design/DESIGN.md); Appearance adds Car colour and Warm, and every component takes its colours from useAppTheme().
The native design layer (src/design) builds on @autofolio/tokens and holds the DESIGN.md §5 components: pills, card, row, segmented control, toggle, bottom sheet, glass buttons, vehicle hero, garage card, empty state and tabular numbers. Icons are the handoff SVGs only. Hooks own mutations, auth transitions, dialogs and toasts. Keep route components focused on composition rather than duplicating transport policy.
src/ follows the backend's feature shape (ADR-0013): routes in src/app only return a screen, each feature lives in one flat src/features/<feature>/ folder (<feature>.screen.tsx, <feature>.hooks.ts, components and models), and cross-cutting code sits in src/platform/ (rpc, auth session, i18n, feedback, theme). Screens and components read data only through hooks. scripts/mobile-feature-boundaries.test.mjs checks the direction rules in pnpm test.
Backend and scope
EXPO_PUBLIC_SERVER_URL selects the backend, with localhost:3005 as the local fallback. A physical device needs a reachable laptop LAN address. Better Auth's Expo client owns credentials; request scope captures User, Session and Organization. Organization transitions cancel stale waits and hide stale query results, including an A-to-B-to-A transition.
Cached data is scoped to the observed identity and Organization. It is not authorization, and a late response from an old identity must not clear or overwrite the new one.
Dev builds open any board with seeded data through autofolio://dev/<board>?lang=pt-BR|en-US|de-DE (the dev variant answers both autofolio-dev:// and autofolio://). The link signs into the demo account of that language through the server's dev-only /api/auth/dev/seed-sign-in (DEV_SEED_LOGIN=true, see environments); a live session of that demo account, its own garage open, is kept instead of seeding and signing in again (the next link takes well under a second and adds no device), and each board opens over the tabs alone, at their start. Boards without a screen yet open a placeholder whose root carries screen-<board>. Without ?lang the link opens in en-US, the flows' locale. M-Novo-Gasto, and Add expense opened from M-Veiculo's link, start with the board's amount typed in (F2 has no typing step); the app's own form starts empty. Production bundles drop the dev screen.
Native capabilities
RevenueCat requires its SDK in the native build and both billing gates. The template's push client and todo widget left with the task demo; reminders came back with the AutoFolio alerts, and the home-screen widget shows the next service (widgets). Biometric app lock protects local presentation, not server permission.
Extend and verify
Use the shared API contracts, then expose behavior through a mobile hook and the existing design components. Test on a development build when adding native modules. TypeScript and Hermes export do not prove device permission dialogs, purchases, background push or store signing.
The Expo SDK compatibility matrix owns native versions. Do not bump native modules merely because npm has a newer release; rebuild the dev client when the native dependency set changes. See libraries and upgrade policy.