name: architecture-overview description: Workspace structure, data flow, and project organization patterns
Overview
This skill explains the project's architecture, including the three-project Tuist workspace structure, data flow patterns (both legacy UIKit and new SwiftUI), and how different components are organized.
When to use
Use this skill when:
- Understanding the overall project structure
- Working with data persistence (Core Data vs SwiftData)
- Navigating between UIKit and SwiftUI code
- Understanding how Excel content flows into the app
- Working with managers and controllers
Instructions
Workspace Structure
Three Tuist projects for clean dependency management:
- App: Main application (business logic & UI)
- Widget extension: AlarmKit Live Activities (iOS 26.0+)
- ThirdParty: Static framework (RxSwift, KakaoSDK, CoreXLSX)
- DynamicThirdParty: Dynamic framework (Firebase)
Data Flow (Legacy UIKit)
Excel → Core Data → ViewModels → ViewControllers
- Content: Excel files (CoreXLSX) →
RNExcelController→ versioned updates - Persistence:
RNModelController(Core Data wrapper with extensions per entity type)- Call
RNModelController.shared.waitInit()before first use - Extension-based organization:
+RNSubjectInfo,+RNPartInfo,+RNChapterInfo,+RNAlarmInfo,+RNFavoriteInfo
- Call
- Managers:
GADRewardManager,RNAlarmManager,ReviewManager - Presentation: Mix of MVVM and MVC patterns, RxSwift/RxCocoa for reactive bindings
SwiftUI Migration (In Progress)
Hybrid approach migrating from UIKit to SwiftUI.
Migration Flow
Core Data → SwiftData (one-time on first launch):
ExcelSyncServicesyncs Excel → SwiftDataDataMigrationManagermigrates favorites/alarms- Tracked via
LSDefaults.dataMigrationCompleted
SwiftData Models (Projects/App/Sources/Models/)
- Subject → Chapter → Part (cascade relationships)
- Favorite (references Part), Alarm (references Subject)
- Property mapping: SwiftData uses
id, Core Data usesno
Key Patterns
UIKit → SwiftUI:
UITabBarController→TabViewUINavigationController→NavigationStack@IBOutlet/@IBAction→@State/@BindingRNModelController.shared→@Query/@Environment(\.modelContext)UISearchBar→ CustomSearchBarcomponent (works inside TabView)