다크 모드
모듈 구성
Tuist 기반 멀티 모듈 구조
truloop iOS는 Tuist를 사용하여 프로젝트 모듈 구조를 관리합니다. Workspace.swift에서 전체 모듈을 정의하고, 각 모듈의 Project.swift에서 개별 설정을 관리합니다.
모듈 의존성 다이어그램
모듈 상세
App 모듈
앱의 진입점이자 최상위 모듈입니다.
| 항목 | 설명 |
|---|---|
| Product | .app |
| Bundle ID | com.butbeautifulco.truloop |
| Deployment Target | iOS 17.2 |
| 주요 역할 | CompositionRoot, MainTabBar, App Lifecycle |
의존성 목록:
- Feature: Home, OnBoard
- Domain, Repository, Cores, Utils
- WrappedThirdParty
- External: Swinject, Pulse, PulseUI, Branch SDK, Localize-Swift, Kakao SDK, StoreKit
Feature 모듈
| 모듈 | 역할 | 주요 외부 의존성 |
|---|---|---|
| Home | 메인 홈 화면, 룹 목록/상세, 채팅 채널, 프로필, 리캡, 알림 등 | Kingfisher, GooglePlaces, PhoneNumberKit, QRCode |
| OnBoard | 온보딩 흐름 (스플래시, 인트로, 전화번호 인증, 프로필 설정, 연락처, 이미지 권한, 푸시 권한 등) | Kingfisher, PhoneNumberKit |
| OnBoardInterface | Feature 간 통신을 위한 Builder 프로토콜 정의 모듈 | — |
정보
OnBoardInterface는 Home과 OnBoard 간의 순환 의존성을 방지하기 위한 인터페이스 모듈입니다. SplashBuildable, IntroBuildable, ContactBuildable, AddPhotosForLoopBuildable, CreateLoopAlbumBuildable, SecretariesBuildable 프로토콜을 정의합니다. Domain, Cores, DesignSystem에 의존합니다.
Home Feature 내부 구조:
Home/Sources/
Assembly/ -- HomeAssembly.swift (DI 등록)
PresentationSources/
HomeViewModel.swift
LoopMainViewModel.swift
LoopDetailViewModel.swift
CreateNewLoopViewModel.swift
CreateAppointmentViewModel.swift
CreateLoopAlbumViewModel.swift
CreateLoopAlbumForShareViewModel.swift
CreateStoryViewModel.swift
AddPhotosForLoopViewModel.swift
LoopInformationModifyViewModel.swift
PosterSelectViewModel.swift
StoryDetailViewModel.swift
ReelsViewModel.swift
Managers/ -- InstagramSharingHelper, LoopSharingManager, LoopCommentManager,
LoopETAActivityHelper, LoopMediaSorter
Model/ -- HomeCardModel, LoopMainModel, AppointmentModel
Protocols/ -- Scrollable 등
UISources/
Home/ -- HomeView, LoopDetail, LoopMain, FriendSearch, Notification, ArrangementList
Channel/ -- ChannelView, ChannelInputView
ChannelList/ -- ChannelListView, DirectMessageTargetSearch
CreateLoop/ -- CreateNewLoopView, CreateLoopAlbumView
CreateAppointment/
Profile/ -- ProfileView, ProfileEdit, Account, Paywall, Secretaries,
AddFriend, BlockedUsers, DeleteAccount, InAppPurchase, DebugLogs
Reels/ -- ReelsViewController (UIKit), ReelsCollectionViewCellOnBoard Feature 내부 구조:
OnBoard/Sources/
Assembly/ -- OnboardAssembly.swift (DI 등록)
Views/
Splash/ -- SplashBuilder, SplashView, SplashViewModel
Intro/ -- IntroBuilder, IntroView
PhoneNumber/ -- PhoneNumberBuilder, PhoneNumberView, PhoneNumberViewModel
VerificationCode/
UserName/
UserID/
ProfileImage/ -- ProfileImageBuilder, ProfileImageView, CameraPicker
Contact/ -- ContactBuilder, ContactView, ContactViewModel
ImagePermission/
PushPermission/
CreateNewLoop/ -- CreateNewLoopBuilder, CreateNewLoopView, CreateNewLoopViewModelDomain 모듈
| 항목 | 설명 |
|---|---|
| Product | .framework |
| 의존성 | Extensions, Swinject, Google Places |
구성:
Entities/: 41개 비즈니스 모델 (User, Loop, Channel, Mission, Story, Secretary, AppointmentDetail 등)Repository/: 10개의 Repository 프로토콜 (Auth, Home, Contact, Friend, Channel, ChannelList, Notification, Device, Purchase, LiveActivityToken)UseCase/: AccountUseCase, HomeUseCase, SecretaryUseCase, MissionManager, ContactManager, FCMManager, LiveActivityTokenManager, FetchPlaceUseCase, LoopShareUseCase, RootSceneRouteUseCase, ChatConfigUseCase, GooglePlaceConfigUseCase 등UseCase/AppScheme/: 앱 내부 URL Scheme 처리 관련 로직
Repository 모듈
| 항목 | 설명 |
|---|---|
| Product | .framework |
| 의존성 | Domain, Networking, WrappedThirdParty, Swinject, SendbirdChatSDK, RevenueCat, Google Places |
구성:
DataSource/: Repository 프로토콜 구현 (16개의 DataSource 파일)Requests/: 24개의 Request DTOResponses/: 46개의 Response DTO
Networking 모듈
| 항목 | 설명 |
|---|---|
| Product | .framework |
| 의존성 | Utils, Cores, Swinject, Moya |
API Target, 네트워크 추상화, 인증 인터셉터를 제공합니다. 자세한 내용은 네트워크 레이어 문서를 참조하세요.
DesignSystem 모듈
| 항목 | 설명 |
|---|---|
| Product | .framework |
| 의존성 | Utils, Lottie |
구성:
Color/: FoundationColor, SemanticColor, Color+ext, UIColor+extImage/: Image+extViews/: 공통 UI 컴포넌트TruloopPopup,ToastView,PinCodeView,SearchBar,StrokeTextProgressLottieView,DateTimePickerView,SearchableTimeZonePickerBaseNavigationController,FlowLayout,RoundedCornersTruloopTextField/:TruloopTextField,TruloopTextFieldState,TruloopTextFieldStyleModifiers/: SwiftUI ViewModifier (PullToRefresh, DismissKeyboard, ScrollOffset, LiquidGlassStyle, HeaderScroll, PHAssetPicker, LongPressGestureWithHaptic 등)
Cores 모듈
| 항목 | 설명 |
|---|---|
| Product | .framework |
| 의존성 | Localize-Swift, Segment Analytics |
구성:
Constants.swift: 앱 전역 상수 (서버 URL 등)AppLog.swift: 로깅 유틸리티AppTracker.swift: Analytics 트래킹ActiveChatManager.swift: 채팅 상태 관리ComponentBuilder.swift: 공통 Builder 프로토콜
Utils 모듈
| 항목 | 설명 |
|---|---|
| Product | .framework |
| 서브 모듈 | Extensions, DateUtil |
Extensions 서브 모듈 (의존성: Swinject, Kingfisher):
- Swift/UIKit/SwiftUI 확장:
String+ext,Date+ext,UIImage+ext,Collection+ext,URL+ext,UIApplication+ext,UIDevice+ext,AttributedString+ext,SwiftUIExtension,NotificationCenter+ext KFImage+ext: Kingfisher 이미지 뷰 확장KeychainStore/KeychainAESKeyStore: 보안 저장소Resolver+ext: Swinject Resolver 편의 확장OrientationManager: 화면 방향 관리Synchronized: 스레드 안전 유틸리티LoopETAActivityUpdatePayload: Live Activity 데이터 모델ExtensionsAssembly: DI 등록
DateUtil 서브 모듈:
DateUtil.swift: 날짜 유틸리티DateFormatUtil.swift: 날짜 포맷 유틸리티
WrappedThirdParty 모듈
| 항목 | 설명 |
|---|---|
| Product | .framework |
| 의존성 | FirebaseCore, FirebaseAnalytics, FirebaseCrashlytics, FirebaseMessaging |
Firebase SDK를 하나의 모듈로 래핑하여 다른 모듈에서 직접 Firebase에 의존하지 않도록 격리합니다. 내부적으로 @_exported import를 통해 Firebase 모듈을 re-export합니다.
Shared 모듈
주의
Shared 모듈은 디렉토리가 존재하지만 소스 코드가 없으며, Workspace.swift에도 포함되어 있지 않습니다. 현재 사용되지 않는 빈 모듈입니다.
App Extensions
| Extension | 역할 | 의존성 |
|---|---|---|
| TruloopShare | 사진 공유 Extension (최대 39장 이미지, 동영상 제외) | Utils, Networking, Domain, Repository, Home, Swinject |
| TruloopLiveActivityExtension | Live Activity Widget (WidgetKit) | SwiftUI, WidgetKit, Utils, Domain, DesignSystem, Localize-Swift |
| TruloopNotificationService | 푸시 알림 가공 Extension | UserNotifications, Intents |
정보
모든 App Extension은 App/Project.swift에서 정의되며 별도의 Project.swift를 갖지 않습니다. 소스 코드는 각각의 최상위 디렉토리(TruloopShare/, TruloopLiveActivityExtension/, TruloopNotificationService/)에 위치합니다.
변경 이력
| 날짜 | 변경 내용 |
|---|---|
| 2026-03-10 | 소스 코드 기반 검증: 의존성 다이어그램에 OnBoardInterface 의존성 추가, OnBoard Feature 내부 구조 추가, Domain UseCase/Entity 목록 갱신, Response DTO 수 보정(47→46), DesignSystem/Extensions 구성 요소 보완, Shared 모듈 미사용 상태 명시, App Extension 설명 보강 |