Skip to content
CAI
Software that uses CAICheck a score

tolatruong98/clean-architecture-hoga

51.6

Adequate · 22 September 2026

1.3k

lines of production code

Kotlin

primary language

6

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Android application for browsing, searching, and managing images from the Unsplash API. It provides features to explore trending content, search for specific images, and download them to local storage. The app also allows users to set downloaded images as their device wallpaper and view their saved collection.

Features

Add image detail screen with download and wallpaper options

A new image detail screen has been introduced, allowing users to view an image's full details, download the image to their device, or set it as their device wallpaper. The screen displays the image using a progress indicator during loading and provides feedback via toast messages for download and wallpaper actions.

app/src/main/java/com/quangnguyen/hoga/ui/imagedetail · high confidence

Added base UI components for RecyclerView interactions

The app now includes a new base class for RecyclerView adapters that automatically handles click and long-click events on items, along with the corresponding listener interfaces and a base presenter interface. This simplifies adding touch interactions to list items across the app.

app/src/main/java/com/quangnguyen/hoga/ui/base · high confidence

Added image API integration with Unsplash

The app now connects to the Unsplash API to fetch and search for images. This change introduces new API configuration constants, an ImageService interface defining endpoints for trending and search queries, and a ServiceGenerator to instantiate the network client using Retrofit and RxJava2.

data/src/main/java/com/quangnguyen/data/api · high confidence

Added image downloading and wallpaper setting capabilities

Introduced new data-layer components for handling image assets: an ImageDownloader class manages downloading images from URLs and saving them to local storage, while a WallpaperHelper class provides functionality to set downloaded images as the device's wallpaper.

data/src/main/java/com/quangnguyen/data/device · high confidence

Added utility classes for keyboard management, storage permissions, and RxJava scheduling

Three new utility classes were added to the app's utility package. Fragment.kt provides a helper to hide the virtual keyboard, Permission.kt adds a method to check and request external storage permissions, and SchedulerProvider.kt introduces a class that configures RxJava schedulers for UI and background threads.

app/src/main/java/com/quangnguyen/hoga/util · high confidence

Expanded image management capabilities in the domain layer

The domain layer has been restructured to support a broader range of image operations. A new \Image\ entity now includes fields for the author's name and the local file path of downloaded images. The \ImageRepository\ interface has been updated to include methods for downloading images, setting a wallpaper, retrieving a specific image by ID, loading downloaded images, and paginated loading of trending and search results. Corresponding use cases have been introduced for each of these actions, replacing the previous \interactor\-based implementations with a \usecase\-based architecture.

domain · high confidence

Implement image repository with local caching and download management

The application now persists image metadata and download states in a local SQLite database via the new ImageRepositoryImpl. This enables offline access to downloaded images, prevents redundant downloads of the same image, and supports paginated loading for both trending and search results. Users can now view their previously downloaded images and set them as wallpaper, with the app remembering which images have already been saved to avoid duplicate downloads.

data/src/main/java/com/quangnguyen/data/repository · high confidence

Initial project setup with CI and documentation

The repository is initialized with a Travis CI configuration (.travis.yml) to automate builds and a mock local.properties.travis file to handle API tokens for the Unsplash service. The README.md is updated to include screenshots, clarify the app's target audience and technical stack (Kotlin, Clean Architecture), and provide build instructions. Additionally, the .gitignore file is updated to exclude specific build artifacts and IDE files.

(repo-wide) · high confidence

Introduce collection screen to display downloaded images

A new collection feature has been added to the app, allowing users to view their downloaded images in a grid layout. The implementation includes a new CollectionFragment and its associated MVP components (Contract, Presenter) which fetch and display the list of downloaded images, and provide navigation to an image detail screen when an item is selected.

app/src/main/java/com/quangnguyen/hoga/ui/collection · high confidence

Introduce data models for image search and storage

Added new data models to support image search and local storage. ImageModel defines the structure for storing image details (including URLs, user info, and downloaded file path) in SQLite via Room, while SearchResultModel represents the structure for search results. These changes enable the app to save image information, track downloaded file paths, and display image author names.

data/src/main/java/com/quangnguyen/data/model · high confidence

Introduce local SQLite storage for images

Added new database components to persist image data locally using SQLite via the Room library. This includes a database configuration, a Room database class mapping to an 'images' table, a Data Access Object (DAO) for inserting and retrieving image records, and type converters for serializing complex objects like ImageUrlsList and User. This enables the application to save and retrieve image information from the local database.

data/src/main/java/com/quangnguyen/data/database · high confidence

Introduce main activity with bottom navigation and fragment-based UI

