# andrewhughes101/grub architecture

> Architecture diagram of the GitHub repository andrewhughes101/grub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andrewhughes101/grub
- Repository: https://github.com/andrewhughes101/grub

## Overview

GRUB is a command-line tool for building a local Git repository on a remote server without changing the local working tree. The main workflow stages local changes, synchronizes commits and a patch, runs the remote build, and retrieves its output. Configuration features include Ansible-style inventory and build environment variables. Relationships below are based on the README; source excerpts were not available, so implementation details beyond documented behavior are omitted.

Main entry points: [`bin/grub_client`](https://github.com/andrewhughes101/grub/blob/main/bin/grub_client) (GRUB Client), [`bin/grub_server`](https://github.com/andrewhughes101/grub/blob/main/bin/grub_server) (Remote Server), [`bin/grub_yaml`](https://github.com/andrewhughes101/grub/blob/main/bin/grub_yaml) (YAML Processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Local Client"]
  node_client["GRUB Client"]
end

subgraph group_sync["Repository Sync"]
  node_patch["Change Patch"]
  node_git["Git Transport"]
  node_remote_repo[("Remote Repository")]
end

subgraph group_remote["Remote Build"]
  node_server["Remote Server"]
  node_build["Build Command"]
  node_artifacts["Build Output"]
end

subgraph group_config["Configuration"]
  node_inventory["Inventory Config"]
  node_extra_vars["Extra Vars"]
  node_yaml["YAML Processing"]
end

node_developer(("Developer"))
node_output(("Developer Terminal"))

node_developer -->|"runs"| node_client
node_client -->|"creates"| node_patch
node_client -->|"pushes commits"| node_git
node_git -->|"transfers commits"| node_remote_repo
node_client -->|"transfers patch"| node_server
node_server -->|"applies"| node_patch
node_server -->|"runs"| node_build
node_server -->|"downloads output"| node_artifacts
node_artifacts -->|"prints optionally"| node_output
node_developer -->|"provides"| node_inventory
node_inventory -->|"configures host"| node_client
node_developer -->|"provides"| node_extra_vars
node_extra_vars -->|"configures build"| node_client
node_client -.->|"processes YAML"| node_yaml

click node_client "https://github.com/andrewhughes101/grub/blob/main/bin/grub_client"
click node_patch "https://github.com/andrewhughes101/grub/blob/main/bin/grub_client"
click node_server "https://github.com/andrewhughes101/grub/blob/main/bin/grub_server"
click node_build "https://github.com/andrewhughes101/grub/blob/main/bin/grub_server"
click node_artifacts "https://github.com/andrewhughes101/grub/blob/main/bin/grub_server"
click node_inventory "https://github.com/andrewhughes101/grub/blob/main/bin/grub_client"
click node_extra_vars "https://github.com/andrewhughes101/grub/blob/main/bin/grub_client"
click node_yaml "https://github.com/andrewhughes101/grub/blob/main/bin/grub_yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client toneBlue
class node_patch,node_git,node_remote_repo toneAmber
class node_server,node_build,node_artifacts toneMint
class node_inventory,node_extra_vars,node_yaml toneRose
class node_developer,node_output toneIndigo
```

## Components

### Local Client

- [GRUB Client](https://github.com/andrewhughes101/grub/blob/main/bin/grub_client): `bin/grub_client`

### Repository Sync

- [Change Patch](https://github.com/andrewhughes101/grub/blob/main/bin/grub_client): `bin/grub_client`
- **Git Transport**
- **Remote Repository**

### Remote Build

- [Remote Server](https://github.com/andrewhughes101/grub/blob/main/bin/grub_server): `bin/grub_server`
- [Build Command](https://github.com/andrewhughes101/grub/blob/main/bin/grub_server): `bin/grub_server`
- [Build Output](https://github.com/andrewhughes101/grub/blob/main/bin/grub_server): `bin/grub_server`

### Configuration

- [Inventory Config](https://github.com/andrewhughes101/grub/blob/main/bin/grub_client): `bin/grub_client`
- [Extra Vars](https://github.com/andrewhughes101/grub/blob/main/bin/grub_client): `bin/grub_client`
- [YAML Processing](https://github.com/andrewhughes101/grub/blob/main/bin/grub_yaml): `bin/grub_yaml`

### Other components

- **Developer**
- **Developer Terminal**

## Connections

- Developer → GRUB Client: runs (evidence: `README.md`)
- GRUB Client → Change Patch: creates (evidence: `README.md`)
- GRUB Client → Git Transport: pushes commits (evidence: `README.md`)
- Git Transport → Remote Repository: transfers commits (evidence: `README.md`)
- GRUB Client → Remote Server: transfers patch (evidence: `README.md`)
- Remote Server → Change Patch: applies (evidence: `README.md`)
- Remote Server → Build Command: runs (evidence: `README.md`)
- Remote Server → Build Output: downloads output (evidence: `README.md`)
- Build Output → Developer Terminal: prints optionally (evidence: `README.md`)
- Developer → Inventory Config: provides (evidence: `README.md`)
- Inventory Config → GRUB Client: configures host (evidence: `README.md`)
- Developer → Extra Vars: provides (evidence: `README.md`)
- Extra Vars → GRUB Client: configures build (evidence: `README.md`)
- GRUB Client → YAML Processing: processes YAML
