How uber/ribs works
Based on our analysis of the file tree and the README, this repository is the home of the RIBs framework – a cross‐platform mobile architecture framework primarily used for building scalable mobile apps. RIBs (Router, Interactor, Builder) encapsulate a paradigm where business logic is decoupled from the view (and even can exist without it) and where DI and reactive streams (Rx) govern interactions. The repository is organized into multiple modules (libraries), demos, tooling, and tutorials that support both Android (including Jetpack Compose support) and iOS (via a separate repository).
Main Components
• Core Framework Libraries: These include modules like
– rib-base (defining core abstractions: Interactor, Router, Builder, Presenter, etc.)
– rib-android-core and rib-android (providing Android-specific implementations and lifecycle hooks)
– rib-android-compose (extending support to Jetpack Compose)
– rib-coroutines and rib-router-navigator (offering additional patterns for coroutines and advanced routing)
• Compiler & Code Generation Components:
– rib-compiler-app, rib-compiler-test, and rib-coroutines-test are all responsible for compile-time checks, code generation, and testing support (e.g. verifying annotations and generating boilerplate)
• Demos & Tutorials:
– Multiple demos (compose, flipper, intellij, memory-leaks, rib-workers) show end-to-end implementations in different setups.
– Tutorials are provided as separate projects outlining how to implement RIBs-based apps.
• Tooling and IDE Integration:
– Tools such as the rib-flipper-plugin, rib-intellij-plugin, and accompanying native and utility modules provide developer productivity enhancements (code generation, static analysis, memory leak detection, etc.).
• Configurations & Conventions:
– Several directories (config, conventions, gradle, etc.) indicate standard practices and settings which underpin the build, lint, and formatting rules.
Component Relationships and Interactions
• A “Tooling & IDE Integration” module. This component (which contains rib-flipper-plugin, rib-intellij-plugin, and related utilities) connects to both the core libraries and demos, illustrating that tooling assists in development (e.g., code generation, runtime analysis).
Architectural Patterns and Design Principles
• Use of reactive streams (or Rx) where applicable—for example, between the interactor and view, or while handling events across components.
Elements
– Another for platform-specific or demo applications (e.g., green)
– A third for tooling and build configuration (e.g., grey or orange)
Detailed and Accurate Capture
• That every module present in the repository is either grouped into one of the above sections or at least mentioned as part of the overall ecosystem.
• Avoid oversimplification: include as many components as possible since the architecture is meant to scale for large teams. It’s better to separate the system into the maximum number of components (i.e., core, demos, tooling, configurations) to fully represent the architecture.