# arthur-hfq/mkb-grid architecture

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

- Interactive diagram: https://gitdiagram.com/arthur-hfq/mkb-grid
- Repository: https://github.com/arthur-hfq/mkb-grid

## Overview

mkb-grid is a Bash terminal dashboard for managing local Docker development services. The documented workflow starts with the user launching the script, then navigating the dashboard to deploy or control services, manage networks and storage, and export or clean up the grid. The README documents these capabilities but no source excerpts were provided, so internal implementation details and undocumented call relationships are omitted.

Main entry points: [`bin/mkb-grid`](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid) (Services dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Terminal interface"]
  node_cli["mkb-grid CLI"]
  node_dashboard["Services dashboard"]
end

subgraph group_services["Service management"]
  node_service_catalog["Service catalog"]
  node_port_discovery["Port discovery"]
  node_service_control["Service control"]
  node_resource_limits["Resource limits"]
end

subgraph group_topology["Network topology"]
  node_networks["Network management"]
  node_panorama["Panorama logs"]
end

subgraph group_state["Storage and exports"]
  node_btrfs["Btrfs snapshots"]
  node_volume_store[("Persistent volumes")]
  node_tag_store[("Metadata tags")]
  node_compose_export["Compose export"]
  node_prune_reset["Prune and reset"]
end

node_user(("Operator"))
node_docker["Docker Engine"]
node_ss["Host socket scan"]
node_working_directory["Current directory"]

node_user -->|"launches"| node_cli
node_cli -->|"opens"| node_dashboard
node_dashboard -->|"offers deployment"| node_service_catalog
node_dashboard -->|"opens panel"| node_service_control
node_dashboard -->|"offers management"| node_networks
node_dashboard -->|"offers snapshots"| node_btrfs
node_dashboard -->|"offers export"| node_compose_export
node_dashboard -->|"offers cleanup"| node_prune_reset
node_service_catalog -->|"assigns ports"| node_port_discovery
node_port_discovery -->|"scans sockets"| node_ss
node_port_discovery -->|"checks mappings"| node_docker
node_service_catalog -->|"provisions services"| node_docker
node_service_control -->|"controls containers"| node_docker
node_resource_limits -->|"sets constraints"| node_docker
node_networks -->|"manages networks"| node_docker
node_panorama -->|"streams logs"| node_docker
node_btrfs -->|"snapshots data"| node_volume_store
node_service_catalog -->|"stores tags"| node_tag_store
node_networks -->|"stores tags"| node_tag_store
node_compose_export -->|"reads grid state"| node_docker
node_compose_export -->|"writes Compose file"| node_working_directory
node_prune_reset -->|"cleans resources"| node_docker

click node_cli "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_dashboard "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_service_catalog "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_port_discovery "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_service_control "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_resource_limits "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_networks "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_panorama "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_btrfs "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_compose_export "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"
click node_prune_reset "https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid"

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_cli,node_dashboard toneBlue
class node_service_catalog,node_port_discovery,node_service_control,node_resource_limits toneAmber
class node_networks,node_panorama toneMint
class node_btrfs,node_volume_store,node_tag_store,node_compose_export,node_prune_reset toneRose
class node_user,node_docker,node_ss,node_working_directory toneIndigo
```

## Components

### Terminal interface

- [mkb-grid CLI](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`
- [Services dashboard](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`

### Service management

- [Service catalog](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`
- [Port discovery](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`
- [Service control](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`
- [Resource limits](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`

### Network topology

- [Network management](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`
- [Panorama logs](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`

### Storage and exports

- [Btrfs snapshots](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`
- **Persistent volumes**
- **Metadata tags**
- [Compose export](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`
- [Prune and reset](https://github.com/arthur-hfq/mkb-grid/blob/main/bin/mkb-grid): `bin/mkb-grid`

### Other components

- **Operator**
- **Docker Engine**
- **Host socket scan**
- **Current directory**

## Connections

- Operator → mkb-grid CLI: launches (evidence: `README.md`)
- mkb-grid CLI → Services dashboard: opens (evidence: `README.md`)
- Services dashboard → Service catalog: offers deployment (evidence: `README.md`)
- Services dashboard → Service control: opens panel (evidence: `README.md`)
- Services dashboard → Network management: offers management (evidence: `README.md`)
- Services dashboard → Btrfs snapshots: offers snapshots (evidence: `README.md`)
- Services dashboard → Compose export: offers export (evidence: `README.md`)
- Services dashboard → Prune and reset: offers cleanup (evidence: `README.md`)
- Service catalog → Port discovery: assigns ports (evidence: `README.md`)
- Port discovery → Host socket scan: scans sockets (evidence: `README.md`)
- Port discovery → Docker Engine: checks mappings (evidence: `README.md`)
- Service catalog → Docker Engine: provisions services (evidence: `README.md`)
- Service control → Docker Engine: controls containers (evidence: `README.md`)
- Resource limits → Docker Engine: sets constraints (evidence: `README.md`)
- Network management → Docker Engine: manages networks (evidence: `README.md`)
- Panorama logs → Docker Engine: streams logs (evidence: `README.md`)
- Btrfs snapshots → Persistent volumes: snapshots data (evidence: `README.md`)
- Service catalog → Metadata tags: stores tags (evidence: `README.md`)
- Network management → Metadata tags: stores tags (evidence: `README.md`)
- Compose export → Docker Engine: reads grid state (evidence: `README.md`)
- Compose export → Current directory: writes Compose file (evidence: `README.md`)
- Prune and reset → Docker Engine: cleans resources (evidence: `README.md`)
