# slackhq/foundry architecture

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

- Interactive diagram: https://gitdiagram.com/slackhq/foundry
- Repository: https://github.com/slackhq/foundry

## Overview

##### Main Components

a. Platform Components:
- Gradle Platform
- AGP Handlers
- Better Gradle Properties
- Foundry Gradle Plugin
- IntelliJ Platform
- Artifactory Authenticator
- Compose
- Skate Plugin

b. Tools Components:
- CLI Tools
- Foundry Common
- Robolectric SDK Management
- Skippy
- Tracing
- Version Number

- Gradle        |     |    IntelliJ     |
- Platform      |     |    Platform     |

- CLI    |  | Skippy  |  |Tracing |

- Foundry Common       |

##### Key Relationships to Highlight

- Plugin architecture for both Gradle and IntelliJ platforms
- Build tool chain relationships
- Integration points with external systems (Artifactory, Robolectric)

##### Specific Implementation Details

For the Gradle Platform:

- Foundry Gradle       |

- AGP Handlers |    |

- Properties |    |

For the IntelliJ Platform:

- IntelliJ Platform    |

- Skate     |    |

- Compose    |    |

##### Additional Elements

- Version management flow
- Build pipeline integration points
- Test coverage and quality assurance components
- Configuration management points

##### Technical Details

- Kotlin/JVM runtime environment
- Gradle build system integration
- IntelliJ plugin system hooks
- Testing frameworks
- Configuration management
- Dependency management

Remember to include:
- Version control integration points
- Build system hooks
- Plugin extension points
- Configuration inheritance
- Tool chain integration points

This will provide a comprehensive view of the system while maintaining clarity about how the different components interact and depend on each other.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Define styles
    classDef platform fill:#d0e1f9,stroke:#666
    classDef tool fill:#d4edda,stroke:#666
    classDef common fill:#f8f9fa,stroke:#666
    classDef external fill:#fff3cd,stroke:#666

    %% Platform Layer
    subgraph Platforms
        subgraph GradlePlatform["Gradle Platform"]
            AGP["AGP Handlers"]
            BGP["Better Gradle Properties"]
            FGP["Foundry Gradle Plugin"]
            
            FGP --> AGP
            FGP --> BGP
        end

        subgraph IntelliJPlatform["IntelliJ Platform"]
            AA["Artifactory Authenticator"]
            CP["Compose"]
            SP["Skate Plugin"]
            
            SP --> CP
            SP --> AA
        end
    end

    %% Tools Layer
    subgraph Tools
        CLI["CLI Tools"]
        SKP["Skippy"]
        TRC["Tracing"]
        RSM["Robolectric SDK Management"]
        VN["Version Number"]
    end

    %% Common Infrastructure Layer
    FC["Foundry Common"]

    %% Relationships
    GradlePlatform --> FC
    IntelliJPlatform --> FC
    CLI --> FC
    SKP --> FC
    TRC --> FC
    RSM --> FC
    VN --> FC

    %% External Systems
    ART["Artifactory"]:::external
    ROB["Robolectric"]:::external

    AA --> ART
    RSM --> ROB

    %% Click events for component mapping
    click AGP "https://github.com/slackhq/foundry/tree/main/platforms/gradle/agp-handlers/agp-handler-api/"
    click BGP "https://github.com/slackhq/foundry/tree/main/platforms/gradle/better-gradle-properties/"
    click FGP "https://github.com/slackhq/foundry/tree/main/platforms/gradle/foundry-gradle-plugin/"
    click AA "https://github.com/slackhq/foundry/tree/main/platforms/intellij/artifactory-authenticator/"
    click CP "https://github.com/slackhq/foundry/tree/main/platforms/intellij/compose/"
    click SP "https://github.com/slackhq/foundry/tree/main/platforms/intellij/skate/"
    click CLI "https://github.com/slackhq/foundry/tree/main/tools/cli/"
    click FC "https://github.com/slackhq/foundry/tree/main/tools/foundry-common/"
    click RSM "https://github.com/slackhq/foundry/tree/main/tools/robolectric-sdk-management/"
    click SKP "https://github.com/slackhq/foundry/tree/main/tools/skippy/"
    click TRC "https://github.com/slackhq/foundry/tree/main/tools/tracing/"
    click VN "https://github.com/slackhq/foundry/tree/main/tools/version-number/"

    %% Apply styles
    class AGP,BGP,FGP,AA,CP,SP platform
    class CLI,SKP,TRC,RSM,VN tool
    class FC common
    class ART,ROB external

    %% Legend
    subgraph Legend
        P["Platform Component"]:::platform
        T["Tool Component"]:::tool
        C["Common Infrastructure"]:::common
        E["External System"]:::external
    end
```
