MyApp
│
├── Core
│ ├── Entities
│ │ └── Item.swift
│ ├── UseCases
│ │ └── GetItemsUseCase.swift
│ └── Repositories
│ └── ItemRepository.swift
│
├── Data
│ ├── Network
│ │ └── NetworkManager.swift
│ ├── Persistence
│ │ ├── CoreDataManager.swift
│ │ └── ItemPersistence.swift
│ └── DataRepositories
│ └── ItemRepositoryImpl.swift
│
├── Presentation
│ ├── Views
│ │ └── HomeView.swift
│ ├── ViewModels
│ │ └── HomeViewModel.swift
│ └── Composables
│ └── ItemRow.swift
│
├── Resources
│ ├── Assets
│ └── Localizations
│
└── App
├── AppDelegate.swift
├── SceneDelegate.swift
└── MyApp.swift
This project follows Clean Architecture principles, divided into three main layers:
Contains business logic and domain entities
- Entities: Business models
- UseCases: Business logic operations
- Repositories: Interfaces for data operations
Implements data access and storage
- Network: API communication
- Persistence: Local storage (CoreData)
- DataRepositories: Implementation of Core repositories
Handles UI and user interaction
- Views: SwiftUI views
- ViewModels: Presentation logic and state management
- Composables: Reusable UI components
- Separation of Concerns: Each layer has a specific responsibility
- Testability: Business logic can be tested independently of UI or external dependencies
- Maintainability: Easier to update or replace components without affecting the entire application
- Scalability: New features can be added without modifying existing code
- SwiftUI for UI
- Combine for reactive programming
- CoreData for local persistence
- Clone the repository
- Open
MyApp.xcodeproj
- Build and run the project
MIT