# louislam/dockge architecture

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

- Interactive diagram: https://gitdiagram.com/louislam/dockge
- Repository: https://github.com/louislam/dockge

## Overview

Dockge is a self-hosted, file-based Docker Compose stack manager. Users browse or edit stacks, perform Compose lifecycle actions, and follow live progress or terminal output; administrators also configure access and connect remote agents. The map preserves the documented image-update, command-to-Compose, and multi-agent capabilities, though their specific implementation paths are not established by the excerpts. Several frontend-to-server relationships are therefore shown as unverified rather than inferred from module names.

Main entry points: [`frontend/src/router.ts`](https://github.com/louislam/dockge/blob/master/frontend/src/router.ts) (Page routing), [`backend/dockge-server.ts`](https://github.com/louislam/dockge/blob/master/backend/dockge-server.ts) (Dockge server), [`backend/stack.ts`](https://github.com/louislam/dockge/blob/master/backend/stack.ts) (Compose stack), [`frontend/src/main.ts`](https://github.com/louislam/dockge/blob/master/frontend/src/main.ts) (Vue application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web interface"]
  node_app["Vue application<br/>[main.ts]"]
  node_routes["Page routing<br/>[router.ts]"]
  node_dashboard["Stack dashboard<br/>[DashboardHome.vue]"]
  node_compose_ui["Compose editor<br/>[Compose.vue]"]
  node_terminal_ui["Terminal views<br/>[Terminal.vue]"]
  node_settings_ui["Settings pages<br/>[Settings.vue]"]
  node_socket_client["Socket client<br/>[socket.ts]"]
end

subgraph group_server["Server and access"]
  node_server["Dockge server<br/>[dockge-server.ts]"]
  node_main_socket["Main socket actions"]
  node_database[("Application database<br/>[database.ts]")]
  node_settings["Server settings<br/>[settings.ts]"]
  node_users["User accounts<br/>[user.ts]"]
end

subgraph group_stacks["Stack operations"]
  node_docker_actions["Stack socket actions"]
  node_stack["Compose stack<br/>[stack.ts]"]
  node_common["Compose utilities<br/>[util-common.ts]"]
  node_compose_convert["docker run conversion"]
  node_image_update["Image updates"]
end

subgraph group_realtime["Agents and terminals"]
  node_agent_manager["Agent connections<br/>[agent-manager.ts]"]
  node_agent_proxy["Agent proxy actions"]
  node_agent_docker["Agent Docker actions"]
  node_agent_terminal["Agent terminal actions"]
  node_terminal["Terminal sessions<br/>[terminal.ts]"]
end

node_user(("Operator"))
node_docker(("Docker Compose hosts"))

node_user -->|"uses"| node_app
node_app -->|"installs"| node_routes
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_compose_ui
node_routes -->|"routes to"| node_terminal_ui
node_routes -->|"routes to"| node_settings_ui
node_app -->|"mixes in"| node_socket_client
node_user -->|"manages stacks"| node_dashboard
node_user -->|"edits Compose"| node_compose_ui
node_user -->|"opens terminal"| node_terminal_ui
node_socket_client -.->|"exchanges events"| node_server
node_server -->|"registers actions"| node_main_socket
node_server -->|"initializes"| node_database
node_main_socket -->|"authenticates"| node_users
node_main_socket -->|"updates"| node_settings
node_docker_actions -->|"invokes lifecycle"| node_stack
node_stack -->|"uses helpers"| node_common
node_docker_actions -->|"controls stacks"| node_docker
node_server -.->|"manages connections"| node_agent_manager
node_agent_proxy -.->|"proxies events"| node_agent_manager
node_agent_terminal -->|"creates sessions"| node_terminal
node_agent_docker -->|"dispatches actions"| node_stack
node_agent_terminal -.->|"opens terminals"| node_docker
node_user -->|"converts commands"| node_compose_convert
node_user -->|"updates images"| node_image_update
node_compose_convert -.->|"produces Compose"| node_stack
node_image_update -.->|"updates images"| node_docker

click node_app "https://github.com/louislam/dockge/blob/master/frontend/src/main.ts"
click node_routes "https://github.com/louislam/dockge/blob/master/frontend/src/router.ts"
click node_dashboard "https://github.com/louislam/dockge/blob/master/frontend/src/pages/DashboardHome.vue"
click node_compose_ui "https://github.com/louislam/dockge/blob/master/frontend/src/pages/Compose.vue"
click node_terminal_ui "https://github.com/louislam/dockge/blob/master/frontend/src/components/Terminal.vue"
click node_settings_ui "https://github.com/louislam/dockge/blob/master/frontend/src/pages/Settings.vue"
click node_socket_client "https://github.com/louislam/dockge/blob/master/frontend/src/mixins/socket.ts"
click node_server "https://github.com/louislam/dockge/blob/master/backend/dockge-server.ts"
click node_main_socket "https://github.com/louislam/dockge/blob/master/backend/socket-handlers/main-socket-handler.ts"
click node_database "https://github.com/louislam/dockge/blob/master/backend/database.ts"
click node_settings "https://github.com/louislam/dockge/blob/master/backend/settings.ts"
click node_users "https://github.com/louislam/dockge/blob/master/backend/models/user.ts"
click node_docker_actions "https://github.com/louislam/dockge/blob/master/backend/agent-socket-handlers/docker-socket-handler.ts"
click node_stack "https://github.com/louislam/dockge/blob/master/backend/stack.ts"
click node_common "https://github.com/louislam/dockge/blob/master/common/util-common.ts"
click node_agent_manager "https://github.com/louislam/dockge/blob/master/backend/agent-manager.ts"
click node_agent_proxy "https://github.com/louislam/dockge/blob/master/backend/socket-handlers/agent-proxy-socket-handler.ts"
click node_agent_docker "https://github.com/louislam/dockge/blob/master/backend/agent-socket-handlers/docker-socket-handler.ts"
click node_agent_terminal "https://github.com/louislam/dockge/blob/master/backend/agent-socket-handlers/terminal-socket-handler.ts"
click node_terminal "https://github.com/louislam/dockge/blob/master/backend/terminal.ts"
click node_compose_convert "https://github.com/louislam/dockge/tree/master/backend"
click node_image_update "https://github.com/louislam/dockge/tree/master/backend"

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_app,node_routes,node_dashboard,node_compose_ui,node_terminal_ui,node_settings_ui,node_socket_client toneBlue
class node_server,node_main_socket,node_database,node_settings,node_users toneAmber
class node_docker_actions,node_stack,node_common,node_compose_convert,node_image_update toneMint
class node_agent_manager,node_agent_proxy,node_agent_docker,node_agent_terminal,node_terminal toneRose
class node_user,node_docker toneIndigo
```

## Components

### Web interface

- [Vue application](https://github.com/louislam/dockge/blob/master/frontend/src/main.ts): `frontend/src/main.ts`
- [Page routing](https://github.com/louislam/dockge/blob/master/frontend/src/router.ts): `frontend/src/router.ts`
- [Stack dashboard](https://github.com/louislam/dockge/blob/master/frontend/src/pages/DashboardHome.vue): `frontend/src/pages/DashboardHome.vue`
- [Compose editor](https://github.com/louislam/dockge/blob/master/frontend/src/pages/Compose.vue): `frontend/src/pages/Compose.vue`
- [Terminal views](https://github.com/louislam/dockge/blob/master/frontend/src/components/Terminal.vue): `frontend/src/components/Terminal.vue`
- [Settings pages](https://github.com/louislam/dockge/blob/master/frontend/src/pages/Settings.vue): `frontend/src/pages/Settings.vue`
- [Socket client](https://github.com/louislam/dockge/blob/master/frontend/src/mixins/socket.ts): `frontend/src/mixins/socket.ts`

### Server and access

- [Dockge server](https://github.com/louislam/dockge/blob/master/backend/dockge-server.ts): `backend/dockge-server.ts`
- [Main socket actions](https://github.com/louislam/dockge/blob/master/backend/socket-handlers/main-socket-handler.ts): `backend/socket-handlers/main-socket-handler.ts`
- [Application database](https://github.com/louislam/dockge/blob/master/backend/database.ts): `backend/database.ts`
- [Server settings](https://github.com/louislam/dockge/blob/master/backend/settings.ts): `backend/settings.ts`
- [User accounts](https://github.com/louislam/dockge/blob/master/backend/models/user.ts): `backend/models/user.ts`

### Stack operations

- [Stack socket actions](https://github.com/louislam/dockge/blob/master/backend/agent-socket-handlers/docker-socket-handler.ts): `backend/agent-socket-handlers/docker-socket-handler.ts`
- [Compose stack](https://github.com/louislam/dockge/blob/master/backend/stack.ts): `backend/stack.ts`
- [Compose utilities](https://github.com/louislam/dockge/blob/master/common/util-common.ts): `common/util-common.ts`
- [docker run conversion](https://github.com/louislam/dockge/tree/master/backend): `backend`
- [Image updates](https://github.com/louislam/dockge/tree/master/backend): `backend`

### Agents and terminals

- [Agent connections](https://github.com/louislam/dockge/blob/master/backend/agent-manager.ts): `backend/agent-manager.ts`
- [Agent proxy actions](https://github.com/louislam/dockge/blob/master/backend/socket-handlers/agent-proxy-socket-handler.ts): `backend/socket-handlers/agent-proxy-socket-handler.ts`
- [Agent Docker actions](https://github.com/louislam/dockge/blob/master/backend/agent-socket-handlers/docker-socket-handler.ts): `backend/agent-socket-handlers/docker-socket-handler.ts`
- [Agent terminal actions](https://github.com/louislam/dockge/blob/master/backend/agent-socket-handlers/terminal-socket-handler.ts): `backend/agent-socket-handlers/terminal-socket-handler.ts`
- [Terminal sessions](https://github.com/louislam/dockge/blob/master/backend/terminal.ts): `backend/terminal.ts`

### Other components

- **Operator**
- **Docker Compose hosts**

## Connections

- Operator → Vue application: uses (evidence: `README.md`)
- Vue application → Page routing: installs (evidence: `frontend/src/main.ts`)
- Page routing → Stack dashboard: routes to (evidence: `frontend/src/router.ts`)
- Page routing → Compose editor: routes to (evidence: `frontend/src/router.ts`)
- Page routing → Terminal views: routes to (evidence: `frontend/src/router.ts`)
- Page routing → Settings pages: routes to (evidence: `frontend/src/router.ts`)
- Vue application → Socket client: mixes in (evidence: `frontend/src/main.ts`)
- Operator → Stack dashboard: manages stacks (evidence: `README.md`)
- Operator → Compose editor: edits Compose (evidence: `README.md`)
- Operator → Terminal views: opens terminal (evidence: `README.md`)
- Socket client → Dockge server: exchanges events
- Dockge server → Main socket actions: registers actions (evidence: `backend/dockge-server.ts`)
- Dockge server → Application database: initializes (evidence: `backend/dockge-server.ts`)
- Main socket actions → User accounts: authenticates (evidence: `backend/socket-handlers/main-socket-handler.ts`)
- Main socket actions → Server settings: updates (evidence: `backend/socket-handlers/main-socket-handler.ts`)
- Stack socket actions → Compose stack: invokes lifecycle (evidence: `backend/agent-socket-handlers/docker-socket-handler.ts`)
- Compose stack → Compose utilities: uses helpers (evidence: `backend/stack.ts`)
- Stack socket actions → Docker Compose hosts: controls stacks (evidence: `README.md`)
- Dockge server → Agent connections: manages connections (evidence: `backend/dockge-server.ts`)
- Agent proxy actions → Agent connections: proxies events
- Agent terminal actions → Terminal sessions: creates sessions (evidence: `backend/agent-socket-handlers/terminal-socket-handler.ts`)
- Agent Docker actions → Compose stack: dispatches actions (evidence: `backend/agent-socket-handlers/docker-socket-handler.ts`)
- Agent terminal actions → Docker Compose hosts: opens terminals
- Operator → docker run conversion: converts commands (evidence: `README.md`)
- Operator → Image updates: updates images (evidence: `README.md`)
- docker run conversion → Compose stack: produces Compose (evidence: `backend/agent-socket-handlers/docker-socket-handler.ts`)
- Image updates → Docker Compose hosts: updates images
