nalexn/clean-architecture-swiftui
61.0
Adequate · 21 September 2026
2.1k
lines of production code
Swift
primary language
4
measurements over time
What this system is
This is an iOS application built with SwiftUI that displays country information, including details, currencies, and neighbors. It manages local data persistence and caching using SwiftData, while handling system events like deep links and push notifications. The system is structured with a modern architecture featuring dependency injection, async/await interactors, and comprehensive unit testing coverage.
How it got here
2019 — SwiftUI migration and test coverage
11 changes.
The project underwent a significant architectural shift from UIKit to SwiftUI, removing legacy app delegates and modernizing the project structure and resources. This period also introduced async/await-based interactors for data and permissions, alongside a comprehensive suite of unit tests for the repository and UI layers.
2020–2025 — SwiftData migration and feature expansion
6 changes.
The project underwent a significant architectural shift to SwiftData for local persistence, introducing a new dependency injection container and app lifecycle management. This was accompanied by the addition of a country details view with neighbor and currency sections, alongside comprehensive unit testing for utility and handler components.
Features
Introduce country details view with neighbor and currency sections
A new CountryDetails view has been added to the CountriesSwiftUI module, presenting a detailed breakdown of a selected country. The interface displays the country's flag, basic information (code, population, capital), and conditionally renders sections for currencies and neighboring countries. The implementation includes a reusable DetailRow component for consistent data presentation and a modal flag viewer for an enhanced user experience.
CountriesSwiftUI/UI/CountryDetails · high confidence
Introduced local database caching for country data
Added a new local storage layer using SwiftData to cache country information and details. This allows the app to store and retrieve country data locally, improving performance by reducing reliance on network requests for previously fetched information.
CountriesSwiftUI/Repositories · high confidence
New utility classes for state management and loading states
The app introduces new utility classes to manage application state and asynchronous loading states. The \Loadable\ enum and its associated \LoadableSubject\ extension provide a structured way to handle loading, success, and error states for async operations, including automatic cancellation of running requests. A new \Store\ class wraps a \CurrentValueSubject\ to manage reactive state updates with change tracking, while \CancelBag\ and \Helpers\ provide supporting infrastructure for Combine-based cancellation and view inspection. These changes enable more robust handling of background tasks and state synchronization within the SwiftUI views.
CountriesSwiftUI/Utilities · high confidence
Behavioural changes
Introduce async/await-based interactors for country data, image loading, and push notification permissions
The application's interaction layer has been refactored to use Swift's async/await model. A new CountriesInteractor manages country data fetching and persistence, while an ImagesInteractor handles image loading. Additionally, a UserPermissionsInteractor has been added to manage push notification permissions, including status resolution and request handling. These changes replace previous synchronous or callback-based patterns with modern concurrency, improving responsiveness and code clarity for these specific features.
CountriesSwiftUI/Interactors · high confidence
Migrated project structure and added unit test target
The Xcode project file was updated to object version 77, reflecting a modernization of the project structure. A new 'UnitTests' target was added to support unit testing, with dependencies on 'EnvironmentOverrides' and 'ViewInspector' frameworks. The project now uses file system synchronized groups for the main app and test targets, and the build configuration was updated to include these new test targets and their associated framework dependencies.
CountriesSwiftUI.xcodeproj · high confidence
Modernizes app icon and localization resources
The app icon has been updated to the modern universal format with support for dark and tinted appearances, replacing the previous iPhone and iPad specific icons. Additionally, the project has migrated from the legacy .strings format to the modern .xcstrings format for localizable strings, and removed the deprecated LaunchScreen.storyboard and Info.plist files in favor of modern SwiftUI project configurations.
CountriesSwiftUI/Resources · high confidence
Rebuilt app architecture with SwiftData and dependency injection
The app has been refactored to use SwiftData for local persistence, introducing a new \AppEnvironment\ and \DIContainer\ for dependency injection. This change brings a structured app lifecycle with \AppDelegate\ and \SceneDelegate\ handling system events, deep links, and push notifications. The \CountriesList\ view now uses a \Query\-based search that dynamically recreates queries as the search text changes, and the app displays a warning if the local database fails to initialize.
(repo-wide) · high confidence
Refactored root view modifier to manage safe area and state updates
The application's root view handling has been refactored to use a dedicated \RootViewModifier\ that applies \.ignoresSafeArea()\ and subscribes to the \AppState\ for system state updates, while the previous \ContentView\ implementation was removed.
CountriesSwiftUI/UI · medium confidence
Removed UIKit app and scene delegates
The project has removed the legacy UIKit-based AppDelegate and SceneDelegate files. This indicates a shift away from the traditional UIKit app lifecycle in favor of a SwiftUI-centric architecture, simplifying the app's entry point and scene management.
CountriesSwiftUI/System · high confidence
Updated Xcode scheme configuration for the project
The Xcode project scheme file (CountriesSwiftUI.xcscheme) has been updated, configuring build, test, launch, profile, and archive actions for the CountriesSwiftUI app and its UnitTests target. This change ensures the project's build and test configurations are correctly set up for the current development environment.
CountriesSwiftUI.xcodeproj/xcshareddata · high confidence
Test coverage
Added test helper utilities for unit tests; Added unit tests for UI components; Added unit tests for application interactors and mock infrastructure; Added unit tests for deep link and push notification handlers; Added unit tests for repository layer; Added unit tests for utility helpers and Loadable state management.
Dependencies
Add Package.swift for Swift Package Manager support
A new Package.swift file has been added to the project, enabling Swift Package Manager integration for the 'CountriesSwiftUI' library. This configuration specifies minimum platform versions (iOS 18, macOS 12) and declares dependencies on 'EnvironmentOverrides' (v0.0.4) and 'ViewInspector' (v0.10.0).
(dependencies) · medium 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 56 → 61 (+4.5)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 100 → 90 (-9.8)
- Maturity 39 → 53 (+13.9)
- Readiness 41 → 45 (+4.3)
- Security 100 → 100 (+0.0)
- Domain Modelling 100 → 100 (+0.0)
Resolved (6)
- 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
- Test reliability not included
- complexity unreadable for .swift — churn × complexity hotspots could not be measured
- dormant codebase — no living knowledge left to concentrate
New (14)
- Coverage not measured — Swift suite
- Dependency hygiene PARTLY measured — SwiftPM pinning read, dependency currency NOT established
- Documentation: no installation or build instructions (README.md)
- Documentation: no project overview (README.md)
- Documentation: no usage examples (README.md)
- No ADRs found
- No assertions: deepLinkPayload (UnitTests/System/PushNotificationsHandlerTests.swift)
- No assertions: emptyPayload (UnitTests/System/PushNotificationsHandlerTests.swift)
- No assertions: happyPath (UnitTests/Mocks/Interactors/CountriesInteractorTests.swift)
- No assertions: listRefresh (UnitTests/UI/CountriesListTests.swift)
- No assertions: register (UnitTests/Repositories/PushTokenWebRepositoryTests.swift)
- No assertions: requestPush (UnitTests/UI/CountriesListTests.swift)
- No assertions: stubUserPermissionsInteractor (UnitTests/Mocks/Interactors/UserPermissionsInteractorTests.swift)
- No dependency advisory monitoring
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
nalexn/clean-architecture-swiftui 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 9eca97b8cfff96a14084b564b1fefd949c93d232 — 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-cb02f2da8b24.