Skip to content
CAI
Software that uses CAICheck a score

cjnevin/IdealCleanArchitecture

53.8

Adequate · 9 November 2026

1.3k

lines of production code

Swift

primary language

7

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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 53 → 54 (+1.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 72 → 72 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 61 → 65 (+4.1)
  • Readiness 34 → 34 (+0.0)
  • Security 99 → 97 (-1.3)
  • Performance 100 → 100 (+0.0)

Resolved (5)

  • Ambiguous ownership of data fetching. UserInteractor has a 'fetchUser' method, but DelayedUserService also has a 'fetch' method. It is unclear if the Interactor delegates to the Service or if they are redundant. Given the Interactor pattern, the Interactor should likely not expose 'fetchUser' directly if the Service is the data source, or the Service should not be directly accessible if the Interactor is the sole entry point.
  • Documentation: no installation or build instructions (README.md)
  • Inconsistent UI update pattern. LoginViewController has a specific 'clearPassword()' method, whereas other ViewControllers (Settings, User) use a generic 'configure(with: ViewModel)' pattern. This suggests 'clearPassword' is a manual imperative call rather than a declarative state update via ViewModel, breaking the MVVM consistency.
  • Inconsistent naming for lifecycle initialization. LoginPresenter uses 'prepare()' while UserPresenter also uses 'prepare()', but HomePresenter and SettingsPresenter do not have a 'prepare()' method, relying instead on the constructor or implicit initialization. This creates an inconsistent pattern for view controller/presenter setup across the module.
  • Presenter exposes imperative UI-state mutation methods (setEmail, setPassword, submit, logout) that duplicate the intent of the Interactor's API. The Interactor already has setEmail, setPassword, submit, and logout. The Presenter should typically only expose a view model or handle view lifecycle events, not act as a proxy for the interactor's business logic commands.

New (1)

  • High interface indirection

Written by cca.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 9 November 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.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.