# kangmin1012/composeplayground architecture

> Architecture diagram of the GitHub repository kangmin1012/composeplayground, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kangmin1012/composeplayground
- Repository: https://github.com/kangmin1012/composeplayground

## Overview

##### Project type and purpose
- This is a single-module Android application (“ComposePlayGround”) whose sole purpose is to experiment with Jetpack Compose UI patterns (bottom sheets, coordinate layouts, media permissions, custom progress animations, theming, etc.).
- There is no backend or server component; it is a client-only mobile sample project.

##### File structure
- Top-level files & folders:
- build.gradle.kts, settings.gradle.kts, gradle wrapper & version catalog (libs.versions.toml) → Build system (Gradle Kotlin DSL).
- app/ → Android application module
- app/src/main/
- AndroidManifest.xml → Declares activities and app metadata
- java/compose/play/ground/… → Activities grouped by feature (bottomsheet, coordinate, permission, progress, theme)
- app/src/androidTest & app/src/test → Instrumented tests & unit tests for the sample UI
- No multi-module or domain layer; all code lives in one module under feature-named packages.

##### Insights from the README
- It’s an experimentation playground for Compose UI, with each feature in its own Activity.
- No formal Clean Architecture or separation beyond packaging by UI feature.
- The project uses Material3 (implied by themes) and the latest target SDK (34).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build System
    subgraph "Build System"
        direction TB
        BuildScript["build.gradle.kts"]:::build
        Settings["settings.gradle.kts"]:::build
        VersionCatalog["libs.versions.toml"]:::build
        subgraph "Gradle Wrapper"
            direction TB
            Gradlew["gradlew / gradlew.bat"]:::build
            WrapperProps["gradle-wrapper.properties"]:::build
            WrapperJar["gradle-wrapper.jar"]:::build
        end
    end

    %% APK and OS
    BuildSystemEnd(( )):::build -->|compiles code & resources| APK["APK (app module)"]:::app
    APK -->|installed on| AndroidOS["Android OS"]:::os

    %% App Module Activities and UI
    subgraph "App Module (./app)" 
        direction TB
        ModuleBuild["build.gradle.kts"]:::build
        Manifest["AndroidManifest.xml"]:::app
        subgraph "Activities"
            direction TB
            MainActivity["MainActivity"]:::app
            BottomSheetActivity["BottomSheetActivity"]:::app
            CoordinateActivity["CoordinateActivity"]:::app
            MediaPermissionActivity["MediaPermissionActivity"]:::app
            ProgressActivity["ProgressActivity"]:::app
        end
        subgraph "Compose UI Layer"
            direction TB
            UIRoot["UI Root"]:::ui
            subgraph "Theme Files"
                direction TB
                ColorKt["Color.kt"]:::ui
                ThemeKt["Theme.kt"]:::ui
                TypeKt["Type.kt"]:::ui
            end
        end
        subgraph "Resources"
            direction TB
            Drawables["Drawable XMLs"]:::res
            Mipmaps["Mipmap Icons"]:::res
            Values["Values (colors,strings,themes)"]:::res
            XMLRules["XML Rules"]:::res
        end
    end

    %% Runtime Services
    PermissionManager["Android Permission Manager"]:::os
    AnimationAPI["Compose Animation APIs"]:::os

    %% Tests
    subgraph "Tests"
        direction TB
        UnitTests["Unit Tests (JVM)"]:::test
        InstrumentedTests["Instrumented Tests (Android)"]:::test
    end

    %% Connections
    APK -->|"declares activities & metadata"| Manifest
    APK -->|"uses module script"| ModuleBuild
    AndroidOS -->|"launches"| MainActivity
    AndroidOS -->|"launches"| BottomSheetActivity
    AndroidOS -->|"launches"| CoordinateActivity
    AndroidOS -->|"launches"| MediaPermissionActivity
    AndroidOS -->|"launches"| ProgressActivity

    MainActivity -->|"hosts"| UIRoot
    BottomSheetActivity -->|"hosts"| UIRoot
    CoordinateActivity -->|"hosts"| UIRoot
    MediaPermissionActivity -->|"hosts"| UIRoot
    ProgressActivity -->|"hosts"| UIRoot

    UIRoot -->|"reads themes"| ColorKt
    UIRoot -->|"reads themes"| ThemeKt
    UIRoot -->|"reads themes"| TypeKt
    UIRoot -->|"reads resources"| Drawables
    UIRoot -->|"reads resources"| Mipmaps
    UIRoot -->|"reads resources"| Values
    UIRoot -->|"reads resources"| XMLRules

    MediaPermissionActivity -->|"requests permission from"| PermissionManager
    ProgressActivity -->|"uses animation via"| AnimationAPI

    UnitTests -->|"test composables in isolation"| UIRoot
    InstrumentedTests -->|"drive UI on device"| AndroidOS

    %% Click Events
    click BuildScript "https://github.com/kangmin1012/composeplayground/blob/master/./build.gradle.kts"
    click Settings "https://github.com/kangmin1012/composeplayground/blob/master/./settings.gradle.kts"
    click VersionCatalog "https://github.com/kangmin1012/composeplayground/blob/master/./gradle/libs.versions.toml"
    click Gradlew "https://github.com/kangmin1012/composeplayground/tree/master/./gradlew"
    click WrapperProps "https://github.com/kangmin1012/composeplayground/blob/master/./gradle/wrapper/gradle-wrapper.properties"
    click WrapperJar "https://github.com/kangmin1012/composeplayground/blob/master/./gradle/wrapper/gradle-wrapper.jar"
    click APK "https://github.com/kangmin1012/composeplayground/tree/master/./app"
    click ModuleBuild "https://github.com/kangmin1012/composeplayground/blob/master/./app/build.gradle.kts"
    click Manifest "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/AndroidManifest.xml"
    click MainActivity "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/java/compose/play/ground/MainActivity.kt"
    click BottomSheetActivity "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/java/compose/play/ground/bottomsheet/BottomSheetActivity.kt"
    click CoordinateActivity "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/java/compose/play/ground/coordinate/CoordinateActivity.kt"
    click MediaPermissionActivity "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/java/compose/play/ground/permission/MediaPermissionActivity.kt"
    click ProgressActivity "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/java/compose/play/ground/progress/ProgressActivity.kt"
    click UIRoot "https://github.com/kangmin1012/composeplayground/tree/master/./app/src/main/java/compose/play/ground/ui"
    click ColorKt "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/java/compose/play/ground/ui/theme/Color.kt"
    click ThemeKt "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/java/compose/play/ground/ui/theme/Theme.kt"
    click TypeKt "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/java/compose/play/ground/ui/theme/Type.kt"
    click Drawables "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/res/drawable/ic_launcher_background.xml"
    click Mipmaps "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml"
    click Values "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/res/values/colors.xml"
    click XMLRules "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/main/res/xml/backup_rules.xml"
    click UnitTests "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/test/java/compose/play/ground/ExampleUnitTest.kt"
    click InstrumentedTests "https://github.com/kangmin1012/composeplayground/blob/master/./app/src/androidTest/java/compose/play/ground/ExampleInstrumentedTest.kt"

    %% Styles
    classDef build fill:#f9f,stroke:#333,stroke-width:1px
    classDef app fill:#bbf,stroke:#333,stroke-width:1px
    classDef os fill:#bfb,stroke:#333,stroke-width:1px
    classDef ui fill:#ffeb3b,stroke:#333,stroke-width:1px
    classDef res fill:#ffccbc,stroke:#333,stroke-width:1px
    classDef test fill:#cfd8dc,stroke:#333,stroke-width:1px
```
