# protonium04/team_11_g_docksmith architecture

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

- Interactive diagram: https://gitdiagram.com/protonium04/team_11_g_docksmith
- Repository: https://github.com/protonium04/team_11_g_docksmith

## Overview

Docksmith is documented as a local, daemonless Docker-like CLI. The principal workflow is build: parse a Docksmithfile, apply instructions to an image, use the cache for COPY/RUN steps, then store a manifest and layers; users can later list or remove images, or run one in an isolated process. The README also documents state management, reproducible layers, and shared isolation for build-time RUN and runtime execution. Only README.md is present, so implementation paths and source-level call relationships are unavailable; edges reflect documented relationships only.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and State"]
  node_commands["Command dispatch"]
  node_image_ops["Image operations"]
  node_manifest_store[("Image manifests")]
end

subgraph group_build["Image Build"]
  node_build_engine["Build orchestration"]
  node_file_parser["Docksmithfile parser"]
  node_copy_step["COPY step"]
  node_run_step["Build RUN step"]
  node_config_steps["Build config steps"]
end

subgraph group_cache["Cache and Layers"]
  node_build_cache[("Build cache")]
  node_layer_store[("Layer store")]
end

subgraph group_runtime["Container Runtime"]
  node_image_assembler["Filesystem assembly"]
  node_isolation["Linux isolation"]
  node_container_process["Container process"]
end

node_user(("CLI user"))
node_host_os{{"Linux OS"}}

node_user -->|"invokes"| node_commands
node_commands -->|"dispatches build"| node_build_engine
node_commands -->|"dispatches image commands"| node_image_ops
node_commands -->|"dispatches run"| node_image_assembler
node_image_ops -->|"lists and removes"| node_manifest_store
node_image_ops -->|"removes referenced layers"| node_layer_store
node_build_engine -->|"parses instructions"| node_file_parser
node_build_engine -->|"loads base image"| node_manifest_store
node_build_engine -->|"stores manifest"| node_manifest_store
node_build_engine -->|"checks cache"| node_build_cache
node_build_engine -->|"stores layers"| node_layer_store
node_file_parser -->|"selects COPY"| node_copy_step
node_file_parser -->|"selects RUN"| node_run_step
node_file_parser -->|"applies config"| node_config_steps
node_copy_step -->|"checks step cache"| node_build_cache
node_run_step -->|"checks step cache"| node_build_cache
node_copy_step -->|"writes delta layer"| node_layer_store
node_run_step -->|"executes command in"| node_isolation
node_run_step -->|"writes delta layer"| node_layer_store
node_image_assembler -->|"extracts layers"| node_layer_store
node_image_assembler -->|"provides root filesystem"| node_isolation
node_isolation -->|"runs isolated"| node_container_process
node_isolation -->|"uses primitives"| node_host_os

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_commands,node_image_ops,node_manifest_store,node_user toneBlue
class node_build_engine,node_file_parser,node_copy_step,node_run_step,node_config_steps toneAmber
class node_build_cache,node_layer_store toneMint
class node_image_assembler,node_isolation,node_container_process toneRose
class node_host_os toneIndigo
```

## Components

### CLI and State

- **Command dispatch**
- **Image operations**
- **Image manifests**

### Image Build

- **Build orchestration**
- **Docksmithfile parser**
- **COPY step**
- **Build RUN step**
- **Build config steps**

### Cache and Layers

- **Build cache**
- **Layer store**

### Container Runtime

- **Filesystem assembly**
- **Linux isolation**
- **Container process**

### Other components

- **CLI user**
- **Linux OS**

## Connections

- CLI user → Command dispatch: invokes (evidence: `README.md`)
- Command dispatch → Build orchestration: dispatches build (evidence: `README.md`)
- Command dispatch → Image operations: dispatches image commands (evidence: `README.md`)
- Command dispatch → Filesystem assembly: dispatches run (evidence: `README.md`)
- Image operations → Image manifests: lists and removes (evidence: `README.md`)
- Image operations → Layer store: removes referenced layers (evidence: `README.md`)
- Build orchestration → Docksmithfile parser: parses instructions (evidence: `README.md`)
- Build orchestration → Image manifests: loads base image (evidence: `README.md`)
- Build orchestration → Image manifests: stores manifest (evidence: `README.md`)
- Build orchestration → Build cache: checks cache (evidence: `README.md`)
- Build orchestration → Layer store: stores layers (evidence: `README.md`)
- Docksmithfile parser → COPY step: selects COPY (evidence: `README.md`)
- Docksmithfile parser → Build RUN step: selects RUN (evidence: `README.md`)
- Docksmithfile parser → Build config steps: applies config (evidence: `README.md`)
- COPY step → Build cache: checks step cache (evidence: `README.md`)
- Build RUN step → Build cache: checks step cache (evidence: `README.md`)
- COPY step → Layer store: writes delta layer (evidence: `README.md`)
- Build RUN step → Linux isolation: executes command in (evidence: `README.md`)
- Build RUN step → Layer store: writes delta layer (evidence: `README.md`)
- Filesystem assembly → Layer store: extracts layers (evidence: `README.md`)
- Filesystem assembly → Linux isolation: provides root filesystem (evidence: `README.md`)
- Linux isolation → Container process: runs isolated (evidence: `README.md`)
- Linux isolation → Linux OS: uses primitives (evidence: `README.md`)
