How gdsc-konkuk/24-25-proj-seoulmate-client works
Main Components
• Application Layer: Represented by the “SeoulMate/ApplicationSM” directory. This is where iOS-specific resources reside – your AppDelegate, SceneDelegate, resources (storyboards, assets, Info.plist), etc.
• Presentation Layer: Found in “SeoulMate/PresentationSM”. This layer holds various view controllers for different features (e.g., Login, Map, AIChat, MyPage) and likely handles user interface and navigation.
• Domain Layer: Under “SeoulMate/DomainSM”, you have business logic elements such as RepositoryProtocols and use cases (e.g., LoginUseCase). This layer abstracts business rules and orchestrates application interactions.
• Data Layer: Located in “SeoulMate/DataSM”. It breaks down further into:
• Data Storage (DataStorageSM) with protocols and an implementation using Keychain for token storage.
• External Services (ExternalServicesSM), which currently includes a GoogleAuthService.
• Network (NetworkSM): Providing the network abstraction via service and utilities (HTTP methods, error handling).
• Repository Implementation (RepositorySM): Contains classes like AuthRepository that likely bridge Domain actions to the Data/services.
Relationships and Interactions
• The Application Layer initiates the UI load (via AppDelegate and SceneDelegate).
• The Presentation Layer (UI/Controllers) interacts with the Domain Layer to invoke use cases (for example, LoginUseCase when handling user login).
• The Domain Layer uses protocols defined in DomainSM (like the AuthRepositoryProtocol) to interact with the Data Layer.
• The Data Layer implements these protocols (e.g., AuthRepository) and manages interactions with lower-level services:
• It uses NetworkSM to communicate with the backend.
• It uses DataStorageSM for secure persistence (i.e., KeychainTokenStorage).
• It leverages ExternalServicesSM as needed for integrated functionalities such as Google authentication.
Architectural Patterns and Design Principles
• Layered (Clean) Architecture: Each layer (Presentation, Domain, Data) has clearly defined responsibilities. The Domain layer acts as the central point that the UI layer depends on, while the Data layer is used by the Domain for external interactions.
• Dependency Inversion: Interfaces or protocols such as those in DomainSM ensure that higher-level modules do not directly depend on lower-level details, but on abstractions.
• Separation of Concerns: UI components are separated from business logic and service integrations.
Relevant Technologies and Frameworks
• Swift and Xcode (with the Xcode project files and storyboards) for the iOS client.
• iOS-related frameworks for UI, resources, and application lifecycle management.
• External libraries or services (e.g., GoogleAuthService) which integrate third-party authentication.
Essential Elements to be Included
• Component labels: Each major block should have text labels (e.g., “Presentation – Login Module”, “Domain – LoginUseCase”, “Data – AuthRepository”).