# team-ampersand/dotori-ios architecture

> Architecture diagram of the GitHub repository team-ampersand/dotori-ios, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/team-ampersand/dotori-ios
- Repository: https://github.com/team-ampersand/dotori-ios

## Overview

##### High-Level Architecture Components

a. Presentation Layer (Features)
- MainTab Feature
- Home Feature
- Auth Features (Signin/Signup)
- Music Feature
- Notice Feature
- Massage Feature
- SelfStudy Feature
- Profile Features

b. Domain Layer
- Auth Domain
- Music Domain
- Notice Domain
- Massage Domain
- SelfStudy Domain
- User Domain
- Violation Domain
- Base Domain

c. Core Layer
- Database
- JwtStore
- KeyValueStore
- Networking
- Timer

d. Shared Infrastructure
- CombineUtility
- ConcurrencyUtil
- DateUtility
- UIKitUtil
- DesignSystem

##### Component Relationships

a. Data Flow
- User interactions → Feature Modules
- Feature Modules → Domain Layer (Use Cases)
- Domain Layer → Core Layer (Repositories)
- Core Layer → External Services (API, Database)

b. Dependencies
- How Features depend on Domain modules
- Domain modules' usage of Core components
- Demonstrate shared utility usage across layers

##### Specific Architectural Patterns

Following patterns:

a. Clean Architecture
- Clear separation between UI, Domain, and Data layers
- Dependency rule (inner layers don't know about outer layers)

b. MVVM + Coordinator
- Store (ViewModel) pattern usage
- Moordinator implementation for navigation

##### Technical Elements

Specific technical components:

a. Framework Integration
- Combine integration points
- Swift Concurrency usage
- Demonstrate Swinject DI container setup

b. Infrastructure
- Tuist build system integration
- Github Actions CI/CD flow

##### Additional Details

- Third-party dependencies
- Resource management (Localization, Assets)
- Testing architecture
- Share Extension integration

##### Testing strategy integration

Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make this project unique, such as the feature-based modularity and the use of custom frameworks like Store and Moordinator.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef feature fill:#2196F3,stroke:#1565C0,color:white
    classDef domain fill:#4CAF50,stroke:#2E7D32,color:white
    classDef core fill:#FFC107,stroke:#FFA000,color:black
    classDef shared fill:#9C27B0,stroke:#7B1FA2,color:white

    %% Legend
    subgraph Legend
        F[Feature Layer]:::feature
        D[Domain Layer]:::domain
        C[Core Layer]:::core
        S[Shared Infrastructure]:::shared
    end

    %% Presentation Layer
    subgraph PresentationLayer[Presentation Layer]
        MainTab["MainTab Feature"]:::feature
        Home["Home Feature"]:::feature
        Auth["Auth Features"]:::feature
        Music["Music Feature"]:::feature
        Notice["Notice Feature"]:::feature
        Massage["Massage Feature"]:::feature
        SelfStudy["SelfStudy Feature"]:::feature
        Profile["Profile Features"]:::feature
    end

    %% Domain Layer
    subgraph DomainLayer[Domain Layer]
        AuthDomain["Auth Domain"]:::domain
        MusicDomain["Music Domain"]:::domain
        NoticeDomain["Notice Domain"]:::domain
        MassageDomain["Massage Domain"]:::domain
        SelfStudyDomain["SelfStudy Domain"]:::domain
        UserDomain["User Domain"]:::domain
        ViolationDomain["Violation Domain"]:::domain
        BaseDomain["Base Domain"]:::domain
    end

    %% Core Layer
    subgraph CoreLayer[Core Layer]
        Database["Database"]:::core
        JwtStore["JwtStore"]:::core
        KeyValueStore["KeyValueStore"]:::core
        Networking["Networking"]:::core
        Timer["Timer"]:::core
    end

    %% Shared Infrastructure
    subgraph SharedInfra[Shared Infrastructure]
        CombineUtil["CombineUtility"]:::shared
        ConcurrencyUtil["ConcurrencyUtil"]:::shared
        DateUtil["DateUtility"]:::shared
        UIKitUtil["UIKitUtil"]:::shared
        DesignSystem["DesignSystem"]:::shared
    end

    %% Relationships
    PresentationLayer --> DomainLayer
    DomainLayer --> CoreLayer
    PresentationLayer --> SharedInfra
    DomainLayer --> SharedInfra
    CoreLayer --> SharedInfra

    %% Click Events
    click MainTab "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Feature/MainTabFeature"
    click Home "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Feature/HomeFeature"
    click Auth "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Feature/SigninFeature"
    click Music "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Feature/MusicFeature"
    click Notice "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Feature/NoticeFeature"
    click Massage "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Feature/MassageFeature"
    click SelfStudy "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Feature/SelfStudyFeature"
    click Profile "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Feature/ProfileImageFeature"
    
    click AuthDomain "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Domain/AuthDomain"
    click MusicDomain "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Domain/MusicDomain"
    click NoticeDomain "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Domain/NoticeDomain"
    click MassageDomain "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Domain/MassageDomain"
    click SelfStudyDomain "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Domain/SelfStudyDomain"
    click UserDomain "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Domain/UserDomain"
    click ViolationDomain "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Domain/ViolationDomain"
    click BaseDomain "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Domain/BaseDomain"
    
    click Database "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Core/Database"
    click JwtStore "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Core/JwtStore"
    click KeyValueStore "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Core/KeyValueStore"
    click Networking "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Core/Networking"
    click Timer "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Core/Timer"
    
    click CombineUtil "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Shared/CombineUtility"
    click ConcurrencyUtil "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Shared/ConcurrencyUtil"
    click DateUtil "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Shared/DateUtility"
    click UIKitUtil "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/Shared/UIKitUtil"
    click DesignSystem "https://github.com/Team-Ampersand/Dotori-iOS/tree/master/Projects/UserInterface/DesignSystem"
```
