Skip to content
CAI
Software that uses CAICheck a score

uber/RIBs

66.3

Adequate · 13 November 2026

24.3k

lines of production code

Kotlin

with Java

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is the Rib framework, a modular architecture for building complex Android applications using a Router-Interactor-Builder pattern. It provides core libraries for component lifecycle management, state-driven navigation, and structured concurrency, alongside tooling for code generation, debugging, and testing. The repository also includes multiple demo applications that illustrate these patterns using both traditional View-based UIs and Jetpack Compose.

Features

Add Android memory-leak demo app with RIB architecture and LeakCanary integration

The \demos/memory-leaks\ directory now contains a complete Android sample application demonstrating the RIB (Router-Interactor-Builder) architecture. The app features a root screen that toggles between logged-out and logged-in states, with the logged-out view intentionally containing a memory leak (a long-running RxJava timer subscription) to serve as a test case. LeakCanary is integrated into the application lifecycle to detect and report these memory leaks during development.

demos/memory-leaks · high confidence

Add IntelliJ RIBs demo application with login and Tic-Tac-Toe flows

The IntelliJ demo now includes a complete sample Android application that demonstrates the RIB architecture. It features a root activity that manages navigation between a logged-out state (where users enter names to log in) and a logged-in state. The logged-in flow includes an 'Off Game' screen with a 'Start Game' button and a 'Tic-Tac-Toe' game screen where two players can take turns placing marks on a 3x3 board. The app uses Dagger for dependency injection and RxJava for handling user interactions like button clicks and input fields.

demos/intellij · high confidence

Add ScreenState model for stack navigation demo

The stack navigation demo now includes a ScreenState data class that represents individual entries in the navigation stack. This model identifies each screen by a number and implements the RouterNavigatorState interface, providing a stateName() method that returns a descriptive identifier (e.g., "screen\_1"). This change establishes the data structure used to track and display navigation state within the demo application.

stack-nav · high confidence

Add stack navigation demo

The stack-nav demo now provides a complete, runnable example of a RIB-based navigation stack. It includes the root activity, interactor, and router that manage a stack of up to five numbered screens, along with the individual screen components (view, interactor, router) that handle push and back interactions. The demo UI features a top navigation bar with a back button (hidden on the first screen), a large screen number, depth indicator, and a 'Push Screen' button, with edge-to-edge support for Android 15+.

demos/stack-nav · high confidence

Added Flipper demo app with login and Tic-Tac-Toe gameplay

The \demos/flipper\ module now includes a complete Android sample application demonstrating the RIB architecture. The app features a login flow where users enter two names, transitioning to an 'OffGame' state and then a playable Tic-Tac-Toe game. The implementation includes the full RIB tree (Root, LoggedIn, LoggedOut, OffGame, TicTacToe) with Dagger dependency injection, RxJava-based view interactions, and Flipper integration for debugging in debug builds.

(repo-wide) · high confidence

Initial release of Rib libraries and tooling

This change introduces the core Rib framework libraries and associated tooling for the first time. It adds the compiler module (rib-compiler-test) which generates test helpers for Interactors, and the test utilities module (rib-test) providing FakeComponent, FakeInteractor, FakeRouter, and helper objects for verifying Interactor and Router lifecycle events. It also includes the rib-coroutines module for dispatcher abstraction, the rib-debug-utils module for printing router subtrees, and the rib-router-navigator module for managing navigation state. Additionally, it adds a Compose demo application and standardizes project configuration with lint and Spotless copyright headers.

(repo-wide) · high confidence

Initial repository structure and documentation for RIBs

This change establishes the foundational structure of the RIBs repository by adding essential project files including the Apache 2.0 license, code of conduct, contributing guidelines, and release procedures. It also introduces the initial README, which describes the RIBs architecture (Router, Interactor, Builder) and its benefits for cross-platform mobile development, alongside a comprehensive changelog documenting versions from 0.1.0 through 0.17.0. Additionally, standard build tooling files like .gitignore and Gradle wrapper scripts are included to support Android development.

(repo-wide) · high confidence

