How captures-2024/soongan_ios works
Project Type and Purpose
• This is a modular iOS application (“순간”) built with Swift, orchestrated via Tuist.
• It uses Swift Package targets for:
• AuthFeature & HomeFeature – each encapsulates feature logic (Composable Architecture reducers) and SwiftUI views
• Shared – common extensions/enums between features
• Soongan (App target) – composes all feature modules into the running app
• Third-party libs: Composable Architecture (state/side-effects), Alamofire (REST client), KakaoSDK (social login).
File-Structure Analysis
• Top-level:
• Soongan/Tuist.swift & mise.toml – Tuist build configuration
• Soongan/Project.swift – root app target definition
• Package modules under Soongan/…:
• DesignSystem/Project.swift
• Feature/AuthFeature/Project.swift
• Feature/HomeFeature/Project.swift
• Shared/Project.swift
• Resource/Project.swift
• Soongan/Soongan – the actual iOS app target with App entry point, views, and tests.
Key Architectural Patterns
• Modular decomposition via Swift packages (Tuist)
• Unidirectional data flow using Composable Architecture (Store → Reducers → Effects → View)
• Dependency injection of network layer (Alamofire + endpoint definitions) and social login (KakaoSDK)
Main Components
• App Shell (SoonganApp)
• Feature Modules
• AuthFeature (LoginView, SignupView, SignupSuccessView + LoginFeature/SignupFeature/…)
• HomeFeature (HomeView, PostPictureView + HomeFeature/PostPictureFeature…)
• Shared Utilities (String & UIApplication extensions, AuthType enum)
• Network Layer (Alamofire wrapper + Endpoint definitions)
• External Services
• Backend REST API
• Kakao Social Login API
Relationships & Data Flow
• SoonganApp instantiates the main Store and injects feature stores into MainTabView
• Feature Views dispatch Actions → passed to Reducers → may invoke Effects
• Effects call Network Layer → Alamofire → Backend API or KakaoSDK → return data → new state → View updates
• All UI elements pulled from DesignSystem & Resource
• Shared provides common enums/extensions imported by multiple modules