# codemastersolutions/docker-terminal architecture

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

- Interactive diagram: https://gitdiagram.com/codemastersolutions/docker-terminal
- Repository: https://github.com/codemastersolutions/docker-terminal

## Overview

This VS Code extension provides two routes into Docker workloads: browse host containers or discover Compose services, then start/manage them and open an interactive shell or logs terminal. The graph separates discovery and views, orchestration, Docker execution, and terminal support. Relationships marked from source excerpts or the README are shown; unsampled details are not inferred beyond those documented capabilities.

Main entry points: [`src/extension.ts`](https://github.com/codemastersolutions/docker-terminal/blob/main/src/extension.ts) (Extension Commands), [`src/docker/client.ts`](https://github.com/codemastersolutions/docker-terminal/blob/main/src/docker/client.ts) (Docker Client), [`src/compose/provider.ts`](https://github.com/codemastersolutions/docker-terminal/blob/main/src/compose/provider.ts) (Compose Services View), [`src/containers/provider.ts`](https://github.com/codemastersolutions/docker-terminal/blob/main/src/containers/provider.ts) (Containers View)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_views["Workspace Views"]
  node_compose_parser["Compose Discovery<br/>[parser.ts]"]
  node_compose_provider["Compose Services View<br/>[provider.ts]"]
  node_container_provider["Containers View<br/>[provider.ts]"]
  node_status_bar["Info Status Bar<br/>[statusBar.ts]"]
end

subgraph group_orchestration["Command Orchestration"]
  node_extension["Extension Commands<br/>[extension.ts]"]
  node_validation["Input Validation<br/>[validation.ts]"]
  node_scripts["Script Discovery<br/>[scripts.ts]"]
end

subgraph group_docker["Docker Runtime"]
  node_docker_client["Docker Client<br/>[client.ts]"]
  node_shell_detect["Default Shell Detection<br/>[shell.ts]"]
end

subgraph group_terminal["Terminal Support"]
  node_terminal_manager["Terminal Manager<br/>[manager.ts]"]
  node_clear_command["Host Clear Command<br/>[clearCommand.ts]"]
end

node_user(("VS Code User"))
node_workspace["Compose Files"]
node_docker_service{{"Docker CLI / Engine"}}

node_user -->|"invokes commands"| node_extension
node_extension -->|"discovers and parses"| node_compose_parser
node_workspace -->|"provides YAML"| node_compose_parser
node_extension -->|"registers view"| node_compose_provider
node_extension -->|"registers view"| node_container_provider
node_compose_provider -->|"loads services"| node_compose_parser
node_compose_provider -->|"reads service states"| node_docker_client
node_container_provider -->|"lists containers"| node_docker_client
node_container_provider -->|"loads scripts"| node_scripts
node_compose_provider -->|"discovers service scripts"| node_scripts
node_extension -->|"manages workloads"| node_docker_client
node_docker_client -->|"runs Docker commands"| node_docker_service
node_extension -->|"probes container shell"| node_shell_detect
node_shell_detect -->|"executes shell probes"| node_docker_client
node_extension -->|"opens shell terminals"| node_terminal_manager
node_terminal_manager -->|"executes interactive shell"| node_docker_service
node_terminal_manager -->|"wraps commands with"| node_clear_command
node_extension -->|"validates command inputs"| node_validation
node_extension -->|"creates status item"| node_status_bar
node_user -->|"selects service"| node_compose_provider
node_user -->|"selects container"| node_container_provider
node_extension -->|"starts and tails logs"| node_docker_client

click node_compose_parser "https://github.com/codemastersolutions/docker-terminal/blob/main/src/compose/parser.ts"
click node_compose_provider "https://github.com/codemastersolutions/docker-terminal/blob/main/src/compose/provider.ts"
click node_container_provider "https://github.com/codemastersolutions/docker-terminal/blob/main/src/containers/provider.ts"
click node_extension "https://github.com/codemastersolutions/docker-terminal/blob/main/src/extension.ts"
click node_validation "https://github.com/codemastersolutions/docker-terminal/blob/main/src/compose/validation.ts"
click node_scripts "https://github.com/codemastersolutions/docker-terminal/blob/main/src/containers/scripts.ts"
click node_docker_client "https://github.com/codemastersolutions/docker-terminal/blob/main/src/docker/client.ts"
click node_shell_detect "https://github.com/codemastersolutions/docker-terminal/blob/main/src/docker/shell.ts"
click node_terminal_manager "https://github.com/codemastersolutions/docker-terminal/blob/main/src/terminals/manager.ts"
click node_clear_command "https://github.com/codemastersolutions/docker-terminal/blob/main/src/host/clearCommand.ts"
click node_status_bar "https://github.com/codemastersolutions/docker-terminal/blob/main/src/info/statusBar.ts"

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_compose_parser,node_compose_provider,node_container_provider,node_status_bar,node_user toneBlue
class node_extension,node_validation,node_scripts toneAmber
class node_docker_client,node_shell_detect toneMint
class node_terminal_manager,node_clear_command toneRose
class node_workspace,node_docker_service toneIndigo
```

## Components

### Workspace Views

- [Compose Discovery](https://github.com/codemastersolutions/docker-terminal/blob/main/src/compose/parser.ts): `src/compose/parser.ts`
- [Compose Services View](https://github.com/codemastersolutions/docker-terminal/blob/main/src/compose/provider.ts): `src/compose/provider.ts`
- [Containers View](https://github.com/codemastersolutions/docker-terminal/blob/main/src/containers/provider.ts): `src/containers/provider.ts`
- [Info Status Bar](https://github.com/codemastersolutions/docker-terminal/blob/main/src/info/statusBar.ts): `src/info/statusBar.ts`

### Command Orchestration

- [Extension Commands](https://github.com/codemastersolutions/docker-terminal/blob/main/src/extension.ts): `src/extension.ts`
- [Input Validation](https://github.com/codemastersolutions/docker-terminal/blob/main/src/compose/validation.ts): `src/compose/validation.ts`
- [Script Discovery](https://github.com/codemastersolutions/docker-terminal/blob/main/src/containers/scripts.ts): `src/containers/scripts.ts`

### Docker Runtime

- [Docker Client](https://github.com/codemastersolutions/docker-terminal/blob/main/src/docker/client.ts): `src/docker/client.ts`
- [Default Shell Detection](https://github.com/codemastersolutions/docker-terminal/blob/main/src/docker/shell.ts): `src/docker/shell.ts`

### Terminal Support

- [Terminal Manager](https://github.com/codemastersolutions/docker-terminal/blob/main/src/terminals/manager.ts): `src/terminals/manager.ts`
- [Host Clear Command](https://github.com/codemastersolutions/docker-terminal/blob/main/src/host/clearCommand.ts): `src/host/clearCommand.ts`

### Other components

- **VS Code User**
- **Compose Files**
- **Docker CLI / Engine**

## Connections

- VS Code User → Extension Commands: invokes commands (evidence: `README.md`)
- Extension Commands → Compose Discovery: discovers and parses (evidence: `src/extension.ts`)
- Compose Files → Compose Discovery: provides YAML (evidence: `src/compose/parser.ts`)
- Extension Commands → Compose Services View: registers view (evidence: `README.md`)
- Extension Commands → Containers View: registers view (evidence: `README.md`)
- Compose Services View → Compose Discovery: loads services (evidence: `src/compose/provider.ts`)
- Compose Services View → Docker Client: reads service states (evidence: `src/compose/provider.ts`)
- Containers View → Docker Client: lists containers (evidence: `src/containers/provider.ts`)
- Containers View → Script Discovery: loads scripts (evidence: `src/containers/provider.ts`)
- Compose Services View → Script Discovery: discovers service scripts (evidence: `src/compose/provider.ts`)
- Extension Commands → Docker Client: manages workloads (evidence: `src/extension.ts`)
- Docker Client → Docker CLI / Engine: runs Docker commands (evidence: `src/docker/client.ts`)
- Extension Commands → Default Shell Detection: probes container shell (evidence: `src/extension.ts`)
- Default Shell Detection → Docker Client: executes shell probes (evidence: `src/docker/shell.ts`)
- Extension Commands → Terminal Manager: opens shell terminals (evidence: `src/extension.ts`)
- Terminal Manager → Docker CLI / Engine: executes interactive shell (evidence: `README.md`)
- Terminal Manager → Host Clear Command: wraps commands with (evidence: `src/terminals/manager.ts`)
- Extension Commands → Input Validation: validates command inputs (evidence: `src/extension.ts`)
- Extension Commands → Info Status Bar: creates status item (evidence: `src/info/statusBar.ts`)
- VS Code User → Compose Services View: selects service (evidence: `README.md`)
- VS Code User → Containers View: selects container (evidence: `README.md`)
- Extension Commands → Docker Client: starts and tails logs (evidence: `README.md`)
