Skip to content
CAI
Software that uses CAICheck a score

android10/Android-CleanArchitecture

49.0

Weak · 24 September 2026

3.3k

lines of production code

Java

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This is an Android application built on Clean Architecture principles, structured into distinct data, domain, and presentation layers. The system manages user data through a reactive programming model using RxJava, handling asynchronous operations, caching, and background execution. It employs the MVP architectural pattern for the UI and utilizes Dagger2 for dependency injection, with comprehensive unit testing covering the domain and data layers.

How it got here

2014 — Clean Architecture implementation

10 changes.

The project was established with a complete Clean Architecture, introducing distinct presentation, domain, and data layers. This included implementing MVP, reactive streams with RxJava, and dependency injection to structure the codebase.

2015 — RxJava 2 migration and test coverage

4 changes.

The project migrated its domain layer's use cases to RxJava 2, introducing a reactive approach with Observables and Schedulers. This period also focused on increasing test coverage by adding unit tests for the DefaultErrorBundle and the newly refactored interactor use cases.

Features

Added User domain model

A new User class has been introduced in the domain layer to represent user data, including properties for userId, coverUrl, fullName, email, description, and followers. This model serves as the foundation for the domain layer's data structure.

domain/src/main/java/com/fernandocejas/android10/sample/domain · high confidence

Added presentation layer with MVP architecture and dependency injection

The presentation layer has been introduced, implementing the Model-View-Presenter (MVP) architecture. This includes the \AndroidApplication\ class for initializing Dagger2 dependency injection, along with \ApplicationComponent\ and \ActivityComponent\ for managing object lifecycles. The update adds \UserListPresenter\ and \UserDetailsPresenter\ to handle UI logic, \UserModel\ and \UserModelDataMapper\ to bridge domain and presentation layers, and an \ErrorMessageFactory\ for consistent error handling. Additionally, the \AndroidManifest.xml\ is updated to register the main activities, and the \AndroidApplication\ class is configured to initialize the dependency injection framework.

presentation · high confidence

Initial project scaffolding and CI configuration

The repository was initialized with essential build and configuration files. A .gitignore file was added to exclude build artifacts, IDE settings, and OS-specific files. A .travis.yml file was introduced to configure the Android CI environment, specifying Java 8, Android SDK components (including build-tools-27.0.1 and android-26), and a build script. Additionally, the standard Gradle wrapper scripts (gradlew, gradlew.bat) and a README.md documenting the Clean Architecture sample were added to the project root.

(repo-wide) · high confidence

Introduce data layer with reactive streams and caching

The data layer is introduced with a reactive approach using RxJava Observables for asynchronous data retrieval and caching. This includes a new UserCache for storing user data, a FileManager for disk operations, and a Serializer for JSON mapping. The repository layer now uses a factory to switch between cloud and disk data sources, with the disk store leveraging the new cache. Tests are added for the data layer components using Robolectric.

data · high confidence

Behavioural changes

1 commit (0 fixes) modifying buildsystem

A change to existing behaviour in buildsystem — 1 commit, 1 file.

buildsystem · low confidence · unverified

Introduce structured error handling with ErrorBundle

The domain layer now includes a new error-handling abstraction: the \ErrorBundle\ interface and its \DefaultErrorBundle\ implementation. This change provides a standardized way to wrap exceptions and retrieve error messages, ensuring that a default message ('Unknown error') is returned when an exception lacks a message. This supports the broader refactor toward a reactive approach by centralizing how errors are captured and communicated from the domain layer.

domain/src/main/java/com/fernandocejas/android10/sample/domain/exception · medium confidence

Introduced domain-layer abstractions for background execution

Added new interfaces for managing asynchronous execution in the domain layer: PostExecutionThread, which provides a Scheduler for switching execution contexts (e.g., to the UI thread), and ThreadExecutor, which serves as a base for executing UseCases off the main thread. These changes support a reactive, thread-safe architecture for background tasks.

domain/src/main/java/com/fernandocejas/android10/sample/domain/executor · high confidence

Introduced reactive repository interface for user data

The domain layer now exposes a reactive API for fetching user data, with the new UserRepository interface returning RxJava Observables for both a list of users and individual user details. This change shifts the domain layer to a reactive programming model, allowing consumers to subscribe to user data streams rather than relying on synchronous or callback-based retrieval.

domain/src/main/java/com/fernandocejas/android10/sample/domain/repository · high confidence

