# robocorp/example-use-git-submodule-for-shared-code architecture

> Architecture diagram of the GitHub repository robocorp/example-use-git-submodule-for-shared-code, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/robocorp/example-use-git-submodule-for-shared-code
- Repository: https://github.com/robocorp/example-use-git-submodule-for-shared-code

## Overview

##### Project type and purpose
- This is a Robot Framework‐based automation project (an “open‐source tool” style repository) whose primary goal is to execute robotic automation tasks defined in `tasks.robot`.
- It shares common keyword libraries via a Git submodule in `shared/`, avoiding duplication across robot projects.

##### File structure
- Top‐level files:
- `.gitignore`, `.gitmodules` – Git and submodule configuration
- `README.md` – high‐level documentation
- `conda.yaml` – defines the Python/Robot Framework runtime environment
- `robot.yaml` – Robot Framework project metadata (entry‐points, tags, settings)
- `tasks.robot` – the main suite of Robot Framework test/automation tasks
- Top‐level directory:
- `shared/` – Git submodule containing common keyword libraries
- No separate “frontend” or “backend”: this is a single‐component automation codebase augmented by an external submodule.

##### README for additional insights
- The README explains how the submodule was added and how to clone or update it.
- It highlights the use of RCC (Robocorp Command‐line Client) and the standard Robot Framework template.

##### Elements
- Blue for developer actions (clone, update submodule)
- Green for runtime env (conda, rcc)
- Orange for code components (tasks.robot, shared keywords)
- Purple for external services (GitHub, Control Room)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External systems
    Developer["Developer"]:::actor
    GitHub["GitHub Repo"]:::external
    ControlRoom["Control Room"]:::external

    %% Local repository and code components
    subgraph "Local Repository"
        direction TB
        RepoFiles["Project Root"]:::repo
        tasks["Robot Test Suite (tasks.robot)"]:::code
        robotcfg["Project Metadata (robot.yaml)"]:::code
        envcfg["Environment Configuration (conda.yaml)"]:::code
        gitmod["Git Submodule Config (.gitmodules)"]:::code
        readme["Documentation (README.md)"]:::code
        gitignore["Git Ignore (.gitignore)"]:::code
        shared["Shared Keyword Libraries (shared/)"]:::code
    end

    %% Runtime setup
    subgraph "Runtime Setup"
        direction TB
        rcc["RCC CLI"]:::runtime
        conda["Conda Runtime"]:::runtime
    end

    %% Execution engine
    RobotEngine["Robot Framework Engine"]:::runtime

    %% Developer actions
    Developer -->|"git clone --recurse-submodules"| GitHub
    GitHub -->|"clone main repo + submodule"| RepoFiles
    Developer -->|"git submodule update --remote"| gitmod

    %% Code file structure
    RepoFiles --> tasks
    RepoFiles --> robotcfg
    RepoFiles --> envcfg
    RepoFiles --> gitmod
    RepoFiles --> readme
    RepoFiles --> gitignore
    RepoFiles --> shared

    %% Runtime flow
    RepoFiles -->|"rcc run"| rcc
    rcc --> conda
    conda --> RobotEngine
    tasks -->|"imports from"| shared
    RobotEngine -->|"executes tasks.robot"| tasks

    %% Optional trigger
    Developer -->|"trigger/run"| ControlRoom
    ControlRoom -->|"initiates rcc run"| RepoFiles

    %% Click events
    click tasks "https://github.com/robocorp/example-use-git-submodule-for-shared-code/blob/main/tasks.robot"
    click robotcfg "https://github.com/robocorp/example-use-git-submodule-for-shared-code/blob/main/robot.yaml"
    click envcfg "https://github.com/robocorp/example-use-git-submodule-for-shared-code/blob/main/conda.yaml"
    click gitmod "https://github.com/robocorp/example-use-git-submodule-for-shared-code/blob/main/.gitmodules"
    click readme "https://github.com/robocorp/example-use-git-submodule-for-shared-code/blob/main/README.md"
    click shared "https://github.com/robocorp/example-use-git-submodule-for-shared-code/tree/main/shared/"
    click gitignore "https://github.com/robocorp/example-use-git-submodule-for-shared-code/blob/main/.gitignore"

    %% Styles
    classDef actor fill:#AED6F1,stroke:#1F618D,color:#1F618D
    classDef external fill:#E8DAEF,stroke:#6C3483,color:#6C3483
    classDef repo fill:#FAD7A0,stroke:#B9770E,color:#7D6608
    classDef code fill:#F5B7B1,stroke:#943126,color:#641E16
    classDef runtime fill:#ABEBC6,stroke:#229954,color:#145A32
```
