# wardenenv/warden architecture

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

- Interactive diagram: https://gitdiagram.com/wardenenv/warden
- Repository: https://github.com/wardenenv/warden

## Overview

Warden is a CLI for orchestrating Docker-based local development environments. A developer invokes the CLI to manage a project environment; environment definitions describe application stacks, while shared services support routing and access across concurrently running environments. The README documents these capabilities, but no source excerpts were provided, so links show only documented orchestration and service behavior—not unverified command-level wiring.

Main entry points: [`bin/warden`](https://github.com/wardenenv/warden/blob/main/bin/warden) (Warden CLI), [`environments`](https://github.com/wardenenv/warden/tree/main/environments) (Environment definitions), [`config/traefik/traefik.yml`](https://github.com/wardenenv/warden/blob/main/config/traefik/traefik.yml) (Traefik routing), [`docker/docker-compose.yml`](https://github.com/wardenenv/warden/blob/main/docker/docker-compose.yml) (Docker Compose services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and utilities"]
  node_warden["Warden CLI"]
  node_commands["CLI commands"]
  node_utilities["Shell utilities"]
end

subgraph group_envs["Project environments"]
  node_envdefs["Environment definitions"]
  node_frameworks["Framework stacks"]
  node_sharedincludes["Shared service definitions"]
  node_database[("Database containers<br/>[db.base.yml]")]
end

subgraph group_shared["Shared infrastructure"]
  node_compose["Docker Compose services<br/>[docker-compose.yml]"]
  node_traefik["Traefik routing<br/>[traefik.yml]"]
  node_dnsmasq["Dnsmasq"]
  node_portainer["Portainer"]
end

subgraph group_access["Local access"]
  node_tunnel["Database SSH tunnel<br/>[docker-compose.yml]"]
  node_certificates["Wildcard certificates"]
  node_domains(("Local domains"))
end

node_developer(("Developer"))
node_dockerhost["Docker host"]

node_developer -->|"invokes"| node_warden
node_warden -->|"dispatches"| node_commands
node_warden -->|"uses"| node_utilities
node_warden -->|"orchestrates"| node_envdefs
node_envdefs -->|"defines stacks"| node_frameworks
node_envdefs -->|"uses definitions"| node_sharedincludes
node_warden -->|"orchestrates"| node_compose
node_compose -->|"deploys services"| node_dockerhost
node_dockerhost -->|"runs"| node_traefik
node_traefik -->|"routes requests"| node_domains
node_dockerhost -->|"runs"| node_dnsmasq
node_dnsmasq -->|"resolves"| node_domains
node_dockerhost -->|"runs"| node_portainer
node_dockerhost -->|"runs"| node_database
node_tunnel -->|"connects to"| node_database
node_certificates -->|"provides TLS"| node_traefik

click node_warden "https://github.com/wardenenv/warden/blob/main/bin/warden"
click node_commands "https://github.com/wardenenv/warden/tree/main/commands"
click node_utilities "https://github.com/wardenenv/warden/tree/main/utils"
click node_envdefs "https://github.com/wardenenv/warden/tree/main/environments"
click node_frameworks "https://github.com/wardenenv/warden/tree/main/environments"
click node_sharedincludes "https://github.com/wardenenv/warden/tree/main/environments/includes"
click node_compose "https://github.com/wardenenv/warden/blob/main/docker/docker-compose.yml"
click node_traefik "https://github.com/wardenenv/warden/blob/main/config/traefik/traefik.yml"
click node_dnsmasq "https://github.com/wardenenv/warden/blob/main/docker/docker-compose.dnsmasq.yml"
click node_portainer "https://github.com/wardenenv/warden/blob/main/docker/docker-compose.portainer.yml"
click node_database "https://github.com/wardenenv/warden/blob/main/environments/includes/db.base.yml"
click node_tunnel "https://github.com/wardenenv/warden/blob/main/docker/docker-compose.yml"
click node_certificates "https://github.com/wardenenv/warden/tree/main/config/openssl"

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_warden,node_commands,node_utilities toneBlue
class node_envdefs,node_frameworks,node_sharedincludes,node_database toneAmber
class node_compose,node_traefik,node_dnsmasq,node_portainer toneMint
class node_tunnel,node_certificates,node_domains toneRose
class node_developer,node_dockerhost toneIndigo
```

## Components

### CLI and utilities

- [Warden CLI](https://github.com/wardenenv/warden/blob/main/bin/warden): `bin/warden`
- [CLI commands](https://github.com/wardenenv/warden/tree/main/commands): `commands`
- [Shell utilities](https://github.com/wardenenv/warden/tree/main/utils): `utils`

### Project environments

- [Environment definitions](https://github.com/wardenenv/warden/tree/main/environments): `environments`
- [Framework stacks](https://github.com/wardenenv/warden/tree/main/environments): `environments`
- [Shared service definitions](https://github.com/wardenenv/warden/tree/main/environments/includes): `environments/includes`
- [Database containers](https://github.com/wardenenv/warden/blob/main/environments/includes/db.base.yml): `environments/includes/db.base.yml`

### Shared infrastructure

- [Docker Compose services](https://github.com/wardenenv/warden/blob/main/docker/docker-compose.yml): `docker/docker-compose.yml`
- [Traefik routing](https://github.com/wardenenv/warden/blob/main/config/traefik/traefik.yml): `config/traefik/traefik.yml`
- [Dnsmasq](https://github.com/wardenenv/warden/blob/main/docker/docker-compose.dnsmasq.yml): `docker/docker-compose.dnsmasq.yml`
- [Portainer](https://github.com/wardenenv/warden/blob/main/docker/docker-compose.portainer.yml): `docker/docker-compose.portainer.yml`

### Local access

- [Database SSH tunnel](https://github.com/wardenenv/warden/blob/main/docker/docker-compose.yml): `docker/docker-compose.yml`
- [Wildcard certificates](https://github.com/wardenenv/warden/tree/main/config/openssl): `config/openssl`
- **Local domains**

### Other components

- **Developer**
- **Docker host**

## Connections

- Developer → Warden CLI: invokes
- Warden CLI → CLI commands: dispatches
- Warden CLI → Shell utilities: uses
- Warden CLI → Environment definitions: orchestrates
- Environment definitions → Framework stacks: defines stacks
- Environment definitions → Shared service definitions: uses definitions
- Warden CLI → Docker Compose services: orchestrates
- Docker Compose services → Docker host: deploys services
- Docker host → Traefik routing: runs
- Traefik routing → Local domains: routes requests
- Docker host → Dnsmasq: runs
- Dnsmasq → Local domains: resolves
- Docker host → Portainer: runs
- Docker host → Database containers: runs
- Database SSH tunnel → Database containers: connects to
- Wildcard certificates → Traefik routing: provides TLS
