Files
ThothII/docs/architecture/thothii-deployment.architecture.json
CodexandClaude Opus 5.5 0adda6e8af docs: add complete Archify architecture diagram set
Thirteen source-backed interactive diagrams in docs/architecture with an
index page (thothii-diagrams.html): runtime and deployment architecture,
module tree, F1-F8 workflow, session and catalog-sync lifecycles,
new-question, gate round-trip, resume and OIDC sequences, session runtime
classes, metadata dataflow and Metadata Catalog ERD. Replaces the old
thothii-core sequence diagram.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 12:24:07 +02:00

529 lines
10 KiB
JSON

{
"schema_version": 1,
"diagram_type": "architecture",
"meta": {
"title": "ThothII — deployment Docker Compose",
"locale": "it",
"output": "docs/architecture/thothii-deployment.html",
"quality_profile": "showcase",
"repository": {
"url": "https://git.tylconsulting.it/mptyl/ThothII.git",
"link_mode": "local-only",
"revision": "31e6d3a162e9e5ac71fc2d8da4fe44b16c06aae3"
}
},
"components": [
{
"id": "operator",
"type": "external",
"label": "Operatore",
"sublabel": "host",
"pos": [
40,
40
],
"size": [
150,
64
]
},
{
"id": "thtcli",
"type": "backend",
"label": "tht (host)",
"sublabel": "CLI Go: setup, start, stop",
"pos": [
290,
40
],
"size": [
170,
64
],
"sources": [
{
"path": "tools/tht/cmd/tht/main.go",
"line": 223,
"end_line": 237,
"label": "start / stop"
},
{
"path": "tools/tht/internal/config/installation.go",
"line": 548,
"end_line": 548,
"label": "docker compose"
}
]
},
{
"id": "browser",
"type": "external",
"label": "Browser",
"sublabel": "o proxy del portale",
"pos": [
40,
340
],
"size": [
150,
64
]
},
{
"id": "frontend",
"type": "frontend",
"label": "frontend",
"sublabel": "nginx :8080",
"tag": "unica porta pubblica",
"pos": [
290,
340
],
"size": [
160,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 190,
"end_line": 208
},
{
"path": "docker/nginx.conf.template",
"line": 13,
"end_line": 20,
"label": "/api → core"
},
{
"path": "deploy/compose.server.yaml",
"line": 32,
"end_line": 34,
"label": "porta server"
}
]
},
{
"id": "core",
"type": "backend",
"label": "core",
"sublabel": "backend + Pi + tht :8787",
"tag": "MAX_PI_PROCESSES",
"pos": [
540,
340
],
"size": [
190,
84
],
"sources": [
{
"path": "compose.yaml",
"line": 4,
"end_line": 72
},
{
"path": "docker/core.Dockerfile",
"line": 1,
"end_line": 5
}
]
},
{
"id": "catalogdb",
"type": "database",
"label": "catalog-db",
"sublabel": "PostgreSQL 17",
"tag": "volume catalog-data",
"pos": [
820,
340
],
"size": [
170,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 74,
"end_line": 98
}
]
},
{
"id": "migrate",
"type": "backend",
"label": "catalog-migrate",
"sublabel": "one-shot",
"pos": [
1080,
340
],
"size": [
160,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 100,
"end_line": 117
}
]
},
{
"id": "qdrant",
"type": "database",
"label": "qdrant",
"sublabel": "vector store :6333",
"tag": "volume qdrant-data",
"pos": [
820,
490
],
"size": [
170,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 210,
"end_line": 228
}
]
},
{
"id": "maint",
"type": "backend",
"label": "workspace-maintenance",
"sublabel": "one-shot, preprocessing",
"pos": [
1080,
490
],
"size": [
190,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 119,
"end_line": 188
},
{
"path": "backend/src/workspace-maintenance.ts",
"line": 22,
"end_line": 22,
"label": "comandi"
}
]
},
{
"id": "embedding",
"type": "backend",
"label": "embedding",
"sublabel": "Ollama :11434",
"tag": "volume embedding-models",
"pos": [
820,
640
],
"size": [
170,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 230,
"end_line": 249
}
]
},
{
"id": "modelinit",
"type": "backend",
"label": "embedding-model-init",
"sublabel": "one-shot, scarica il modello",
"pos": [
1080,
640
],
"size": [
190,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 251,
"end_line": 264
}
]
},
{
"id": "volumes",
"type": "database",
"label": "Volumi core",
"sublabel": "sessions, settings, pi-state, auth-state",
"tag": "+ workspace-registry/secrets",
"pos": [
500,
560
],
"size": [
270,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 42,
"end_line": 50
},
{
"path": "compose.yaml",
"line": 269,
"end_line": 278
}
]
},
{
"id": "secrets",
"type": "security",
"label": "Secret + config",
"sublabel": "thothii.secrets, installation.yaml",
"pos": [
230,
560
],
"size": [
230,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 51,
"end_line": 57
},
{
"path": "compose.yaml",
"line": 280,
"end_line": 290
}
]
},
{
"id": "git",
"type": "cloud",
"label": "Git remote workspace",
"sublabel": "THT_WORKSPACE_GIT_REMOTE",
"pos": [
290,
190
],
"size": [
200,
64
],
"sources": [
{
"path": "backend/src/workspaces/git-repository.ts",
"line": 185,
"end_line": 195,
"label": "clone / refresh"
}
]
},
{
"id": "dwh",
"type": "cloud",
"label": "DWH",
"sublabel": "Postgres o REST, sola lettura",
"pos": [
820,
190
],
"size": [
190,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 36,
"end_line": 37
}
]
},
{
"id": "llm",
"type": "cloud",
"label": "Provider LLM",
"sublabel": "THT_LLM_URL",
"pos": [
820,
40
],
"size": [
170,
64
],
"sources": [
{
"path": "compose.yaml",
"line": 38,
"end_line": 38
}
]
}
],
"boundaries": [
{
"kind": "region",
"label": "rete Compose thothii",
"wraps": [
"frontend",
"core",
"catalogdb",
"migrate",
"qdrant",
"maint",
"embedding",
"modelinit",
"volumes",
"secrets"
]
}
],
"connections": [
{
"id": "op-cli",
"from": "operator",
"to": "thtcli",
"label": "comandi"
},
{
"id": "cli-core",
"from": "thtcli",
"to": "core",
"label": "compose up",
"variant": "dashed"
},
{
"id": "br-fe",
"from": "browser",
"to": "frontend",
"label": "HTTPS",
"variant": "emphasis"
},
{
"id": "fe-core",
"from": "frontend",
"to": "core",
"label": "/api",
"variant": "emphasis"
},
{
"id": "core-db",
"from": "core",
"to": "catalogdb",
"label": "SQL",
"variant": "emphasis"
},
{
"id": "mig-db",
"from": "migrate",
"to": "catalogdb",
"label": "migra"
},
{
"id": "core-qd",
"from": "core",
"to": "qdrant",
"label": "HTTP"
},
{
"id": "core-emb",
"from": "core",
"to": "embedding",
"label": "embed"
},
{
"id": "maint-qd",
"from": "maint",
"to": "qdrant",
"label": "reindicizza"
},
{
"id": "init-emb",
"from": "modelinit",
"to": "embedding",
"label": "pull"
},
{
"id": "core-vol",
"from": "core",
"to": "volumes",
"label": "monta"
},
{
"id": "sec-core",
"from": "secrets",
"to": "core",
"label": "/run/secrets",
"variant": "security"
},
{
"id": "core-git",
"from": "core",
"to": "git",
"label": "clone"
},
{
"id": "core-dwh",
"from": "core",
"to": "dwh",
"label": "read-only"
},
{
"id": "core-llm",
"from": "core",
"to": "llm",
"label": "API modelli"
}
],
"cards": [
{
"dot": "cyan",
"title": "Avvio",
"items": [
"tht start sul host esegue docker compose con base + profilo (local o server)",
"catalog-migrate ed embedding-model-init girano una volta prima del core",
"Il core parte solo con catalog-db e qdrant sani e il modello di embedding scaricato"
]
},
{
"dot": "amber",
"title": "Profili",
"items": [
"local: porte solo su 127.0.0.1 (frontend 8080, core 8787, Qdrant 6333)",
"server: espone solo il frontend dietro il proxy autenticato",
"workspace-maintenance gira on demand: preprocessing ed Evidence"
]
},
{
"dot": "rose",
"title": "Confini",
"items": [
"DWH, provider LLM e Git remote sono esterni alla rete Compose",
"I secret arrivano come Docker secrets, mai in variabili o YAML"
]
}
]
}