Introduce RIB code generation and Android device inspection in the IntelliJ plugin

The plugin now includes a new action to generate RIB components (Interactor, View, Router, Presenter) for Java or Kotlin projects, configurable via a dialog that lets users choose whether to include a presenter and whether to generate Kotlin code. Additionally, an Android-specific service and UI panel have been added to connect to Android devices via ADB, allowing users to inspect the RIB hierarchy and view hierarchy of connected devices directly within the IDE.

tooling/rib-intellij-plugin · high confidence

Introduce Rib compiler, coroutine testing utilities, and workflow step execution

This change adds the core implementation for the Rib annotation processor in \rib-compiler-app\, including the \RibProcessor\ and \RibInteractorProcessorPipeline\ that validate and generate code for \@RibInteractor\ annotations. It also introduces \rib-coroutines-test\, providing \RibCoroutinesRule\ and test scope overrides to simplify unit testing of Rib components with Kotlin coroutines. Finally, it adds the \rib-workflow\ core library, defining the \Step\ and \ActionableItem\ APIs that allow developers to chain and execute workflow steps based on interactor lifecycle events.

libraries/rib-compiler-app, libraries/rib-coroutines-test, libraries/rib-workflow · high confidence

Introduce RouterNavigator library for stack-based navigation

The \rib-router-navigator\ library is introduced, providing a \RouterNavigator\ interface and a \StackRouterNavigator\ implementation to manage child router transitions via a state-based stack. This adds support for various navigation flags (DEFAULT, TRANSIENT, CLEAR\_TOP, SINGLE\_TOP, REORDER\_TO\_TOP, NEW\_TASK, NEW\_TASK\_REPLACE, REPLACE\_TOP) and introduces a \RouterNavigatorEvents\ singleton for observing navigation lifecycle events. The library also includes a \RouterNavigatorFactory\ to allow custom creation strategies and deprecates older methods like \pushRetainedState\ and \pushTransientState\ in favor of the new \pushState\ API with explicit flags.

libraries/rib-router-navigator · high confidence

New Activity lifecycle delegation and ViewTree owner setup

This change introduces a new extensibility mechanism for Android activities within the RIB core library. It adds the \ActivityDelegate\ interface and \HasActivityDelegate\ marker interface, allowing developers to inject custom logic into the standard Activity lifecycle callbacks (such as \onCreate\, \onResume\, etc.) via a delegate pattern. Additionally, \CoreAppCompatActivity\ is introduced to automatically configure essential AndroidX ViewTree owners (Lifecycle, ViewModelStore, SavedStateRegistry, and OnBackPressedDispatcher) on the window's decor view, ensuring proper state management and back-press handling for components attached to the activity.

libraries/rib-android-core · high confidence

New Compose integration and screen stack base libraries added

This change introduces new foundational libraries for Android development within the RIB framework. The \rib-android-compose\ module adds \BasicComposeRouter\ and \ComposePresenter\, enabling developers to build RIBs using Jetpack Compose by exposing a composable slot that updates on attach/detach. The \rib-screen-stack-base\ module provides the \ScreenStackBase\ interface and \ViewProvider\ abstract class, establishing a standard API for managing view-based screen stacks with lifecycle events (Built, Appeared, Hidden, Removed) and back-press handling. Additionally, the \rib-flipper-plugin\ tooling module is added, providing a Flipper plugin (\RibTreePlugin\) that visualizes the RIB tree in the Flipper client and supports highlighting specific router views for debugging.

libraries/rib-android-compose, libraries/rib-screen-stack-base, tooling/rib-flipper-plugin · high confidence

New Compose-based RIB demo application

Added a new Android demo application in demos/compose that showcases the RIB architecture using Jetpack Compose. The app includes a root activity, a main screen, and a logged-in flow featuring an 'off-game' screen and a playable Tic-Tac-Toe game, demonstrating interactor-router-scopes, state management via StateStream, and event handling with EventStream within a Compose UI.

demos/compose, demos/rib-workers · high confidence

New coroutine scope extensions with configurable lifecycle error handling

