denissimon/iOS-MVVM-Clean-Architecture
57.5
Adequate · 21 September 2026
3.9k
lines of production code
Swift
primary language
4
measurements over time
What this system is
This system is an image search application that allows users to search for images and retrieve hot tags using the Flickr API. It implements a Clean Architecture with distinct UI, domain, and data layers, supporting both UIKit and SwiftUI interfaces. The application features local caching of search results via SQLite and manages navigation through a coordinator pattern.
How it got here
2020–2023 — Clean Architecture and Swift Concurrency migration
7 changes.
The project underwent a comprehensive architectural refactoring to adopt Clean Architecture, separating UI, domain, and data layers while introducing Swift Concurrency for asynchronous operations. This period also established robust project configuration, including Xcode workspace and scheme setups, alongside the implementation of a FlowCoordinator for navigation management.
2024 — architecture modernization and feature expansion
20 changes.
The codebase underwent a significant architectural shift to support both UIKit and SwiftUI, introducing a modern async/await network layer and a new SQLite-based persistence system. This period also expanded functionality with Flickr API integration, domain use cases, and comprehensive unit testing for the new components.
Features
Added Flickr API integration for image search and hot tags
Users can now search for images and retrieve hot tags via the Flickr API. The new FlickrAPI class defines endpoints for searching images and fetching hot tags, utilizing configuration values for the base URL, API key, and request parameters.
ImageSearch/Data/APIs · high confidence
Added SQLite-based image persistence layer
Introduced a new SQLite-backed storage mechanism for images, defined by the ImageDBInteractor protocol and its SQLiteImageDBInteractor implementation. This adds the ability to save, retrieve, check, and delete cached images in the local database, supporting structured image caching for search results.
ImageSearch/Data/Persistence/DBInteractor · high confidence
Added Xcode workspace and scheme configuration files
The diff shows the addition of new files that configure the Xcode workspace structure, including the main workspace data file, workspace check settings, breakpoint configurations, and scheme management settings. These changes establish the foundational project structure for the ImageSearch application in Xcode, ensuring proper workspace organization and build scheme definitions for developers.
ImageSearch.xcodeproj/project.xcworkspace · high confidence
Added custom error handling for image search domain
A new CustomError enum has been introduced in the ImageSearch domain to provide structured error handling for application, server, internet connection, and unexpected errors. This allows the app to present localized user-friendly messages and recovery suggestions for different error scenarios, improving the user experience when errors occur during image search operations.
ImageSearch/Domain/Exception · high confidence
Added domain use cases for image search, hot tags, and large image retrieval
Introduced three new domain use cases in the ImageSearch module: SearchImagesUseCase for querying images and generating thumbnails, GetHotTagsUseCase for retrieving popular tags, and GetBigImageUseCase for fetching high-resolution image data. Each use case implements a specific protocol and interacts with corresponding repositories (ImageRepository, TagRepository) to handle their respective business logic.
ImageSearch/Domain/UseCases · high confidence
Added image caching service for search results
Introduced a new ImageCachingService that asynchronously caches image search results. The service manages a cache of processed images, allowing the app to retrieve previously cached images for a given search ID. It also provides a mechanism to subscribe to cache updates, ensuring that the UI can react to new cached data. The implementation includes logic to handle concurrent tasks for processing and caching, with safeguards to prevent redundant caching operations.
ImageSearch/Domain/Services · high confidence
Added utility classes and extensions for image handling, string encoding, and event/observable patterns
The codebase now includes new utility files in the Common/Utils directory. Extensions.swift adds string encoding/decoding helpers, array-to-UIImage conversion, and window/keyboard state checks. Supportive.swift introduces a DeepCopier for safe object copying and an ImageWrapper class for serializing/deserializing UIImages. SwiftEvents.swift provides a generic Event and Observable pattern with subscription, notification, and thread-safe variants, enabling decoupled communication between components.
ImageSearch/Common/Utils · high confidence
Adds app icon, launch screen, and localization resources
The app now includes a complete set of App Icon assets for iPhone and iPad across all required sizes and scales, a LaunchScreen storyboard to define the initial view controller, and Localizable.strings files for English and Spanish to support internationalization of UI text such as search queries, error messages, and navigation labels.
ImageSearch/Resources · high confidence
Introduced FlowCoordinator protocol and AppCoordinator implementation
Added a new FlowCoordinator protocol and AppCoordinator class to manage application navigation flow. The AppCoordinator initializes with a DIContainer and starts the main coordinator, enabling a structured approach to navigation within the ImageSearch module.
ImageSearch/Coordinator · medium confidence
Introduced new SQLite persistence layer
Added new files (SQLTable.swift and SQLite.swift) that implement a SQLite database wrapper. This introduces a new mechanism for storing and retrieving image search data locally using SQLite, including support for various SQL data types, transaction management, and row operations.
ImageSearch/Data/Persistence/SQLite · high confidence
NetworkService introduces async/await API and upload task support
The NetworkService now provides an async/await-based API for network requests, including support for upload tasks (POST/PUT with httpBody) alongside standard data tasks. The service also exposes a callback-based API alongside the new async methods, and the error model (NetworkError) now includes HTTP status codes and response data for better debugging.
ImageSearch/Data/Network/NetworkService · medium confidence
New network request utilities and abstractions
Added a new set of network utility files to the ImageSearch project, introducing a structured approach to HTTP requests. This includes an HTTPMethod enum supporting standard and extended methods, an HTTPParams struct for configuring request details, and an Endpoint class to define request targets. The suite also provides a RequestFactory to construct URLRequest objects from endpoints, and an EncodeDecode utility for handling JSON encoding and decoding of request and response data.
ImageSearch/Data/Network/Utils · medium confidence
Architecture
Added Xcode project scheme and test bundle configuration
The change introduces the Xcode project scheme file (ImageSearch.xcscheme), which configures the build, test, launch, profile, analyze, and archive actions for the ImageSearch app and its corresponding test bundle (ImageSearchTests.xctest). Additionally, the Info.plist for the ImageSearchTests target was added, defining standard bundle identifiers and versioning metadata required for the test bundle to function correctly within the Xcode project structure.
ImageSearch.xcodeproj/xcshareddata, ImageSearchTests · high confidence
App architecture restructured into Clean Architecture with Swift Concurrency support
The ImageSearch project has been refactored to follow a Clean Architecture pattern, separating the UI, Domain, and Data layers. This includes the addition of coordinators (renamed to FlowCoordinator), use cases, and repositories. The codebase now utilizes Swift Concurrency (async/await) for network and data operations. Additionally, a local caching and SQLite-based database layer has been introduced for image storage, and unit tests have been added for viewmodels, use cases, and network services.
ImageSearch.xcodeproj · high confidence
Behavioural changes
Introduce async/await APIInteractor protocol and URLSession implementation
The network layer now uses an \APIInteractor\ protocol with \async\/\throws\ methods for requests and file fetching, replacing previous synchronous or callback-based patterns. The \URLSessionAPIInteractor\ implements this protocol, delegating to a \NetworkService\ adapter and mapping errors to a \CustomError\ enum for improved error handling.
ImageSearch/Data/Network/APIInteractor · medium confidence
Introduced AppConfiguration and scene-based app lifecycle management
Added AppConfiguration to centralize app settings such as the Flickr API base URL, API key, image collection layout parameters, memory safety flags, and SQLite database paths. Replaced the previous AppDelegate with a standard implementation and added SceneDelegate to manage the app's main window and initialize the AppCoordinator via dependency injection.
ImageSearch/Common · high confidence
Introduced ImageBehavior to encapsulate image processing logic
A new ImageBehavior class has been added to the ImageSearch domain to handle image-related operations. This includes generating Flickr image URLs and updating image wrappers for different sizes, centralizing this logic outside of the Image entity itself.
ImageSearch/Domain/Entities/Behaviors · medium confidence
Introduced domain entities for image search and tagging
Added new domain entities to the ImageSearch module, including Image, ImageQuery, ImageSearchResults, Tag, and Tags. The Image class now supports deep copying and conforms to Equatable, while ImageQuery encapsulates search query validation. These changes establish a clearer domain model for handling image search results and associated metadata.
ImageSearch/Domain/Entities · medium confidence
Introduced new repository implementations for image and tag data access
Added DefaultImageRepository and DefaultTagRepository classes that implement the ImageRepository and TagRepository protocols respectively. These new repository classes handle data fetching from the API and database interactions using async/await patterns, improving error handling and access control within the data layer.
ImageSearch/Data/Repositories · high confidence
New repository protocols for image and tag data access
The application now defines explicit protocols for data access, introducing ImageRepository and TagRepository interfaces. ImageRepository specifies methods for searching images, retrieving image data, and managing cached images, while TagRepository defines a method for retrieving hot tags. These changes establish the domain layer's contract for interacting with data sources, supporting improved error handling through the use of Result types and a CustomError enum.
ImageSearch/Domain/Interfaces · high confidence
Redesigned Hot Tags and Image Details modules with separate UIKit and SwiftUI implementations
The Hot Tags feature now offers two distinct user interface implementations: a native UIKit-based view (HotTagsViewController) and a new SwiftUI-based view (HotTagsView), allowing users to interact with hot tags via either platform. Additionally, the Image Details module has been refactored to use a dedicated storyboard and view controller, improving the presentation of individual image details. These changes restructure the presentation layer to support both UIKit and SwiftUI paradigms for these specific features.
ImageSearch/Presentation · high confidence
Refactored dependency injection and introduced SwiftUI support for HotTags
The DIContainer was restructured to centralize object creation, introducing new use cases for retrieving large images and hot tags, and adding a GetBigImageUseCase. Additionally, the HotTags module was refactored to support both UIKit and SwiftUI, with the current implementation using a SwiftUI view wrapped for UIKit compatibility.
ImageSearch/Coordinator/DIContainer · medium confidence
Updated app configuration and layout structure
The ImageSearch app's configuration has been updated to support multiple scenes and includes specific permissions for photo library access. Additionally, the project structure has been refactored to use multiple storyboards, and the storyboard layout has been optimized.
ImageSearch · medium confidence
Test coverage
Added unit tests for Flickr API, Network Service, and SQLite storage; Added unit tests for ImageBehavior; Added unit tests for ImageSearch ViewModels; Added unit tests for image search and caching use cases.
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 52 → 58 (+5.1)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 96 → 95 (-0.7)
- Architecture 100 → 84 (-16.5)
- Maturity 63 → 65 (+2.1)
- Readiness 24 → 35 (+11.1)
- Security 100 → 100 (+0.0)
Resolved (8)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — no supported dependency manifest was read
- Further orphaned files (smaller)
- No exposed public API
- Orphaned knowledge (ImageSearch/Resources/Toast.swift)
- Test reliability not included
- complexity unreadable for .swift — churn × complexity hotspots could not be measured
- single-maintainer — knowledge-concentration (bus factor) risk
New (27)
- Change coupling: HotTagsViewController.swift ↔ ImageDetailsViewController.swift (ImageSearch/Presentation/ImagesFeature/HotTags/View/UIKit/HotTagsViewController.swift)
- Change-coupling hub: ImageSearchViewController.swift → HotTagsViewController.swift, ImageDetailsViewController.swift, DefaultImageSearchViewModel.swift (ImageSearch/Presentation/ImagesFeature/ImageSearch/View/ImageSearchViewController.swift)
- DefaultImageCachingService.processData (cognitive 16) (ImageSearch/Domain/Services/ImageCachingService.swift)
- DefaultSearchImagesUseCase.execute (cognitive 18) (ImageSearch/Domain/UseCases/SearchImagesUseCase.swift)
- Documentation: no installation or build instructions (README.md)
- Documentation: no licence statement (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (11 lines × 2) (ImageSearch/Data/Persistence/SQLite/SQLite.swift)
- Duplicated block (12 lines × 2) (ImageSearch/Data/Network/NetworkService/NetworkService.swift)
- Duplicated block (12 lines × 2) (ImageSearch/Domain/Exception/CustomError.swift)
- Duplicated block (14 lines × 2) (ImageSearch/Data/Network/NetworkService/NetworkService.swift)
- Duplicated block (19 lines × 2) (ImageSearch/Data/Network/NetworkService/NetworkService.swift)
- Duplicated block (33 lines × 2) (ImageSearch/Data/Network/NetworkService/NetworkService.swift)
- Duplicated block (6 lines × 2) (ImageSearch/Data/Network/NetworkService/NetworkService.swift)
- Duplicated block (6 lines × 2) (ImageSearch/Data/Persistence/SQLite/SQLite.swift)
- Duplicated block (8 lines × 2) (ImageSearch/Presentation/ImagesFeature/HotTags/View/UIKit/HotTagsViewController.swift)
- Duplicated block (9 lines × 3) (ImageSearch/Data/Persistence/SQLite/SQLite.swift)
- Low cohesion: ImageSearchViewController (LCOM4 6) (ImageSearch/Presentation/ImagesFeature/ImageSearch/View/ImageSearchViewController.swift)
- NetworkService.request (cognitive 19) (ImageSearch/Data/Network/NetworkService/NetworkService.swift)
- No ADRs found
- …and 7 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
denissimon/iOS-MVVM-Clean-Architecture 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 ca5e270faa0ad0ede0ba4950c81f866e42526179 — 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-b84573e22831.