Skip to content

생성한 단어들을 AI를 이용하여 문장을 만들어줌으로써 효과적으로 암기하는 앱

Notifications You must be signed in to change notification settings

gustn3965/AIWordMemory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordMemory 프로젝트 구조 다이어그램

앱 다운로드: App Store에서 다운로드

📁 프로젝트 개요

WordMemory는 Tuist를 사용한 모듈화된 iOS 앱 프로젝트입니다. Clean Architecture와 Dependency Injection 패턴을 따르고 있습니다.

📝 주요 아키텍처 패턴

  1. Clean Architecture: Feature, Service, Entity 레이어 분리
  2. Dependency Injection: WordMemoryDIContainer를 통한 의존성 주입
  3. Protocol-Oriented Programming: Interface와 Implementation 분리
  4. Modular Architecture: 각 기능을 독립 모듈로 구성
  5. MVVM Pattern: View와 ViewModel 분리
  6. Tuist: 코드 기반 프로젝트 생성 및 관리

🏗️ 전체 아키텍처

기본 구조

┌─────────────────────────────────────────────────────────────┐
│                      WordMemory App                          │
│                    (메인 애플리케이션)                        │
└──────────────────────┬──────────────────────────────────────┘
                       │
                       ▼
        ┌──────────────────────────────┐
        │   WordMemoryDIContainer       │
        │   (의존성 주입 컨테이너)        │
        └──────────────┬───────────────┘
                       │
        ┌──────────────┴───────────────┐
        │                              │
        ▼                              ▼
┌──────────────────────┐    ┌──────────────────────┐
│ Feature Modules      │    │ Service Modules      │
│   (UI 레이어)         │    │  (비즈니스 로직)      │
│                      │    │                      │
│ • MainHome           │    │ • AIService          │
│ • Search             │    │ • DBService          │
│ • Review             │    │ • SpeechVoice        │
│ • Recommend          │    │ • Account            │
│ • Sentence           │    │ • StoreKit           │
│   Inspector          │    │ • Clock              │
│ • Settings           │    │ • Coordinator        │
│ • Sample             │    │                      │
└──────────────────────┘    └──────────────────────┘
        │                              │
        └──────────────┬───────────────┘
                       │
                       ▼
        ┌──────────────────────────────┐
        │      Common Modules           │
        │      (공통 모듈)               │
        │                              │
        │ • CommonUIFeature            │
        │ • AppEntity                  │
        └──────────────────────────────┘

📦 모듈 구조

프로젝트는 4가지 주요 레이어로 구성되어 있습니다:

  1. App Layer - 메인 애플리케이션
  2. Feature Modules - UI 기능 모듈들
  3. Service Modules - 비즈니스 로직 서비스들
  4. Common Modules - 공통 모듈들

1. App Layer (애플리케이션 레이어)

WordMemory/
├── WordMemoryApp.swift          # 앱 진입점 (@main)
├── WordMemoryDIContainer.swift  # DI 컨테이너 (모든 의존성 주입)
├── CloudKitManager.swift        # CloudKit API 키 관리
└── Admob/                       # 광고 모듈
    ├── Banner.swift
    └── Reward.swift

2. Feature Modules (기능 모듈)

각 Feature는 독립적인 모듈로 구성되어 있으며, UI와 ViewModel을 포함합니다.

Features/
├── MainHomeFeature/            # 메인 홈 화면
│   └── MainHome/
│       ├── Sources/            # View, ViewModel
│       └── SampleApp/         # 샘플 앱
│
├── SearchFeature/              # 단어 검색 기능
│   └── Search/
│
├── ReviewFeature/              # 복습 기능
│   └── Review/
│
├── RecommendFeature/           # 단어 추천 기능
│   └── Recommend/
│
├── SentenceInspectorFeature/   # 문장 분석 기능
│   └── SentenceInspector/
│
├── SettingsFeature/            # 설정 화면
│   └── Settings/
│
└── SampleFeature/              # 샘플 기능
    └── Sample/

3. Service Modules (서비스 모듈)

각 Service는 Interface와 Implementation으로 분리되어 있습니다.