Migrated domain use cases to RxJava 2

The domain layer's use cases (GetUserDetails, GetUserList) and their base class (UseCase) have been refactored to use RxJava 2. This introduces a reactive approach where use cases return Observables and handle threading via Schedulers, replacing the previous implementation. A new DefaultObserver class provides a default error handling implementation for observers.

domain/src/main/java/com/fernandocejas/android10/sample/domain/interactor · high confidence

Updated Gradle wrapper to version 4.1

The project's Gradle wrapper has been updated to use Gradle 4.1. This change ensures the build system uses a specific, stable version of Gradle, which can improve build consistency and compatibility with newer Android Studio versions.

gradle · high confidence

Test coverage

Added unit tests for DefaultErrorBundle; Added unit tests for domain interactor use cases; Added unit tests for the User domain model.

Dependencies

Migrate to AndroidX and update build dependencies

The project has been updated to use AndroidX libraries and modern build tools. Key dependency upgrades include RxJava 2 (io.reactivex.rxjava2), Dagger 2.8, Butterknife 7.0.1, and Espresso 3.0.1. The build system now uses Gradle 3.0.1 and Android Build Tools 27.0.1, with Java 8 compatibility enabled for the data layer and Java 7 for the presentation layer. Testing dependencies have also been updated, including Robolectric 3.1.1 and JUnit 4.12.

(dependencies) · 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 57 → 49 (-7.7)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 98 (-1.5)
  • Architecture 63 (new)
  • Maturity 42 → 42 (+0.0)
  • Readiness 47 → 40 (-6.8)
  • Security 100 → 74 (-25.6)

Resolved (8)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (11 lines × 2) (data/src/main/java/com/fernandocejas/android10/sample/data/net/RestApiImpl.java)
  • No exposed public API
  • Test reliability not included
  • The README links to external blog posts and a YouTube demo video but never explains what clean architecture is, how this app demonstrates it, or why someone would want to use the sample rather than read the original material. (README.md)
  • change coupling unreadable for .java — no production change history could be paired for this repository's own source
  • dormant codebase — no living knowledge left to concentrate

New (20)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (12 lines × 2) (data/src/main/java/com/fernandocejas/android10/sample/data/net/RestApiImpl.java)
  • Duplicated block (5 lines × 2) (presentation/src/main/java/com/fernandocejas/android10/sample/presentation/presenter/UserDetailsPresenter.java)
  • Duplicated block (5 lines × 2) (presentation/src/main/java/com/fernandocejas/android10/sample/presentation/presenter/UserDetailsPresenter.java)
  • Duplicated block (53 lines × 2) (domain/src/main/java/com/fernandocejas/android10/sample/domain/User.java)
  • Duplicated block (6 lines × 2) (presentation/src/main/java/com/fernandocejas/android10/sample/presentation/view/activity/UserDetailsActivity.java)
  • Duplicated block (7 lines × 2) (presentation/src/main/java/com/fernandocejas/android10/sample/presentation/view/fragment/UserDetailsFragment.java)
  • High secret: WD-SECRET-0004 (buildsystem/debug.keystore)
  • Leaked secret: private-key-store (buildsystem/debug.keystore)
  • No SBOM
  • No assertions: testGetUserEntityListUnsupported (data/src/test/java/com/fernandocejas/android10/sample/data/repository/datasource/DiskUserDataStoreTest.java)
  • No assertions: testShouldFailWhenExecuteWithNullObserver (domain/src/test/java/com/fernandocejas/android10/sample/domain/interactor/UseCaseTest.java)
  • No assertions: testShouldFailWhenNoOrEmptyParameters (domain/src/test/java/com/fernandocejas/android10/sample/domain/interactor/GetUserDetailsTest.java)
  • No assertions: testTransformUserEntityCollectionNotValidResponse (data/src/test/java/com/fernandocejas/android10/sample/data/entity/mapper/UserEntityJsonMapperTest.java)
  • No assertions: testTransformUserEntityNotValidResponse (data/src/test/java/com/fernandocejas/android10/sample/data/entity/mapper/UserEntityJsonMapperTest.java)
  • No build provenance
  • No dependency advisory monitoring
  • TodoComment (data/src/main/java/com/fernandocejas/android10/sample/data/repository/datasource/DiskUserDataStore.java)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

android10/Android-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 24 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 8ed4222c537e40db05e9e685bbc253fafb6b8e1f — 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-f917f263222d.