# sanogueralorenzo/android-kotlin-clean-architecture architecture

> Architecture diagram of the GitHub repository sanogueralorenzo/android-kotlin-clean-architecture, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sanogueralorenzo/android-kotlin-clean-architecture
- Repository: https://github.com/sanogueralorenzo/android-kotlin-clean-architecture

## Overview

##### Project type and purpose
- This is a multi-module Android project demonstrating Clean Architecture and dynamic feature modularization.
- It hosts two consumable apps:
- “Amiga App” (in app/) – a feature-modularized wellbeing/calendar app
- “Sample Giphy App” (in sample/) – a reference app showing paginated Giphy search/trending.
- It shares cross-cutting modules under common/ (views, network, cache, resources), plus navigation (reflection-based router) and a small usermanager library.

##### File structure
- Top-level modules:
- app/ – the base Android application (Amiga), configured for dynamic features
- sample/ – standalone sample app demonstrating Clean Arch and networking
- common/ – reusable libraries (cache, network, views, resources)
- navigation/ – core Navigator, dynamic-install support, feature routing
- features/ – Android dynamic-feature modules (home, onboarding, profile) for the Amiga app
- libs/usermanager/ – simple user-management library
- Build scripts and Gradle configs orchestrate dependencies and dynamic-feature wiring.
- Detekt, lint.xml, proguard, legal/, and CI workflows support quality and publishing.

##### README for additional insights
- The README stresses:
- RUDT principles (Read, Update, Debug, Test)
- Clean Architecture (layered code + feature modules)
- DI experimentation (Dagger Hilt, Koin)
- Custom navigation without compile-time coupling
- Shared “common” modules

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Apps
    subgraph "App Host (Amiga App)"
        direction TB
        AppHost["App Host\n(app/)"]:::android
    end

    subgraph "Dynamic Feature Modules"
        direction TB
        Home["Feature: Home\n(features/home/)"]:::android
        Onboarding["Feature: Onboarding\n(features/onboarding/)"]:::android
        Profile["Feature: Profile\n(features/profile/)"]:::android
    end

    subgraph "Sample Giphy App"
        direction TB
        SampleApp["Sample Giphy App\n(sample/)"]:::android
        subgraph "Clean Architecture Layers"
            direction TB
            Presentation["Presentation Layer"]:::android
            Domain["Domain Layer"]:::android
            Data["Data Layer"]:::android
            ExternalLayer["External Layer"]:::android
        end
    end

    subgraph "Common Libraries"
        direction TB
        Views["common/views\n(UI Components)"]:::common
        Resources["common/resources\n(Resources)"]:::common
        Network["common/network\n(REST Client)"]:::common
        Cache["common/cache\n(Caching)"]:::common
    end

    subgraph "Infrastructure Libraries"
        direction TB
        Navigation["navigation/\n(Navigator & Router)"]:::infra
        UserManager["libs/usermanager/\n(UserManager)"]:::infra
    end

    %% External Service
    GiphyAPI["Giphy REST API"]:::external

    %% Connections - App Host and Features
    Home -->|loads at runtime| AppHost
    Onboarding -->|loads at runtime| AppHost
    Profile -->|loads at runtime| AppHost
    AppHost -->|uses| Navigation
    AppHost -->|uses| Views
    AppHost -->|uses| Resources
    AppHost -->|uses| Cache
    AppHost -->|uses| Network
    AppHost -->|uses| UserManager

    %% Sample App dependencies
    SampleApp -->|uses| Navigation
    SampleApp -->|uses| UserManager
    SampleApp -->|uses| Views
    SampleApp -->|uses| Resources

    %% Clean Arch within Sample App
    SampleApp --> Presentation
    Presentation --> Domain
    Domain --> Data
    Data --> ExternalLayer

    %% Data layer dependencies
    Data -->|HTTP| Network
    Data -->|Cache| Cache
    ExternalLayer -->|REST| GiphyAPI

    %% Presentation dependencies
    Presentation -->|UI toolkit| Views

    %% Navigation usage by features
    Home -->|navigation| Navigation
    Onboarding -->|navigation| Navigation
    Profile -->|navigation| Navigation

    %% Class and click events
    classDef android fill:#ade8f4,stroke:#333,stroke-width:1px;
    classDef common fill:#b7e4c7,stroke:#333,stroke-width:1px;
    classDef infra fill:#ffd6a5,stroke:#333,stroke-width:1px;
    classDef external fill:#d3d3d3,stroke:#333,stroke-width:1px;

    click AppHost "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/app/"
    click SampleApp "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/sample/"
    click Home "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/features/home/"
    click Onboarding "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/features/onboarding/"
    click Profile "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/features/profile/"
    click Views "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/common/views/"
    click Resources "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/common/resources/"
    click Network "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/common/network/"
    click Cache "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/common/cache/"
    click Navigation "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/navigation/"
    click UserManager "https://github.com/sanogueralorenzo/android-kotlin-clean-architecture/tree/master/libs/usermanager/"
```
