axiom-app-composition

Architect iOS app entry points and centralized state management with AppStateController.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-app-composition-pradeepmouli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-app-composition
Source: https://github.com/pradeepmouli/swift-template/tree/main/.agents/skills/axiom-app-composition
Command: npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-app-composition-pradeepmouli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a cohesive approach for architecting app entry points, centralized state management, and reliable root-view switching to reduce flicker and scattered logic across iOS apps.

Core Features & Use Cases

  • Central AppStateController enforces an explicit app state machine (loading, unauthenticated, onboarding, authenticated, error) as the single source of truth.
  • A thin @main that delegates navigation decisions to a RootView switch, ensuring smooth transitions between LaunchView, AuthenticationFlow, OnboardingFlow, MainTabView, and ErrorRecoveryView.
  • Scene lifecycle handling and coordinated responses to scenePhase changes (active, inactive, background) to validate sessions, refresh data, and preserve/restores state across launches.
  • Optional coordination strategies (coordinators or environment-based dependencies) to orchestrate multi-window and cross-feature navigation.
  • Clear module boundaries and API guidance to inform future modularization decisions.

Quick Start

Set up AppStateController as the app shell in @main, route RootView to app states, and handle scenePhase transitions to ensure a seamless launch.

Frequently Asked Questions about axiom-app-composition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an iOS app entry point to avoid root view flicker during launch?

To prevent root view flicker in iOS apps, structure a thin @main entry point that delegates navigation decisions to a RootView switch, using an AppStateController to ensure synchronous UI transitions between loading, authentication, and main app states.

What is the best way to manage centralized app state and scene lifecycle in SwiftUI?

Centralized app state in SwiftUI is managed via an AppStateController that acts as a single source of truth, coordinating scenePhase changes like active, inactive, and background to validate sessions, refresh data, and preserve state across launches.

How do I implement a state machine for iOS app navigation flows?

Implement an iOS navigation state machine by defining explicit app states such as loading, unauthenticated, onboarding, authenticated, and error, then routing the RootView switch to display the corresponding flow view for each state.

Does this app composition pattern work across macOS, watchOS, and visionOS?

Yes, this app composition pattern applies across iOS, macOS, watchOS, and visionOS, guiding modularization decisions and multi-window navigation coordination using environment-based dependencies or coordinator strategies for cross-platform state restoration.

How do I handle scenePhase transitions to preserve state and validate user sessions?

Handle scenePhase transitions by monitoring active, inactive, and background phases within your AppStateController to validate user sessions, trigger data refreshes, and preserve state for proper restoration across subsequent app launches.

Why does my iOS app have scattered logic across different navigation flows?

Scattered navigation logic in iOS apps occurs without a single source of truth; enforcing an explicit AppStateController and a centralized RootView switch consolidates state management and modularizes feature boundaries.