About This Architecture
Live workout session interaction flow using MVVM with reactive state management across user actions, view controllers, and real-time data streams. User actions trigger dispatch through ViewControllers and ViewModels to a centralized LiveWorkoutSessionController, which orchestrates LiveActivity controls and queries Data Sources (time, pedometer, heart rate, location). The LiveWorkoutSessionStore publishes low-frequency and high-frequency state updates to separate ViewModels, which feed dumb Views that render Stats and Map pages without business logic. This architecture demonstrates clean separation of concerns: composition via factory, unidirectional data flow from user input through controllers to store, and reactive publication back to UI layers. Fork this diagram to customize for your app's specific data sources, add additional view pages, or document alternative state management patterns. The pattern scales well for complex fitness apps requiring real-time sensor integration and multi-page UI synchronization.