The rib-coroutines library introduces \coroutineScope\ extension properties for \ScopeProvider\ and \Application\, providing coroutine scopes tied to the provider's lifecycle or the application process respectively. A key behavioral addition is the \RibCoroutinesConfig.shouldCoroutineScopeFailSilentlyOnLifecycleEnded\ flag, which allows developers to choose whether accessing a \ScopeProvider\'s scope after it has completed should throw a \LifecycleEndedException\ (default) or return an immediately cancelled scope, preventing crashes in late-bound code paths.

libraries/rib-coroutines · high confidence

New coroutine worker binding and configurable event buffering

The rib-base library introduces \RibCoroutineWorker\ and a \bind\ extension, allowing developers to manage background work bound to a \CoroutineScope\ with structured concurrency and automatic lifecycle handling. Additionally, \RibEvents.setExtraBufferCapacity\ is now available to configure the buffer size for router and action event flows, helping to mitigate ANRs by controlling backpressure behavior.

rib-base · high confidence

New test utilities for managing coroutine dispatchers in Rib tests

Added \RibCoroutinesRule\ and \TestRibDispatchers\ to the \rib-coroutines-test\ library. \RibCoroutinesRule\ is a JUnit TestRule that automatically installs test-specific coroutine dispatchers and configures the deprecated worker dispatcher when a test starts, and resets them to defaults when the test finishes. \TestRibDispatchers\ provides a configurable set of test dispatchers (Default, IO, Unconfined, Main) backed by a \TestCoroutineScheduler\, allowing tests to control coroutine execution timing and main thread simulation.

rib-coroutines-test · high confidence

Support for predictive back gestures and customizable activity content attachment

RibActivity now supports Android 14+ predictive back gestures by forwarding swipe progress callbacks to root ViewRouters that implement the new PredictiveBackHandler interface, allowing custom animations during the back transition. Additionally, the attachContent() method in RibActivity is now overridable, enabling developers to attach alternative root content (non-RIB roots) while still benefiting from RibActivity's lifecycle event publishing.

libraries/rib-android/src/main · high confidence

Tutorial 4 adds a RIB-based sample app with login flow and game selection

The tutorial4 location now contains a complete Android sample application demonstrating the RIB architecture. It includes the app entry point (RootActivity, SampleApplication) and a Root RIB that manages navigation between logged-out and logged-in states. The logged-in state features an OffGame RIB for displaying player names and scores, and a LoggedIn RIB that acts as a container for game RIBs, specifically TicTacToe and RandomWinner. The implementation uses Dagger for dependency injection, RxJava for reactive streams, and Kotlin data classes for simple data models like UserName.

tutorial4, tutorials/tutorial4 · high confidence

Behavioural changes

Introduce base Rib components and refactor Interactor lifecycle to StateFlow

This release adds the foundational classes for the Rib framework, including BasicInteractor, BasicRouter, Builder, Bundle, EmptyPresenter, and RibRefWatcher, providing the core building blocks for RIB-based architecture. Additionally, the Interactor lifecycle implementation has been updated to use StateFlow instead of SharedFlow, a change designed to improve ANR stacktrace visibility and reduce the occurrence of Application Not Responding errors.

libraries/rib-base · high confidence

New Android build conventions and static analysis setup

The conventions module now provides standardized Gradle build scripts for Android applications and libraries, enforcing a JDK 17 toolchain while maintaining Java 8 source and target compatibility. Android application builds are configured with compileSdk 36, targetSdk 35, and minSdk 23, while library builds enforce explicit API mode to ensure public contract stability. Additionally, a new Error Prone and NullAway configuration is introduced to treat null-safety violations as build errors, and Spotless is standardized across Kotlin, Java, and Gradle files to enforce consistent code formatting.

conventions · high confidence

Test coverage

Added unit tests for Rib Android core components

Added new Robolectric-based unit tests for the Rib Android library, covering the Bundle wrapper, RibActivity lifecycle and callback handling, ViewBuilder context inflation, and XRay view debugging. These tests verify core behaviors such as state propagation, lifecycle event emission, and view background modification.

