Files
pi-dashboard/docs/archify/pi-dashboard.architecture.json
Sam Rolfe 3b3e63afb9 docs: add architecture diagrams (Mermaid + Archify map) for pi-dashboard
- docs/pi-dashboard.mmd — Mermaid source of truth
- docs/diagrams/pi-dashboard.png|svg — rendered via mmdc (mermaid-cli 11.16.0)
- docs/archify/pi-dashboard.architecture.json — Archify JSON IR
- docs/pi-dashboard-map.html — interactive map (9/9 showcase checks)
- docs/README.md — embedded mermaid + artifact index + regenerate commands
- visual-check screenshots/evidence at 1440x900 + 2048x1320 (light/dark)

Generated by project-diagramming-mermaid + project-diagramming-archify skills.
2026-09-06 11:35:09 +10:00

236 lines
4.0 KiB
JSON

{
"schema_version": 1,
"diagram_type": "architecture",
"meta": {
"title": "Pi Dashboard",
"quality_profile": "showcase"
},
"components": [
{
"id": "ext",
"type": "backend",
"label": "dashboard.ts",
"sublabel": "pi extension",
"pos": [
40,
140
]
},
{
"id": "sf",
"type": "database",
"label": "state files",
"sublabel": "~/.pi/agent/dashboard",
"pos": [
260,
140
]
},
{
"id": "st",
"type": "backend",
"label": "state.go",
"sublabel": "read + liveness",
"pos": [
480,
140
]
},
{
"id": "main",
"type": "backend",
"label": "main.go",
"sublabel": "bubbletea TUI",
"pos": [
700,
140
]
},
{
"id": "ui",
"type": "frontend",
"label": "Table + Detail",
"sublabel": "views",
"pos": [
920,
140
]
},
{
"id": "cfg",
"type": "backend",
"label": "pi-dashboard.yaml",
"sublabel": "config",
"pos": [
700,
40
]
},
{
"id": "rem",
"type": "external",
"label": "remotes .13 .51",
"sublabel": "ssh cat *.json",
"pos": [
40,
340
]
},
{
"id": "at",
"type": "external",
"label": "tmux / zellij",
"sublabel": "attach",
"pos": [
1180,
540
]
},
{
"id": "hk",
"type": "external",
"label": "hunk",
"sublabel": "diff review",
"pos": [
1180,
390
]
},
{
"id": "tx",
"type": "external",
"label": "tuxedo",
"sublabel": "todo.txt",
"pos": [
1180,
240
]
}
],
"boundaries": [
{
"kind": "region",
"label": "pi-dashboard (Go)",
"wraps": [
"st",
"main",
"ui",
"cfg"
]
},
{
"kind": "region",
"label": "data sources",
"wraps": [
"ext",
"sf",
"rem"
]
}
],
"connections": [
{
"id": "ext-to-sf",
"from": "ext",
"to": "sf",
"label": "writes JSON"
},
{
"id": "rem-to-st",
"from": "rem",
"to": "st",
"label": "ssh"
},
{
"id": "sf-to-st",
"from": "sf",
"to": "st",
"label": "readLocalStates"
},
{
"id": "st-to-main",
"from": "st",
"to": "main",
"label": "AgentState",
"labelAt": [
620,
215
]
},
{
"id": "cfg-to-main",
"from": "cfg",
"to": "main",
"label": "loadConfig",
"labelAt": [
760,
114
]
},
{
"id": "main-to-st",
"from": "main",
"to": "st",
"label": "2s poll tick",
"fromSide": "bottom",
"toSide": "bottom"
},
{
"id": "main-to-ui",
"from": "main",
"to": "ui",
"label": "model"
},
{
"id": "ui-to-at",
"from": "ui",
"to": "at",
"label": "Enter",
"labelAt": [
1060,
480
]
},
{
"id": "ui-to-hk",
"from": "ui",
"to": "hk",
"label": "d",
"labelAt": [
1060,
360
]
},
{
"id": "ui-to-tx",
"from": "ui",
"to": "tx",
"label": "Tab",
"labelAt": [
1060,
240
]
}
],
"cards": [
{
"dot": "cyan",
"title": "Source of truth",
"items": [
"dashboard.ts extension writes session JSON per machine",
"state.go: heartbeat/staleness (45s window, legacy 30m)",
"remote reads: ssh cat *.json, 5s hard timeout + cooldown"
]
},
{
"dot": "emerald",
"title": "UI actions",
"items": [
"Enter: tmux / zellij attach (local or ssh -t)",
"d: hunk diff in the agent's folder",
"Tab: tuxedo task board (<cwd>/todo.txt)",
"Del: remove closed/lost state file (local or ssh)"
]
}
]
}