Skip to content
CAI
Software that uses CAICheck a score

cjnevin/IdealCleanArchitecture

68.6

Adequate · 21 September 2026

1.3k

lines of production code

Swift

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This is an iOS application structured around a modular, clean architecture that separates concerns into Domain, Infrastructure, Presentation, and UI layers. It implements core user flows for Home, Login, Settings, and User profiles, with specific support for dual app themes and simulated asynchronous delays in data operations. The system utilizes Swift Package Manager for dependency management and includes a modular routing system to handle navigation and screen transitions.

Features

Added Xcode workspace configuration for Swift Package Manager

A new file, contents.xcworkspacedata, has been added to the .swiftpm/xcode/package.xcworkspace/ directory. This XML-based configuration file defines an Xcode workspace that references the package itself, facilitating local development and integration with Xcode.

.swiftpm · high confidence

Added iOS launch screen storyboard

A new LaunchScreen.storyboard file was added to the Base.lproj directory, defining the app's initial launch screen interface for iOS. This storyboard file configures the initial view controller and scene for the application's startup sequence.

Base.lproj · high confidence

Added support for building and running two distinct app themes

The Xcode project has been restructured to support two separate build schemes, ThemeA and ThemeB. This allows developers to build, run, and test each theme variant independently within the IDE, reflecting the split of the application into distinct UI and infrastructure modules for each theme.

App.xcodeproj · high confidence

Introduce modular routing and transition system

The application's navigation logic has been restructured into a modular routing system. New files in the Routing directory define specific routes for Home, Login, Logout, Settings, and User screens, each handling the instantiation of their respective view controllers and presenters. A new DefaultRouter class and associated protocols (Router, Routable, Deeplinkable) manage view controller presentation and dismissal. Additionally, a suite of transition classes (EmptyTransition, ModalTransition, PushTransition, TabTransition) has been added to handle different types of screen transitions, including modals, pushes, and tab bar interactions.

Routing · high confidence

Introduced domain-layer interfaces and interactor implementations for Home, Login, Settings, and User modules

Added Swift protocol and class definitions for the domain layer, including interactor implementations for Home, Login, Settings, and User features. The Login interactor now handles email/password submission, form validation, and user session management, while the User interactor provides a fetch method for retrieving user data. These changes establish the core business logic and dependency injection points for these modules.

Modules/Domain · high confidence

Introduced presentation layer for Home, Login, Settings, and User modules

Added new presentation components for Home, Login, Settings, and User features, each consisting of a presenter and a view protocol. The Login presenter now handles email and password submission, form validation, and navigation to the User screen. The Settings presenter manages toggling between Home and Login states. The User presenter fetches and displays user details, while the Home presenter provides a basic structure. Additionally, tests were added for the User presenter to verify loading states and navigation.

Modules/Presentation · high confidence

New UI modules for Home, Login, Settings, and User profiles

The Modules/UI area now includes fully implemented view controllers and their associated styling for the Home, Login, Settings, and User screens. This introduces the visual layer for these core features, including a dark-themed alternative for the Login screen (LoginB), a toggleable home view in Settings, and a user profile display. Shared UI components, such as a loading overlay and lazy property wrappers, support these new screens.

Modules/UI · high confidence

Architecture

Introduced modular clean architecture with dependency injection and tab-based navigation

The application now uses a modular clean architecture where features are split into separate modules for Domain, Infrastructure, Presentation, and UI, with the App layer handling all wiring and dependency injection. The app initializes a TabRouter to manage tab-based navigation, and the AppDelegate sets up the dependency container with delayed login and user services. This structural change enforces clear boundaries between layers and improves testability through protocol-based dependencies.

(repo-wide) · high confidence

Behavioural changes

Modularize infrastructure layer into Login and User modules

The infrastructure layer has been split into distinct modules for Login and User functionality. This introduces DelayedLoginService and DelayedUserService, each implementing their respective domain interfaces with simulated asynchronous delays. Users will experience a consistent, albeit artificial, latency in login and user data operations, which may affect perceived performance during these specific flows.

Modules/Infrastructure · medium confidence

Test coverage

Added unit tests for domain models and interactors

Added unit tests for the LoginInteractor, LoginRequest, and User domain components. The new tests verify form validation logic, submission states, and property constraints (e.g., name length limits, age caps), ensuring the domain layer behaves as expected.

Modules/DomainTests · high confidence

Dependencies

Introduced Swift Package Manager structure for modular app architecture

The project now uses Swift Package Manager (SPM) to manage dependencies and define a modular architecture. The new structure separates the application into distinct modules: Domain, Infrastructure (Login, User), Presentation (Home, Login, Settings, User), and UI layers (Home, Login, Settings, User, Shared, LoginB). Key dependencies include DependencyContainer, Assert, AutoLayoutBuilder, PhantomTypes, and PropertyWrappers, enabling a clean separation of concerns and improved testability for each module.

(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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 58 → 69 (+11.1)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (-0.2)
  • Architecture 69 → 69 (+0.0)
  • Maturity 43 → 67 (+24.6)
  • Readiness 57 → 62 (+4.8)
  • Security 92 → 97 (+5.4)

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 README does not mention how to add new modules (Infrastructure, Presentation, UI) or where to place test stubs for newly created features. (README.md)
  • complexity unreadable for .swift — churn × complexity hotspots could not be measured
  • dormant codebase — no living knowledge left to concentrate

New (24)

  • Coverage not measured — Swift suite
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (16 lines × 2) (Modules/UI/Login/LoginViewController.swift)
  • Inconsistent delegation of logout functionality. 'logout' is exposed on both the Presenter (LoginPresenter, UserPresenter) and the Interactor (LoginInteractor). This creates ambiguity about whether the Presenter should trigger the Interactor's logout or if the Interactor is responsible for the entire flow. Having 'logout' on both layers suggests redundant responsibility.
  • Inconsistent lifecycle method naming across presenters. While 'prepare' is a common name, its presence on some presenters and absence on others (e.g., HomePresenter, SettingsPresenter) suggests an inconsistent initialization or setup pattern. HomePresenter and SettingsPresenter rely solely on the constructor for setup, whereas Login and User require an explicit 'prepare' call.
  • Medium: security finding (details withheld)
  • No ADRs found
  • No assertions: testLogout (Modules/Presentation/UserTests/UserPresenterTests.swift)
  • No assertions: testPrepareDoesNotThrowIfInteractorDoesNotThrow (Modules/Presentation/UserTests/UserPresenterTests.swift)
  • No assertions: testPrepareThrowsIfInteractorThrows (Modules/Presentation/UserTests/UserPresenterTests.swift)
  • No dependency advisory monitoring
  • No direct assertions: testLoginRequest (Modules/DomainTests/LoginRequestTests.swift)
  • No direct assertions: testLogout (Modules/DomainTests/LoginInteractorTests.swift)
  • No direct assertions: testPrepare (Modules/DomainTests/LoginInteractorTests.swift)
  • No direct assertions: testSubmissionFailure (Modules/DomainTests/LoginInteractorTests.swift)
  • No direct assertions: testSubmissionSuccess (Modules/DomainTests/LoginInteractorTests.swift)
  • No direct assertions: testUser (Modules/DomainTests/UserTests.swift)
  • No direct assertions: testValidForm (Modules/DomainTests/LoginInteractorTests.swift)
  • Outdated: assert
  • …and 4 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

cjnevin/IdealCleanArchitecture 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 e1297ac7582e460bd0e49f46f1f89b033edd5f8f — 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.