tuan188/CleanArchitecture
65.9
Adequate · 21 September 2026
3.3k
lines of production code
Swift
primary language
4
measurements over time
What this system is
This system is an iOS application framework built on Clean Architecture and MVVM patterns, designed to manage user authentication and product listing workflows. It provides a structured approach to data fetching, pagination, and UI state management through reusable components like PagingTableView and ViewModel utilities. The codebase includes comprehensive test coverage and supports both CocoaPods and Swift Package Manager for dependency management.
Features
Add Clean Architecture iOS example app
Introduce the CleanArchitectureExample project, a sample iOS application demonstrating a clean architecture implementation. The update adds the core application structure, including the AppDelegate, scene configuration, and base UI components like the main menu, login screen, and product listing views. It also includes the necessary data gateways, domain entities, and view models to support navigation and data flow within the example.
CleanArchitectureExample · high confidence
Add PagingTableView and PagingCollectionView components
Introduced new UI components for iOS: PagingTableView and PagingCollectionView, which integrate pull-to-refresh and load-more functionality using MJRefresh. These subclasses of UITableView and UICollectionView expose publishers for refresh and load-more triggers, and include auto-refresh headers and footers with configurable activity indicator styles.
PagingTableView · high confidence
Added Xcode workspace configuration for Swift Package Manager
A new Xcode workspace file (contents.xcworkspacedata) has been added to the .swiftpm directory. This change improves the development experience by allowing developers to open the project directly in Xcode, facilitating easier debugging and integration with the Swift Package Manager tooling.
.swiftpm · high confidence
Added login and product retrieval use cases with validation support
The application now includes domain-layer use cases for user authentication (LogIn) and product listing (GetProducts), each exposing a public interface for their respective gateway protocols. To support these features, new validation types (ValidationError and ValidationResult) have been introduced to handle error states and result wrapping. Additionally, a UI test suite (LoginUITests) has been added to verify the login flow, including field interactions and navigation verification.
(repo-wide) · high confidence
Adds MVVM ViewModel protocol and Combine-based data fetching utilities
Introduces a \ViewModel\ protocol for the MVVM architecture, along with supporting utilities for managing Combine subscriptions (\CancelBag\, \ActivityIndicator\, \ErrorTracker\, \GenericSubscriber\) and a \Bindable\ protocol for ViewControllers. It also adds \LoadingState\ and \PagingInfo\ types, and provides \ViewModel\ extensions with \fetchItem\, \fetchList\, and \fetchPage\ methods that handle initial loads, reloads, and pagination with automatic loading state and error tracking.
CleanArchitecture · high confidence
Initial project structure and configuration
The repository was initialized with a complete project structure, including a SwiftLint configuration (.swiftlint.yml) that enforces code style rules for the CleanArchitecture, CleanArchitectureTests, and excluded Carthage/Pods directories. Documentation files (README.md, xcode\_templates.md, xcode\_project\_template.md) were added to explain the Clean Architecture, MVVM, and Combine implementation, as well as instructions for importing Xcode project and file templates. Additionally, the .gitignore file was updated to explicitly track the Pods/ directory and include .DS\_Store.
(repo-wide) · high confidence
Initial project structure for CleanArchitectureExample
The Xcode project configuration (project.pbxproj) and workspace settings have been added, establishing the build environment for the CleanArchitectureExample. This includes the initial set of source files, resources, and framework references (such as CleanArchitecture, PagingTableView, SDWebImage, and others) that define the application's structure and dependencies.
CleanArchitectureExample.xcodeproj · high confidence
Behavioural changes
Migrate to Swift Package Manager and add new UI components
The project has switched its dependency management from CocoaPods to Swift Package Manager, as indicated by the addition of a Package.swift file to the workspace structure. Additionally, the workspace now includes new source files for a PagingTableView component and a set of reusable UI/ViewModel utilities (ActivityIndicator, Bindable, CancelBag, ErrorTracker, GenericSubscriber, LoadingState, PagingInfo, and various ViewModel helpers).
CleanArchitecture.xcworkspace · medium confidence
Test coverage
Added unit tests for application view models and gateways
Added new test files to verify the behavior of the Main, Products, and Repos view models, as well as mock implementations for authentication, product, and repository gateways. The suite includes tests for login flows, menu loading, product list interactions, and repository listing with pagination support.
CleanArchitectureExampleTests · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 50 → 66 (+15.9)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 98 (-2.4)
- Architecture 100 → 90 (-9.6)
- Maturity 41 → 56 (+15.3)
- Readiness 24 → 54 (+29.3)
- Security 100 → 100 (+0.0)
- Domain Modelling 100 → 100 (+0.0)
Resolved (8)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- No exposed public API
- Scanner failed to run — not a clean result
- Test reliability not included
- The Installation section mentions adding the package to your project but does not show how to do it via CocoaPods or Carthage, which are common alternatives for Swift projects. (README.md)
- complexity unreadable for .swift — churn × complexity hotspots could not be measured
- dormant codebase — no living knowledge left to concentrate
New (39)
- Coverage not measured — Swift suite
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicate types with identical signatures and intent. Both types expose identical trigger publishers and footer removal methods.
- Duplicate types with identical signatures and intent. PagingCollectionView and PagingTableView expose the exact same properties and methods, suggesting one is a redundant wrapper or a copy-paste error.
- Duplicated block (10 lines × 2) (CleanArchitecture/Sources/CleanArchitecture/ViewModel+FetchItem.swift)
- Duplicated block (11 lines × 2) (PagingTableView/Sources/PagingTableView/RefreshAutoFooter.swift)
- Duplicated block (14 lines × 2) (CleanArchitectureExample/Scene/RepoCollection/RepoCollectionCell.swift)
- Duplicated block (15–17 lines × 2) (CleanArchitectureExample/Scene/Products/ProductsViewModel.swift)
- Duplicated block (16 lines × 2) (PagingTableView/Sources/PagingTableView/RefreshAutoFooter.swift)
- Duplicated block (18 lines × 2) (CleanArchitecture/Sources/CleanArchitecture/ViewModel+FetchList.swift)
- Duplicated block (5 lines × 2) (CleanArchitectureExample/Data/Gateways/ProductGateway.swift)
- Duplicated block (5 lines × 2) (CleanArchitectureExample/Scene/RepoCollection/RepoCollectionViewController.swift)
- Duplicated block (5 lines × 4) (CleanArchitecture/Sources/CleanArchitecture/ViewModel+FetchPage.swift)
- Duplicated block (59 lines × 2) (PagingTableView/Sources/PagingTableView/PagingCollectionView.swift)
- Duplicated block (6 lines × 2) (CleanArchitectureExample/Scene/Navigators/ShowLogin.swift)
- Duplicated block (7 lines × 2) (CleanArchitectureExample/Scene/RepoCollection/RepoCollectionViewController.swift)
- Duplicated block (7 lines × 3) (CleanArchitecture/Sources/CleanArchitecture/ViewModel+FetchItem.swift)
- Duplicated block (8 lines × 2) (CleanArchitecture/Sources/CleanArchitecture/ViewModel+FetchPage.swift)
- Duplicated block (8 lines × 2) (CleanArchitectureExample/Scene/RepoCollection/RepoCollectionViewController.swift)
- …and 19 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
tuan188/CleanArchitecture was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit dc665237d31e4dcf0f843c141fa18bdc29878039 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.