update architecture docs for split MCP files, new clusters, Langfuse, and EC2 deploy

This commit is contained in:
2026-04-16 13:04:44 -03:00
parent 69441fa180
commit a8e55a4a8d
5 changed files with 530 additions and 469 deletions

View File

@@ -5,50 +5,46 @@ digraph deployment {
node [fontname="Helvetica" fontsize=10 style=filled color="#1e2a4a" fontcolor="#e8eaf0"]
edge [fontname="Helvetica" fontsize=9 fontcolor="#8892a8" color="#4a5568"]
label="Deployment — Kind Cluster (dev) / EC2 (prod)"
label="Deployment — Kind Clusters (dev) / EC2 (prod)"
labelloc=t
fontsize=14
fontcolor="#0066ff"
user [label="Browser\nlocalhost:8040" fillcolor="#243056" shape=box]
user [label="Browser" fillcolor="#243056" shape=box]
subgraph cluster_kind {
label="Kind Cluster: unt (namespace: unt)"
subgraph cluster_ec2 {
label="EC2 (mcrn.ar)"
color="#ff9800"
fontcolor="#ff9800"
style=rounded
nginx_edge [label="nginx (gateway container)\n443 · SSL\nstellarair.mcrn.ar\nlangfuse.mcrn.ar\nnova.mcrn.ar (Kong backend)" fillcolor="#121829" shape=box]
nova_ui [label="nova-ui\nnginx + Vue build" fillcolor="#0d1a33" shape=box]
nova_api [label="nova-api\nuvicorn · FastAPI\nMCP clients (stdio)" fillcolor="#0d1a33" shape=box]
}
subgraph cluster_kind_unt {
label="Kind Cluster: unt (local dev)"
color="#0066ff"
fontcolor="#0066ff"
style=rounded
subgraph cluster_frontend_pod {
label="Pod: ui"
color="#1e2a4a"
fontcolor="#4a5568"
ui [label="nginx\n:80\n\nVue SPA\nProxy → api:8000" fillcolor="#121829" shape=box]
ui_svc [label="Service: ui\nNodePort 30040" fillcolor="#0d1a33" shape=diamond fontsize=9]
}
unt_ui [label="ui pod\nnginx + Vue\nNodePort 30040" fillcolor="#121829" shape=box]
unt_api [label="api pod\nuvicorn · FastAPI" fillcolor="#121829" shape=box]
}
subgraph cluster_api_pod {
label="Pod: api"
color="#1e2a4a"
fontcolor="#4a5568"
api [label="uvicorn\n:8000\n\nFastAPI\nMCP clients (stdio)\nLangGraph agents" fillcolor="#121829" shape=box]
api_svc [label="Service: api\nClusterIP" fillcolor="#0d1a33" shape=diamond fontsize=9]
}
subgraph cluster_kind_lng {
label="Kind Cluster: lng (shared observability)"
color="#00c853"
fontcolor="#00c853"
style=rounded
subgraph cluster_langfuse_pod {
label="Pod: langfuse"
color="#1e2a4a"
fontcolor="#4a5568"
langfuse [label="Langfuse\n:3000\n\nTrace viewer" fillcolor="#121829" shape=box]
langfuse_svc [label="Service: langfuse\nNodePort 30030" fillcolor="#0d1a33" shape=diamond fontsize=9]
}
subgraph cluster_pg_pod {
label="Pod: postgres"
color="#1e2a4a"
fontcolor="#4a5568"
pg [label="PostgreSQL\n:5432\n\nLangfuse data" fillcolor="#121829" shape=cylinder]
pg_svc [label="Service: postgres\nClusterIP" fillcolor="#0d1a33" shape=diamond fontsize=9]
}
lf_web [label="langfuse-web\nNext.js\nNodePort 30030" fillcolor="#121829" shape=box]
lf_worker [label="langfuse-worker\nClickHouse writer" fillcolor="#121829" shape=box]
lf_ch [label="ClickHouse\ntraces · spans" fillcolor="#0d1a33" shape=cylinder]
lf_pg [label="Postgres\nmetadata" fillcolor="#0d1a33" shape=cylinder]
lf_redis [label="Redis\nqueue · cache" fillcolor="#0d1a33" shape=cylinder]
lf_minio [label="MinIO\nS3 events" fillcolor="#0d1a33" shape=cylinder]
}
subgraph cluster_external {
@@ -58,25 +54,33 @@ digraph deployment {
style=dashed
ext_weather [label="OpenMeteo" fillcolor="#0d2a0d" shape=octagon fontcolor="#00c853"]
ext_faa [label="FAA" fillcolor="#0d2a0d" shape=octagon fontcolor="#00c853"]
ext_bedrock [label="AWS Bedrock" fillcolor="#243056" shape=octagon]
ext_kong [label="Kong Konnect\n(optional)" fillcolor="#243056" shape=octagon style="filled,dashed"]
ext_bedrock [label="Bedrock / Groq\nAnthropic / OpenAI" fillcolor="#243056" shape=octagon]
ext_kong [label="Kong Konnect\n(optional gateway)" fillcolor="#243056" shape=octagon style="filled,dashed"]
}
// Port mappings
user -> ui_svc [label="host:8040 → 30040" color="#0066ff"]
ui_svc -> ui
ui -> api_svc [label="proxy"]
api_svc -> api
// Prod path
user -> nginx_edge [label="stellarair.mcrn.ar" color="#ff9800"]
user -> ext_kong [label="(API governance)" style=dashed color="#4a5568"]
ext_kong -> nginx_edge [label="X-Gateway-Secret" style=dashed color="#4a5568"]
nginx_edge -> nova_ui
nova_ui -> nova_api [label="/agents /scenarios"]
nova_api -> ext_weather [label="HTTP" color="#00c853"]
nova_api -> ext_faa [label="HTTP" color="#00c853"]
nova_api -> ext_bedrock [label="LLM calls" style=dashed]
api -> ext_weather [label="HTTP" color="#00c853"]
api -> ext_faa [label="HTTP" color="#00c853"]
api -> ext_bedrock [label="Converse API" style=dashed]
api -> langfuse_svc [label="traces" style=dotted]
// Dev path
user -> unt_ui [label="localhost:8040" color="#0066ff"]
unt_ui -> unt_api
unt_api -> ext_weather [style=dashed color="#00c853"]
unt_api -> ext_faa [style=dashed color="#00c853"]
unt_api -> ext_bedrock [style=dashed]
langfuse_svc -> langfuse
langfuse -> pg_svc
pg_svc -> pg
user -> ext_kong [style=dashed label="(optional)" color="#4a5568"]
ext_kong -> ui_svc [style=dashed color="#4a5568"]
// Observability (shared by both dev and prod API)
unt_api -> lf_web [label="OTLP traces" style=dotted color="#00c853"]
nova_api -> lf_web [label="OTLP traces" style=dotted color="#00c853"]
lf_web -> lf_redis
lf_worker -> lf_redis
lf_worker -> lf_ch
lf_web -> lf_pg
lf_web -> lf_minio
}