Services/
├── AIService/                   # AI 서비스 (ChatGPT)
│   ├── Interface/              # AIInterface 프로토콜
│   └── Implementation/         # ChatGPTManager 구현
│       ├── ChatGPT/
│       │   ├── ChatGPTManager.swift
│       │   └── Model/
│       └── Helper/
│
├── DBService/                  # 데이터베이스 서비스
│   ├── Interface/              # DataBaseProtocol
│   └── Implementation/         # SwiftData 구현
│       └── Model/
│
├── SpeechVoiceService/         # 음성 서비스
│   ├── Interface/              # SpeechVoiceInterface
│   └── Implementation/         # GPT TTS, Apple TTS
│       └── OpenAI/
│
├── AccountService/             # 계정 관리 서비스
│   ├── Interface/
│   └── Implementation/
│
├── StoreKitService/            # 인앱 구매 서비스
│   └── Sources/
│
├── ClockService/               # 시간 관리 서비스
│   └── Implementation/
│
└── AppCoordinatorService/      # 앱 코디네이터 서비스
    └── Implementation/

4. Common Modules (공통 모듈)

Common/
├── CommonUIFeature/            # 공통 UI 컴포넌트
│   └── CommonUI/
│       ├── Sources/            # 재사용 가능한 View 컴포넌트
│       ├── Resources/          # 이미지, 에셋
│       └── SampleApp/          # 샘플 앱
│
└── AppEntity/                  # 공통 엔티티 (도메인 모델)
    └── Sources/                # WordMemory, AccountSetting 등

🔗 상세 아키텍처 다이어그램

전체 레이어 구조

┌─────────────────────────────────────────────────────────────────┐
│                         WordMemory App                           │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │  WordMemoryApp.swift (@main)                              │  │
│  │  └─► WordMemoryDIContainer                                │  │
│  │      ├─► CloudKitManager (API 키 관리)                     │  │
│  │      ├─► Admob (광고)                                       │  │
│  │      └─► 모든 Feature/Service 의존성 주입                   │  │
│  └──────────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────────┘
                              │
        ┌─────────────────────┼─────────────────────┐
        │                     │                     │
        ▼                     ▼                     ▼
┌───────────────┐   ┌───────────────┐   ┌───────────────┐
│ Feature       │   │ Service       │   │ Common        │
│ Modules       │   │ Modules       │   │ Modules       │
│ (UI Layer)    │   │ (Business)    │   │ (Shared)      │
└───────────────┘   └───────────────┘   └───────────────┘

데이터 흐름도

┌─────────────┐
│   User      │
│  Action     │
└──────┬──────┘
       │
       ▼
┌─────────────────────────────────────┐
│   Feature Module (View/ViewModel)   │
│  ┌───────────────────────────────┐  │
│  │ View (SwiftUI)                │  │
│  │   └─► ViewModel               │  │
│  │       └─► DependencyInjection  │  │
│  └───────────────────────────────┘  │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│   WordMemoryDIContainer             │
│  ┌───────────────────────────────┐  │
│  │ 의존성 주입 및 관리             │  │
│  └───────────────────────────────┘  │
└──────┬──────────────────────────────┘
       │
       ├──────────────┬──────────────┬──────────────┐
       │              │              │              │
       ▼              ▼              ▼              ▼
┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐
│ AIService│  │DBService │  │Speech    │  │Account   │
│          │  │          │  │Voice     │  │Service   │
│ ┌──────┐ │  │ ┌──────┐ │  │ ┌──────┐ │  │ ┌──────┐ │
│ │ChatGPT│ │  │ │Swift│ │  │ │GPT   │ │  │ │Account│ │
│ │Manager│ │  │ │Data  │ │  │ │TTS   │ │  │ │Manager│ │
│ └───┬───┘ │  │ └───┬──┘ │  │ │Apple │ │  │ └───┬──┘ │
└─────┼─────┘  └─────┼────┘  │ │TTS   │ │  └─────┼────┘
      │              │       │ └───┬──┘ │        │
      ▼              ▼       └─────┼────┘        │
┌──────────┐  ┌──────────┐        │             │
│OpenAI API│  │Local     │        │             │
│          │  │Storage   │        │             │
└──────────┘  └──────────┘        │             │
                                   │             │
                                   ▼             ▼
                            ┌──────────┐  ┌──────────┐
                            │Audio     │  │DBService │
                            │Playback  │  │(계정 저장) │
                            └──────────┘  └──────────┘

레이어별 의존성 규칙

┌─────────────────────────────────────────────────────────┐
│                    의존성 방향 규칙                       │
└─────────────────────────────────────────────────────────┘

App Layer
    │
    ▼ (의존)
Feature Modules ──► Common Modules
    │                    ▲
    │                    │
    ▼ (의존)             │
Service Modules ─────────┘
    │
    │ (Interface ──► Implementation)
    │
    ▼
External APIs / Storage

About

생성한 단어들을 AI를 이용하여 문장을 만들어줌으로써 효과적으로 암기하는 앱

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages