# tyler36/ddev-vscode-devcontainer architecture

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

- Interactive diagram: https://gitdiagram.com/tyler36/ddev-vscode-devcontainer
- Repository: https://github.com/tyler36/ddev-vscode-devcontainer

## Overview

This small DDEV add-on exposes a host command that opens a running project container in VS Code. The documented workflow starts with `ddev code`; `-d`, `-db`, or `--database` selects the database container instead of the web container. The command assumes VS Code’s `code` executable is available, and the README lists the Dev Containers extension as a requirement. No source excerpts were provided, so relationships shown here rely on README statements only.

Main entry points: [`commands/host/code`](https://github.com/tyler36/ddev-vscode-devcontainer/blob/main/commands/host/code) (Host command)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Developer"))
node_ddev["DDEV CLI"]
node_command["Host command"]
node_containers["DDEV containers"]
node_vscode["VS Code"]
node_devcontainers["Dev Containers"]

node_user -->|"runs command"| node_ddev
node_ddev -->|"dispatches"| node_command
node_command -->|"opens selected"| node_containers
node_command -->|"opens in"| node_vscode
node_devcontainers -.->|"extends"| node_vscode

click node_command "https://github.com/tyler36/ddev-vscode-devcontainer/blob/main/commands/host/code"

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_user,node_ddev,node_containers,node_vscode,node_devcontainers toneIndigo
class node_command toneTeal
```

## Components

### Other components

- **Developer**
- **DDEV CLI**
- [Host command](https://github.com/tyler36/ddev-vscode-devcontainer/blob/main/commands/host/code): `commands/host/code`
- **DDEV containers**
- **VS Code**
- **Dev Containers**

## Connections

- Developer → DDEV CLI: runs command (evidence: `README.md`)
- DDEV CLI → Host command: dispatches (evidence: `README.md`)
- Host command → DDEV containers: opens selected (evidence: `README.md`)
- Host command → VS Code: opens in (evidence: `README.md`)
- Dev Containers → VS Code: extends (evidence: `README.md`)