libraries/rib-android/src/test · high confidence

Dependencies

Gradle build infrastructure and dependency versions updated

The Gradle build system has been restructured to use version catalogs, introducing new configuration files (app-libs.versions.toml, test-libs.versions.toml) that define specific versions for libraries such as AndroidX Activity, Compose, LeakCanary, JUnit, Mockito, and Robolectric. Additionally, the Gradle wrapper has been upgraded to version 8.14.3 to support these changes.

gradle · high confidence

Upgrade to Android Gradle Plugin 8.13.0 and Kotlin 2.1.10

The build system has been upgraded to use Android Gradle Plugin 8.13.0 and Kotlin 2.1.10. This update also brings the Compose libraries to version 1.6.8, Dagger to 2.53.1, and the IntelliJ Platform plugin to 2.9.0. Additionally, the project now uses the KSP compiler plugin instead of Kapt for dependency injection and code generation, and the build is configured to run on a JDK 17 toolchain while maintaining Java 1.8 source compatibility.

(dependencies) · high 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 65 → 66 (+1.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 84 → 84 (-0.0)
  • Architecture 100 → 99 (-0.5)
  • Maturity 59 → 59 (+0.1)
  • Readiness 54 → 56 (+2.6)
  • Security 93 → 91 (-2.3)
  • Performance 100 → 100 (+0.0)

Resolved (8)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Duplicated block (9 lines × 2) (demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainScope.kt)
  • Further sole-owners (lower concentration)
  • Near-duplicate member family (6 members, 13 shared lines) (demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java)
  • No ADRs found
  • Off-boarding risk: anonymized user #1
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result

New (166)

  • Banned license: com.google.errorprone:javac
  • Dependency hygiene PARTLY measured — Gradle build resolved part of the dependency graph, currency reported but not scored
  • Documentation: no build, run or usage example (tooling/rib-flipper-plugin/desktop/README.md)
  • Duplicated block (11 lines × 4) (demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameScope.kt)
  • Duplicated block (6 lines × 3) (demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainRouter.kt)
  • Duplicated block (9 lines × 2) (demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainScope.kt)
  • Edited copies of one member (3 members, 4+ corresponding lines) (demos/compose/src/main/kotlin/com/uber/rib/compose/util/AnalyticsClient.kt)
  • Edited copies of one member (3 members, 5+ corresponding lines) (tutorials/tutorial2/src/main/java/com/uber/rib/root/RootRouter.java)
  • Edited copy of a member (11 corresponding lines) (demos/compose/src/main/kotlin/com/uber/rib/compose/ComposeApplication.kt)
  • Edited copy of a member (11 corresponding lines) (tutorials/tutorial1/src/main/java/com/uber/rib/root/RootBuilder.java)
  • Edited copy of a member (13 corresponding lines) (demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainView.kt)
  • Edited copy of a member (14 corresponding lines) (tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java)
  • Edited copy of a member (14 corresponding lines) (tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java)
  • Edited copy of a member (15 corresponding lines) (tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyUtils.kt)
  • Edited copy of a member (16 corresponding lines) (tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/Generators.java)
  • Edited copy of a member (22 corresponding lines) (libraries/rib-base/src/main/kotlin/com/uber/rib/core/Interactor.kt)
  • Edited copy of a member (27 corresponding lines) (tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java)
  • Edited copy of a member (40 corresponding lines) (tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibProjectService.kt)
  • Edited copy of a member (5 corresponding lines) (tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java)
  • Edited copy of a member (7 corresponding lines) (tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootRouter.java)
  • …and 146 more

Architecture

  • Containers 0 added · 0 removed · contexts 0 added · 0 removed · edges 0 added · 1 removed

Removed dependency edges (was a dependency, now gone) (1)

  • tutorial3-completed → tutorial4

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

Survey your own repository

uber/RIBs 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 13 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 d1da82772c389d2d167ff641dfb41e95e8e600aa — the exact code this score is about.
  • Scored under rubric-2026.11.3 — 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.63+preprod-4a8cc97a9484.