When to activate
- Designing navigation structure for a new mobile app
- Choosing state management approach (Redux, Zustand, Riverpod, etc.)
- Defining data layer architecture (API clients, caching, persistence)
- Setting up module boundaries and feature-based folder structure
- Migrating from monolithic to modular architecture
When NOT to use
- For backend API architecture (use API Developer Stack)
- For web app architecture
- For UI component design (framework-specific skills)
Instructions
- Define app complexity tier. Simple (1-5 screens), Medium (5-20 screens, 2-3 features), Complex (20+ screens, deep linking, offline).
- Choose navigation pattern. Stack (simple), Tab + Stack (medium), Drawer + Tab + Stack (complex). Map user flows.
- Select state management. Local state for UI, global store for shared data, server state for API. Match to framework (Zustand/Redux for RN, Riverpod/Bloc for Flutter, @Observable for SwiftUI).
- Design data layer. Repository pattern: API client → cache (in-memory + persistent) → repository → view model → UI.
- Define module boundaries. Feature-based folders:
features/auth/, features/feed/, features/profile/. Shared: core/, shared/ui/, shared/utils/.
- Plan deep linking. Map URL schemes to screens:
app://profile/123 → ProfileScreen(userId: "123").
- Document architecture decisions. ADRs for each major choice with alternatives considered.
Example
Architecture Decision: Medium-complexity e-commerce app
Navigation: Bottom tabs (Home, Search, Cart, Profile) + Stack per tab
State: Zustand (global: cart, auth) + React Query (server: products, orders)
Data: API client (axios) → React Query cache → MMKV persistence
Modules:
features/auth/ — Login, register, forgot password
features/catalog/ — Product list, detail, search
features/cart/ — Cart, checkout, payment
features/profile/ — Account, orders, settings
core/ — Navigation, theme, i18n, analytics
shared/ — UI components, utils, types
1---2name: app-architecture3description: Design mobile app architecture — navigation patterns, state management, data layer, and module boundaries4---56## When to activate78- Designing navigation structure for a new mobile app9- Choosing state management approach (Redux, Zustand, Riverpod, etc.)10- Defining data layer architecture (API clients, caching, persistence)11- Setting up module boundaries and feature-based folder structure12- Migrating from monolithic to modular architecture1314## When NOT to use1516- For backend API architecture (use API Developer Stack)17- For web app architecture18- For UI component design (framework-specific skills)1920## Instructions21221. **Define app complexity tier.** Simple (1-5 screens), Medium (5-20 screens, 2-3 features), Complex (20+ screens, deep linking, offline).232. **Choose navigation pattern.** Stack (simple), Tab + Stack (medium), Drawer + Tab + Stack (complex). Map user flows.243. **Select state management.** Local state for UI, global store for shared data, server state for API. Match to framework (Zustand/Redux for RN, Riverpod/Bloc for Flutter, @Observable for SwiftUI).254. **Design data layer.** Repository pattern: API client → cache (in-memory + persistent) → repository → view model → UI.265. **Define module boundaries.** Feature-based folders: `features/auth/`, `features/feed/`, `features/profile/`. Shared: `core/`, `shared/ui/`, `shared/utils/`.276. **Plan deep linking.** Map URL schemes to screens: `app://profile/123` → ProfileScreen(userId: "123").287. **Document architecture decisions.** ADRs for each major choice with alternatives considered.2930## Example3132```33Architecture Decision: Medium-complexity e-commerce app3435Navigation: Bottom tabs (Home, Search, Cart, Profile) + Stack per tab36State: Zustand (global: cart, auth) + React Query (server: products, orders)37Data: API client (axios) → React Query cache → MMKV persistence38Modules:39 features/auth/ — Login, register, forgot password40 features/catalog/ — Product list, detail, search41 features/cart/ — Cart, checkout, payment42 features/profile/ — Account, orders, settings43 core/ — Navigation, theme, i18n, analytics44 shared/ — UI components, utils, types45```