iOS Architecture
Markdown file
DOCS/development/ios-architecture.md
iOS Architecture
Current Shape
MaintainAppcreates the SwiftData model containerAppRootViewswitches across loading, runtime-configuration issue, sign-in, onboarding, and main-tab statesAppModelis the central observable store for auth, local CRUD, HealthKit import, export manifests, and remote sync orchestration- Feature views consume
AppModelstate instead of owning their own networking or persistence seams - Real profile creation no longer seeds sample support data; sample-rich states are limited to repo-owned UI-testing and visual-checkpoint fixtures
- Runtime configuration validation now surfaces explicit packaged-config failures instead of silently collapsing into misleading local-only behavior
Key App Building Blocks
ios/Sources/App/for entry pointsios/Sources/Features/for screen-level featuresios/Sources/Core/Models/for domain and persistence modelsios/Sources/Core/Services/for HealthKit, insight generation, and remote sync seamsios/Sources/Core/DesignSystem/andios/Sources/Core/Components/for UI consistency
Near-term Direction
- Keep local-first UX while tightening the current
AppModelseams around sync, auth refresh, and HealthKit import - Extract narrower coordinators from
AppModelas the next hardening step instead of pushing more responsibility into the monolith - Continue refining the maintenance-loop product language without expanding into unsupported clinical guidance