Updated Jun 1, 2026
Maintain iOS architecture
Client architecture showing the SwiftUI app shell, SwiftData container, AppRootView states, AppModel coordination, HealthKit import, export manifests, and local-first sync seams.
Dates
- Created
- Jun 1, 2026
- Last updated
- Jun 1, 2026
Document Metadata
- title: iOS Architecture
- description: Current client-side structure and near-term design direction
- status: evolving
- lastUpdated: "2026-05-02 12:14 ET (America/New_York)"
- owner: Engineering
iOS Architecture ## Current Shape - MaintainApp creates the SwiftData model container - AppRootView switches across lo
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
Provenance
- Source file:
DOCS/development/ios-architecture.md - Source URL: https://github.com/maggielerman/maintain-ios/blob/main/DOCS/development/ios-architecture.md