Skip to content

Commit 67798d3

Browse files
committed
refactor: #19 - 앱 내의 구조, 모듈간 역할 분리
1 parent 3e85e6b commit 67798d3

33 files changed

Lines changed: 533 additions & 263 deletions

Projects/App/Sources/Application/AppComponent.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
// Copyright © 2026 NDGL-iOS. All rights reserved.
77
//
88

9+
import Data
10+
import Domain
911
import RIBs
10-
1112
import RootFeature
1213

1314
final class AppComponent: Component<EmptyDependency>, RootDependency {
15+
16+
var tokenProvider: TokenProviding {
17+
shared { TokenRepositoryFactory.makeTokenProvider() }
18+
}
19+
1420
init() {
1521
super.init(dependency: EmptyComponent())
1622
}

Projects/Data/Sources/DI/AuthRepositoryFactory.swift renamed to Projects/Data/Sources/DI/AuthServiceFactory.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// AuthRepositoryFactory.swift
2+
// AuthServiceFactory.swift
33
// Data
44
//
55
// Created by kimnahun on 1/21/26.
@@ -13,7 +13,3 @@ import Networks
1313
public func makeAuthService() -> AuthServiceProtocol {
1414
AuthService()
1515
}
16-
17-
public func makeAuthRepository(authService: AuthServiceProtocol) -> AuthRepositoryProtocol {
18-
AuthRepository(authService: authService)
19-
}

Projects/Data/Sources/DI/FollowRepositoryFactory.swift

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// FollowServiceFactory.swift
3+
// Data
4+
//
5+
// Created by NDGL on 2026-02-06.
6+
// Copyright © 2026 NDGL-iOS. All rights reserved.
7+
//
8+
9+
import Domain
10+
import Foundation
11+
import Networks
12+
13+
public func makeFollowService() -> FollowServiceProtocol {
14+
FollowService()
15+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// TravelServiceFactory.swift
3+
// Data
4+
//
5+
// Created by NDGL on 2026-02-06.
6+
// Copyright © 2026 NDGL-iOS. All rights reserved.
7+
//
8+
9+
import Domain
10+
import Foundation
11+
import Moya
12+
import Networks
13+
14+
public func makeTravelService(tokenProvider: TokenProviding) -> TravelServiceProtocol {
15+
let provider: MoyaProvider<TravelAPI> = NetworkProviderFactory.makeAuthenticatedProvider(
16+
tokenProvider: tokenProvider
17+
)
18+
return TravelService(provider: provider)
19+
}

Projects/Data/Sources/Repository/Auth/AuthRepository.swift

Lines changed: 0 additions & 40 deletions
This file was deleted.

Projects/Data/Sources/Repository/Follow/FollowRepository.swift

Lines changed: 0 additions & 41 deletions
This file was deleted.

Projects/Data/Sources/Transform/Auth/AuthTransform.swift

Lines changed: 0 additions & 27 deletions
This file was deleted.

Projects/Domain/Sources/Interface/Auth/AuthRepositoryProtocol.swift renamed to Projects/Domain/Sources/Interface/Auth/AuthServiceProtocol.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
2-
// AuthRepositoryProtocol.swift
2+
// AuthServiceProtocol.swift
33
// Domain
44
//
5-
// Created by kimnahun on 1/21/26.
5+
// Created by NDGL on 2026-02-06.
66
// Copyright © 2026 NDGL-iOS. All rights reserved.
77
//
88

99
import Foundation
1010

11-
public protocol AuthRepositoryProtocol: Sendable {
11+
public protocol AuthServiceProtocol: Sendable {
1212
func signup(info: SignupInfo) async -> Result<SignupResult, SignupError>
1313
}

Projects/Domain/Sources/Interface/Follow/FollowRepositoryProtocol.swift

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)