How poppool/ios works
Project Type and Purpose
• This is a native iOS client application (“Poppool”) built in Swift using Xcode 16.2 targeting iOS 16+.
• It follows Clean Architecture and MVVM(+ReactorKit) principles to present pop-up store information and integrate with Instagram.
File-Structure Analysis
• CoreLayer/Infrastructure: Dependency Injection container, extensions, logging, image-loading (memory/disk), secrets, KeyChain & UserDefaults services.
• DataLayer/Data: Network stack (API endpoints, DTOs, interceptors, providers), Service protocols (Auth, Apple/Kakao login, Pre-Signed URLs), Repository implementations.
• DomainLayer/Domain: UseCase interfaces & implementations, Entity definitions, Repository interfaces.
• PresentationLayer/Presentation: UI components (Views, ViewControllers, Reactors), DesignSystem, common Utilities (map clustering, toasts, base controllers).
• Top-level: Poppool/Application (AppDelegate, SceneDelegate), Resources (assets, fonts, strings).
README Insights
• Confirms it’s a mobile client that fetches scattered pop-up store data and offers Instagram-linked features.
• No backend code—relies on RESTful APIs, social-login providers, map services.
Main Components
a. Presentation Layer
• Views & ViewControllers (PresentationLayer/Presentation)
• Reactors (MVVM ViewModels)
b. Domain Layer
• UseCase interfaces & implementations
• Entities & Repository interfaces
c. Data Layer
• RepositoryImpl classes
• Network: Provider, Interceptor, EndPoint, API modules
• Service protocols: AuthServiceable, AppleLoginService, etc.
d. Infrastructure Layer
• DIContainer
• ImageLoader (Memory + Disk)
• Logger
• Secrets management, KeyChainService, UserDefaultService
e. External Services
• Backend REST API endpoints (Auth, Home, Map, PopUp, Comment, User, Admin, SignUp, PreSigned)
• Social-login providers: Apple, Kakao
• SDKs/APIs (AppleMap, TMap, Naver, Kakao)
• Instagram integration
Relationships & Data Flow
• UI (ViewControllers/Reactors) → invokes Domain UseCases → calls Repository interfaces → implemented by DataLayer → uses Network Provider & Services → sends HTTP to External Backend / Third-party APIs → maps JSON to DTOs → converts to Domain Entities → back up the stack to UI.
• DIContainer wires ViewControllers, Reactors, UseCases, Repositories, Services.
• ImageLoader caches images locally (disk & memory), injected wherever needed.
• KeyChainService/UserDefaultService persist tokens, settings.
Architectural Patterns & Principles
• Clean Architecture: strict layer separation (Presentation → Domain → Data → Infrastructure).
• MVVM(+ReactorKit): PresentationLayer uses Reactors/ViewModels for state management.
• Dependency Injection: CoreLayer/Infrastructure/DIContainer provides all dependencies.
• Single Responsibility: each module (e.g., AdminAPI, HomeAPI) encapsulates its own endpoint definitions and DTOs.
• Open/Closed: new API modules can be added without touching existing code.
Technologies & Frameworks
• Swift 5.9, Xcode 16.2, iOS 16+
• ReactorKit (MVVM), RxSwift (reactive extensions)
• URLSession or custom network provider
• AppleMap SDK, Kakao SDK, Naver SDK (via wrappers)
• Instagram SDK (for social integration)
Essential Elements
• Clear component labels (e.g., “HomeAPIRepositoryImpl,” “CommentReactor”).
• Notes on protocols/interfaces vs. implementations.