The app now uses a new MainActivity that hosts a bottom navigation bar (navigationView) to switch between the Explore and Collection screens. The main screen loads the Explore fragment by default, and the toolbar title updates to reflect the current screen. The implementation uses fragment tags to manage state, ensuring that existing fragments are reused rather than recreated, which simplifies the fragment replacement logic.

app/src/main/java/com/quangnguyen/hoga/ui/main · high confidence

Introduce the new Explore screen for browsing and searching images

The app now features a dedicated Explore screen that allows users to browse trending images and search for specific ones. This new UI component, located in the \ui/explore\ package, implements a paginated, scrollable grid of images using a new \ImageAdapter\ and \ExplorePresenter\. Users can refresh the feed, load more images as they scroll, and perform keyword searches, with the interface clearly separating the view, contract, and presenter logic for this feature.

app/src/main/java/com/quangnguyen/hoga/ui/explore · high confidence

Behavioural changes

Add image data-to-domain mapping

A new ImageMapper interface and its implementation (ImageMapperImpl) have been added to map ImageModel data objects to the domain Image entity. The mapping includes the image ID, small and full URL strings, the user's name, and the downloaded file path.

data/src/main/java/com/quangnguyen/data/mapper · high confidence

Application entry point and main activity refactored

The application now initializes its dependency injection via a new HogaApplication class, replacing the previous setup. Additionally, the legacy MainActivity class that extended AppCompatActivity has been removed, indicating a shift in how the app's primary screen is managed.

app/src/main/java/com/quangnguyen/hoga · medium confidence

Centralized dependency injection for image features

The application now uses a centralized Injector class to initialize and provide all image-related use cases, including loading and searching images, downloading images, loading downloaded images, and setting wallpapers. This change consolidates the wiring of dependencies such as the image repository, image downloader, wallpaper helper, and scheduler provider, ensuring that all image-related features are properly initialized and accessible throughout the app.

app/src/main/java/com/quangnguyen/hoga/di · high confidence

Gradle build tool upgraded to version 4.4

The Gradle wrapper has been updated from version 4.1 to 4.4, which will cause the project to use the newer Gradle release for building the application.

gradle · high confidence

Test coverage

Removed obsolete Android instrumented test; Removed obsolete unit test file.

Dependencies

Centralize dependency versions and organize Gradle build configuration

The project now uses a centralized 'versions.gradle' file to manage all dependency versions and SDK settings, replacing the previous scattered 'rootProject' properties in each module's 'build.gradle'. This change introduces a structured 'deps' map in 'versions.gradle' that defines versions for Kotlin, Android Gradle Plugin, Support libraries, Room, Retrofit, RxJava, Espresso, and testing frameworks. Each module (app, data, domain) now references these centralized versions via the 'deps' map, ensuring consistent versions across the project. Additionally, the 'app' module includes new dependencies for BottomNavigationViewEx and PhotoView, and all modules apply the 'test-report.gradle' script for test reporting.

(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 52 → 52 (-0.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 99 (+0.3)
  • Architecture 100 → 85 (-15.1)
  • Maturity 50 → 50 (+0.0)
  • Readiness 52 → 52 (+0.0)
  • Security 100 → 100 (+0.0)
  • Domain Modelling 38 → 40 (+2.0)

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 (13 lines × 2) (app/src/main/java/com/quangnguyen/hoga/ui/explore/ExplorePresenter.kt)
  • Duplicated block (13 lines × 2) (app/src/main/java/com/quangnguyen/hoga/ui/explore/ExplorePresenter.kt)
  • Duplicated block (8 lines × 2) (app/src/main/java/com/quangnguyen/hoga/ui/collection/CollectionFragment.kt)
  • No exposed public API
  • Test reliability not included
  • single-maintainer — knowledge-concentration (bus factor) risk

New (8)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Duplicated block (14 lines × 2) (app/src/main/java/com/quangnguyen/hoga/ui/explore/ExplorePresenter.kt)
  • Duplicated block (14 lines × 2) (app/src/main/java/com/quangnguyen/hoga/ui/explore/ExplorePresenter.kt)
  • Duplicated block (5 lines × 2) (app/src/main/java/com/quangnguyen/hoga/ui/collection/CollectionFragment.kt)
  • Duplicated block (9 lines × 2) (app/src/main/java/com/quangnguyen/hoga/ui/collection/CollectionFragment.kt)
  • No ADRs found
  • 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

tolatruong98/clean-architecture-hoga 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 22 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 0df6f05eba75aa17d17f939ed4d8d3ffbf794063 — 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-821afab8930d.