앱 다운로드: App Store에서 다운로드
WordMemory는 Tuist를 사용한 모듈화된 iOS 앱 프로젝트입니다. Clean Architecture와 Dependency Injection 패턴을 따르고 있습니다.
- Clean Architecture: Feature, Service, Entity 레이어 분리
- Dependency Injection: WordMemoryDIContainer를 통한 의존성 주입
- Protocol-Oriented Programming: Interface와 Implementation 분리
- Modular Architecture: 각 기능을 독립 모듈로 구성
- MVVM Pattern: View와 ViewModel 분리
- 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가지 주요 레이어로 구성되어 있습니다:
- App Layer - 메인 애플리케이션
- Feature Modules - UI 기능 모듈들
- Service Modules - 비즈니스 로직 서비스들
- Common Modules - 공통 모듈들
WordMemory/
├── WordMemoryApp.swift # 앱 진입점 (@main)
├── WordMemoryDIContainer.swift # DI 컨테이너 (모든 의존성 주입)
├── CloudKitManager.swift # CloudKit API 키 관리
└── Admob/ # 광고 모듈
├── Banner.swift
└── Reward.swift
각 Feature는 독립적인 모듈로 구성되어 있으며, UI와 ViewModel을 포함합니다.
Features/
├── MainHomeFeature/ # 메인 홈 화면
│ └── MainHome/
│ ├── Sources/ # View, ViewModel
│ └── SampleApp/ # 샘플 앱
│
├── SearchFeature/ # 단어 검색 기능
│ └── Search/
│
├── ReviewFeature/ # 복습 기능
│ └── Review/
│
├── RecommendFeature/ # 단어 추천 기능
│ └── Recommend/
│
├── SentenceInspectorFeature/ # 문장 분석 기능
│ └── SentenceInspector/
│
├── SettingsFeature/ # 설정 화면
│ └── Settings/
│
└── SampleFeature/ # 샘플 기능
└── Sample/
각 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/
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