Explorar el Código

feat(server): Fase 6.5 — canon demo a JSON, Device.infra, topología semántica, vm, display-name y system/info

- D65-1: cmd/gen-demo-canon genera app/src/data/demo-canon.json desde el
  canon Go (BuildDemoCanon, totales derivados); test de frescura con
  DeepEqual normalizado + go:generate en demo_dataset.go
- D65-2: Device.Infra sellado server-side (demo: pve/CTs/GS308E; live:
  inferTopology por OUI hipervisor, anidados y vecino LLDP managed)
- D65-3: TopoSemantics (links/rings/hiddenPeers) con builder compartido
  demo/live que porta la semántica de model.ts; golden test del canon
- D65-4: ViewModelVersion=1 y Overview.VM (vm) siempre presente
- D65-5: users.display_name (migración), displayName en /api/auth/me y
  /api/users, PUT /api/users/me/display-name (trim, máx 40 runes, sin <>)
- D65-6: GET /api/system/info con datos reales del proceso (parseadores
  puros de os-release/cpuinfo/meminfo con fallback amable)
agent hace 4 meses
padre
commit
65ca9e855d

+ 2543 - 0
app/src/data/demo-canon.json

@@ -0,0 +1,2543 @@
+{
+  "routers": [
+    {
+      "id": "flint2",
+      "name": "Gateway",
+      "model": "GL.iNet Flint 2 (GL-MT6000)",
+      "modelShort": "GL.iNet Flint 2",
+      "role": "Gateway principal",
+      "roleBadge": "Principal",
+      "ip": "192.168.8.1",
+      "status": "online",
+      "health": 98,
+      "cpu": 23,
+      "ram": 41,
+      "temp": 54,
+      "uptime": "32d 14h",
+      "clients": 26,
+      "sparkline": [
+        8,
+        6,
+        5,
+        5,
+        6,
+        9,
+        18,
+        32,
+        41,
+        38,
+        35,
+        44,
+        52,
+        48,
+        45,
+        55,
+        68,
+        84,
+        96,
+        120,
+        150,
+        110,
+        84,
+        40
+      ],
+      "backhaul": "cable"
+    },
+    {
+      "id": "living",
+      "name": "Salón",
+      "model": "OpenWrt AP (Xiaomi AX3000T)",
+      "modelShort": "Xiaomi AX3000T",
+      "role": "Punto de acceso",
+      "roleBadge": "AP",
+      "ip": "192.168.8.2",
+      "status": "online",
+      "health": 95,
+      "cpu": 12,
+      "ram": 38,
+      "temp": 47,
+      "uptime": "32d 14h",
+      "clients": 20,
+      "sparkline": [
+        4,
+        3,
+        3,
+        2,
+        3,
+        5,
+        10,
+        22,
+        28,
+        26,
+        24,
+        30,
+        38,
+        35,
+        33,
+        42,
+        55,
+        72,
+        88,
+        105,
+        132,
+        92,
+        61,
+        28
+      ],
+      "backhaul": "cable",
+      "lldp": {
+        "chassis": "Flint 2",
+        "mgmt": "192.168.8.1",
+        "caps": "Bridge, Router",
+        "portDesc": "lan1"
+      }
+    },
+    {
+      "id": "estudio",
+      "name": "Estudio",
+      "model": "OpenWrt (NanoPi R4S)",
+      "modelShort": "NanoPi R4S",
+      "role": "AP + switch",
+      "roleBadge": "AP",
+      "ip": "192.168.8.3",
+      "status": "online",
+      "health": 92,
+      "cpu": 18,
+      "ram": 44,
+      "temp": 51,
+      "uptime": "11d 3h",
+      "clients": 8,
+      "sparkline": [
+        2,
+        2,
+        1,
+        1,
+        2,
+        4,
+        8,
+        15,
+        22,
+        25,
+        24,
+        22,
+        26,
+        24,
+        21,
+        24,
+        28,
+        31,
+        29,
+        24,
+        18,
+        12,
+        8,
+        4
+      ],
+      "backhaul": "cable",
+      "lldp": {
+        "chassis": "Flint 2",
+        "mgmt": "192.168.8.1",
+        "caps": "Bridge, Router",
+        "portDesc": "lan2"
+      }
+    },
+    {
+      "id": "patio",
+      "name": "Patio",
+      "model": "OpenWrt (TP-Link EAP225)",
+      "modelShort": "TP-Link EAP225",
+      "role": "AP exterior",
+      "roleBadge": "AP",
+      "ip": "192.168.8.4",
+      "status": "warn",
+      "health": 68,
+      "cpu": 31,
+      "ram": 57,
+      "temp": 71,
+      "uptime": "4d 2h",
+      "clients": 5,
+      "hotMetric": "temp",
+      "sparkline": [
+        1,
+        1,
+        1,
+        1,
+        1,
+        2,
+        3,
+        5,
+        7,
+        8,
+        8,
+        9,
+        10,
+        9,
+        8,
+        9,
+        11,
+        12,
+        13,
+        12,
+        9,
+        6,
+        4,
+        2
+      ],
+      "backhaul": "wifi"
+    }
+  ],
+  "devices": [
+    {
+      "id": "imac-salon",
+      "name": "iMac Salón",
+      "type": "ordenador",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.21",
+      "mac": "A4:83:E7:21:0B:3C",
+      "routerId": "living",
+      "band": "5 GHz",
+      "signalDbm": -48,
+      "trafficMbps": 32.4,
+      "online": true,
+      "sparkline": [
+        12,
+        15,
+        18,
+        22,
+        26,
+        30,
+        34,
+        32,
+        28,
+        30,
+        32,
+        31
+      ],
+      "hostname": "imac-de-marc",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 320 días",
+      "traffic24hRx": "38 GB",
+      "traffic24hTx": "2,1 GB",
+      "adguard": true,
+      "group": "ordenadores"
+    },
+    {
+      "id": "tv-samsung",
+      "name": "TV Samsung",
+      "type": "tv",
+      "manufacturer": "Samsung",
+      "ip": "192.168.8.34",
+      "mac": "8C:EA:48:5D:2F:91",
+      "routerId": "living",
+      "band": "5 GHz",
+      "signalDbm": -52,
+      "trafficMbps": 18.1,
+      "online": true,
+      "sparkline": [
+        8,
+        10,
+        14,
+        16,
+        18,
+        20,
+        19,
+        18,
+        17,
+        18,
+        18,
+        18
+      ],
+      "hostname": "samsung-tv-salon",
+      "dhcpLease": "renueva en 7 h 48 min",
+      "firstSeen": "hace 290 días",
+      "traffic24hRx": "54 GB",
+      "traffic24hTx": "1,2 GB",
+      "adguard": true,
+      "group": "tv"
+    },
+    {
+      "id": "pixel-8-pro",
+      "name": "Pixel 8 Pro",
+      "type": "movil",
+      "manufacturer": "Google",
+      "ip": "192.168.8.45",
+      "mac": "F2:6D:19:A8:44:C2",
+      "routerId": "flint2",
+      "band": "5 GHz",
+      "signalDbm": -41,
+      "trafficMbps": 6.2,
+      "online": true,
+      "sparkline": [
+        3,
+        4,
+        5,
+        7,
+        6,
+        8,
+        6,
+        5,
+        7,
+        6,
+        6,
+        6
+      ],
+      "hostname": "pixel-8-pro",
+      "dhcpLease": "renueva en 9 h 12 min",
+      "firstSeen": "hace 214 días",
+      "traffic24hRx": "4,2 GB",
+      "traffic24hTx": "310 MB",
+      "adguard": true,
+      "group": "moviles"
+    },
+    {
+      "id": "macbook-air",
+      "name": "MacBook Air",
+      "type": "portatil",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.23",
+      "mac": "3C:22:FB:71:9E:05",
+      "routerId": "estudio",
+      "band": "5 GHz",
+      "signalDbm": -45,
+      "trafficMbps": 4.8,
+      "online": true,
+      "sparkline": [
+        2,
+        3,
+        4,
+        5,
+        5,
+        6,
+        5,
+        4,
+        5,
+        5,
+        5,
+        5
+      ],
+      "hostname": "macbook-air-de-ana",
+      "dhcpLease": "renueva en 5 h 31 min",
+      "firstSeen": "hace 260 días",
+      "traffic24hRx": "18 GB",
+      "traffic24hTx": "2,2 GB",
+      "adguard": true,
+      "group": "ordenadores"
+    },
+    {
+      "id": "ps5",
+      "name": "PS5",
+      "type": "consola",
+      "manufacturer": "Sony",
+      "ip": "192.168.8.31",
+      "mac": "78:C8:81:0A:6B:D4",
+      "routerId": "living",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 12.7,
+      "online": true,
+      "sparkline": [
+        4,
+        6,
+        8,
+        10,
+        12,
+        14,
+        13,
+        12,
+        13,
+        12,
+        13,
+        13
+      ],
+      "port": "lan1",
+      "hostname": "ps5-salon",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 300 días",
+      "traffic24hRx": "92 GB",
+      "traffic24hTx": "4,8 GB",
+      "adguard": true,
+      "group": "tv"
+    },
+    {
+      "id": "robot-aspirador",
+      "name": "Robot aspirador",
+      "type": "iot",
+      "manufacturer": "Roborock",
+      "ip": "192.168.8.61",
+      "mac": "B0:4A:39:2E:77:10",
+      "routerId": "patio",
+      "band": "2.4 GHz",
+      "signalDbm": -67,
+      "trafficMbps": 0.02,
+      "online": true,
+      "sparkline": [
+        0.01,
+        0.02,
+        0.02,
+        0.03,
+        0.02,
+        0.02,
+        0.02,
+        0.02,
+        0.02,
+        0.02,
+        0.02,
+        0.02
+      ],
+      "hostname": "roborock-s8",
+      "dhcpLease": "renueva en 10 h 2 min",
+      "firstSeen": "hace 180 días",
+      "traffic24hRx": "340 MB",
+      "traffic24hTx": "28 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "camara-porche",
+      "name": "Cámara porche",
+      "type": "camara",
+      "manufacturer": "Reolink",
+      "ip": "192.168.8.71",
+      "mac": "EC:71:DB:44:12:8A",
+      "routerId": "patio",
+      "band": "2.4 GHz",
+      "signalDbm": -72,
+      "trafficMbps": 1.1,
+      "online": true,
+      "sparkline": [
+        1,
+        1.1,
+        1.1,
+        1.2,
+        1.1,
+        1,
+        1.1,
+        1.1,
+        1.2,
+        1.1,
+        1.1,
+        1.1
+      ],
+      "hostname": "reolink-porche",
+      "dhcpLease": "renueva en 3 h 57 min",
+      "firstSeen": "hace 150 días",
+      "traffic24hRx": "11 GB",
+      "traffic24hTx": "640 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "nest-mini",
+      "name": "Nest Mini",
+      "type": "altavoz",
+      "manufacturer": "Google",
+      "ip": "192.168.8.52",
+      "mac": "1A:2B:3C:4D:5E:6F",
+      "routerId": "estudio",
+      "band": "2.4 GHz",
+      "signalDbm": -55,
+      "trafficMbps": 0.4,
+      "online": true,
+      "sparkline": [
+        0.3,
+        0.4,
+        0.4,
+        0.5,
+        0.4,
+        0.4,
+        0.4,
+        0.4,
+        0.4,
+        0.4,
+        0.4,
+        0.4
+      ],
+      "hostname": "nest-mini-estudio",
+      "dhcpLease": "renueva en 8 h 20 min",
+      "firstSeen": "hace 240 días",
+      "traffic24hRx": "1,4 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "nas-synology",
+      "name": "NAS Synology",
+      "type": "servidor",
+      "manufacturer": "Synology",
+      "ip": "192.168.8.10",
+      "mac": "00:11:32:9C:51:B7",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 2.3,
+      "online": true,
+      "sparkline": [
+        1,
+        1.5,
+        2,
+        2.5,
+        3,
+        2.8,
+        2.4,
+        2.2,
+        2.3,
+        2.3,
+        2.3,
+        2.3
+      ],
+      "port": "lan4",
+      "hostname": "diskstation",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 320 días",
+      "traffic24hRx": "96 GB",
+      "traffic24hTx": "1,1 TB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "galaxy-tab-s9",
+      "name": "Galaxy Tab S9",
+      "type": "tablet",
+      "manufacturer": "Samsung",
+      "ip": "192.168.8.48",
+      "mac": "D6:91:2F:07:B3:55",
+      "routerId": "living",
+      "band": "5 GHz",
+      "signalDbm": -50,
+      "trafficMbps": 1.8,
+      "online": true,
+      "sparkline": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0.5,
+        1.2,
+        1.6,
+        1.8
+      ],
+      "hostname": "galaxy-tab-s9",
+      "dhcpLease": "renueva en 11 h 5 min",
+      "firstSeen": "hoy",
+      "traffic24hRx": "640 MB",
+      "traffic24hTx": "48 MB",
+      "adguard": true,
+      "group": "moviles",
+      "isNew": true,
+      "newThisWeek": true
+    },
+    {
+      "id": "iphone-ana",
+      "name": "iPhone de Ana",
+      "type": "movil",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.44",
+      "mac": "F4:D4:88:19:C2:71",
+      "routerId": "flint2",
+      "band": "5 GHz",
+      "signalDbm": -46,
+      "trafficMbps": 2.1,
+      "online": true,
+      "sparkline": [
+        2.44,
+        2.86,
+        1.84,
+        1.52,
+        1.73,
+        2.62,
+        1.67,
+        1.89,
+        2.69,
+        1.91,
+        2.38,
+        2.1
+      ],
+      "hostname": "iphone-de-ana",
+      "dhcpLease": "renueva en 6 h 40 min",
+      "firstSeen": "hace 190 días",
+      "traffic24hRx": "2,8 GB",
+      "traffic24hTx": "240 MB",
+      "adguard": true,
+      "group": "moviles"
+    },
+    {
+      "id": "macbook-pro",
+      "name": "MacBook Pro de Marc",
+      "type": "portatil",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.26",
+      "mac": "F0:18:98:5A:11:E9",
+      "routerId": "flint2",
+      "band": "5 GHz",
+      "signalDbm": -44,
+      "trafficMbps": 8.6,
+      "online": true,
+      "sparkline": [
+        10.25,
+        10.6,
+        6.14,
+        7.7,
+        6.7,
+        11.16,
+        10.48,
+        6.81,
+        9.67,
+        7.71,
+        6.9,
+        8.6
+      ],
+      "hostname": "macbook-pro-marc",
+      "dhcpLease": "renueva en 4 h 16 min",
+      "firstSeen": "hace 230 días",
+      "traffic24hRx": "12,4 GB",
+      "traffic24hTx": "1,9 GB",
+      "adguard": true,
+      "group": "ordenadores"
+    },
+    {
+      "id": "pc-sobremesa",
+      "name": "PC de sobremesa",
+      "type": "ordenador",
+      "manufacturer": "ASUSTeK",
+      "ip": "192.168.8.11",
+      "mac": "04:D4:C4:8B:30:A7",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 21.3,
+      "online": true,
+      "sparkline": [
+        26.07,
+        23.45,
+        28.77,
+        22.73,
+        15.69,
+        28.73,
+        17.94,
+        14.51,
+        20.6,
+        18.79,
+        27.03,
+        21.3
+      ],
+      "attachTo": "dist-flint2-lan3",
+      "hostname": "desktop-8f2k1",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 310 días",
+      "traffic24hRx": "84 GB",
+      "traffic24hTx": "6,2 GB",
+      "adguard": true,
+      "group": "ordenadores"
+    },
+    {
+      "id": "raspberry-pi",
+      "name": "Raspberry Pi 4",
+      "type": "servidor",
+      "manufacturer": "Raspberry Pi",
+      "ip": "192.168.8.12",
+      "mac": "DC:A6:32:4F:77:02",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.8,
+      "online": true,
+      "sparkline": [
+        1,
+        0.78,
+        0.95,
+        0.99,
+        0.55,
+        1.12,
+        1.01,
+        1.1,
+        0.65,
+        0.69,
+        0.75,
+        0.8
+      ],
+      "attachTo": "dist-flint2-lan3",
+      "hostname": "raspberrypi",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 320 días",
+      "traffic24hRx": "3,4 GB",
+      "traffic24hTx": "890 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "timbre-nest",
+      "name": "Timbre Nest",
+      "type": "camara",
+      "manufacturer": "Google",
+      "ip": "192.168.8.72",
+      "mac": "F4:F5:D8:66:01:B8",
+      "routerId": "flint2",
+      "band": "2.4 GHz",
+      "signalDbm": -58,
+      "trafficMbps": 0.6,
+      "online": true,
+      "sparkline": [
+        0.79,
+        0.42,
+        0.52,
+        0.47,
+        0.84,
+        0.42,
+        0.79,
+        0.69,
+        0.78,
+        0.5,
+        0.64,
+        0.6
+      ],
+      "hostname": "nest-doorbell",
+      "dhcpLease": "renueva en 9 h 44 min",
+      "firstSeen": "hace 170 días",
+      "traffic24hRx": "1,2 GB",
+      "traffic24hTx": "140 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "enchufe-lavadora",
+      "name": "Enchufe lavadora",
+      "type": "iot",
+      "manufacturer": "TP-Link",
+      "ip": "192.168.8.81",
+      "mac": "50:C7:BF:22:E1:9C",
+      "routerId": "flint2",
+      "band": "2.4 GHz",
+      "signalDbm": -62,
+      "trafficMbps": 0.01,
+      "online": true,
+      "sparkline": [
+        0.02,
+        0.02,
+        0,
+        0.01,
+        0.02,
+        0,
+        0.01,
+        0.01,
+        0.01,
+        0.01,
+        0,
+        0.01
+      ],
+      "hostname": "tapo-p110-lavadora",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 140 días",
+      "traffic24hRx": "8 MB",
+      "traffic24hTx": "2 MB",
+      "adguard": false,
+      "group": "iot"
+    },
+    {
+      "id": "pixel-7",
+      "name": "Pixel 7",
+      "type": "movil",
+      "manufacturer": "Google",
+      "ip": "192.168.8.46",
+      "mac": "3C:5A:B4:08:D7:5E",
+      "routerId": "flint2",
+      "band": "5 GHz",
+      "signalDbm": -49,
+      "trafficMbps": 1.4,
+      "online": true,
+      "sparkline": [
+        1.94,
+        1.74,
+        1.87,
+        1.58,
+        1.85,
+        1.12,
+        1.9,
+        1.3,
+        1.37,
+        1.13,
+        1.68,
+        1.4
+      ],
+      "hostname": "pixel-7",
+      "dhcpLease": "renueva en 7 h 3 min",
+      "firstSeen": "hace 205 días",
+      "traffic24hRx": "1,9 GB",
+      "traffic24hTx": "180 MB",
+      "adguard": true,
+      "group": "moviles"
+    },
+    {
+      "id": "ipad-air",
+      "name": "iPad Air",
+      "type": "tablet",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.47",
+      "mac": "8C:85:90:2F:B4:11",
+      "routerId": "flint2",
+      "band": "5 GHz",
+      "signalDbm": -54,
+      "trafficMbps": 0,
+      "online": false,
+      "sparkline": [],
+      "hostname": "ipad-air",
+      "dhcpLease": "Expirado",
+      "firstSeen": "hace 260 días",
+      "traffic24hRx": "6,4 GB",
+      "traffic24hTx": "520 MB",
+      "adguard": true,
+      "group": "moviles"
+    },
+    {
+      "id": "portatil-trabajo",
+      "name": "Portátil trabajo",
+      "type": "portatil",
+      "manufacturer": "Lenovo",
+      "ip": "192.168.8.27",
+      "mac": "54:EE:75:9A:03:F1",
+      "routerId": "flint2",
+      "band": "5 GHz",
+      "signalDbm": -50,
+      "trafficMbps": 0,
+      "online": false,
+      "sparkline": [],
+      "hostname": "thinkpad-t14",
+      "dhcpLease": "Expirado",
+      "firstSeen": "hace 160 días",
+      "traffic24hRx": "812 MB",
+      "traffic24hTx": "121 MB",
+      "adguard": true,
+      "group": "ordenadores"
+    },
+    {
+      "id": "kindle",
+      "name": "Kindle Paperwhite",
+      "type": "desconocido",
+      "manufacturer": "Amazon",
+      "ip": "192.168.8.49",
+      "mac": "44:65:0D:71:28:C3",
+      "routerId": "flint2",
+      "band": "2.4 GHz",
+      "signalDbm": -58,
+      "trafficMbps": 0,
+      "online": false,
+      "sparkline": [],
+      "hostname": "kindle-paperwhite",
+      "dhcpLease": "Expirado",
+      "firstSeen": "hace 220 días",
+      "traffic24hRx": "220 MB",
+      "traffic24hTx": "8 MB",
+      "adguard": true,
+      "group": "otros",
+      "iconOverride": "BookOpen"
+    },
+    {
+      "id": "bombilla-1",
+      "name": "Bombilla salón 1",
+      "type": "iot",
+      "manufacturer": "Ikea Trådfri",
+      "ip": "192.168.8.90",
+      "mac": "CC:86:EC:10:04:21",
+      "routerId": "living",
+      "band": "2.4 GHz",
+      "signalDbm": -58,
+      "trafficMbps": 0,
+      "online": true,
+      "sparkline": [
+        0.01,
+        0.02,
+        -0,
+        0.01,
+        0.01,
+        0.01,
+        -0,
+        -0,
+        0.01,
+        0.01,
+        -0,
+        0.005
+      ],
+      "hostname": "tradfri-1",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 280 días",
+      "traffic24hRx": "4 MB",
+      "traffic24hTx": "1 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "bombilla-2",
+      "name": "Bombilla salón 2",
+      "type": "iot",
+      "manufacturer": "Ikea Trådfri",
+      "ip": "192.168.8.91",
+      "mac": "CC:86:EC:10:04:22",
+      "routerId": "living",
+      "band": "2.4 GHz",
+      "signalDbm": -59,
+      "trafficMbps": 0,
+      "online": true,
+      "sparkline": [
+        0.01,
+        0.01,
+        0.02,
+        0.01,
+        0.01,
+        0.01,
+        0.01,
+        -0,
+        0.01,
+        0.01,
+        0.01,
+        0.005
+      ],
+      "hostname": "tradfri-2",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 280 días",
+      "traffic24hRx": "4 MB",
+      "traffic24hTx": "1 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "bombilla-3",
+      "name": "Bombilla lámpara pie",
+      "type": "iot",
+      "manufacturer": "Ikea Trådfri",
+      "ip": "192.168.8.92",
+      "mac": "CC:86:EC:10:04:23",
+      "routerId": "living",
+      "band": "2.4 GHz",
+      "signalDbm": -61,
+      "trafficMbps": 0,
+      "online": true,
+      "sparkline": [
+        0.01,
+        0.01,
+        0.01,
+        0.02,
+        0.01,
+        0.01,
+        -0,
+        0.01,
+        0.01,
+        0.01,
+        0,
+        0.005
+      ],
+      "hostname": "tradfri-3",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 280 días",
+      "traffic24hRx": "4 MB",
+      "traffic24hTx": "1 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "bombilla-4",
+      "name": "Bombilla entrada",
+      "type": "iot",
+      "manufacturer": "Ikea Trådfri",
+      "ip": "192.168.8.93",
+      "mac": "CC:86:EC:10:04:24",
+      "routerId": "living",
+      "band": "2.4 GHz",
+      "signalDbm": -64,
+      "trafficMbps": 0,
+      "online": true,
+      "sparkline": [
+        0.02,
+        0.01,
+        0.01,
+        -0,
+        0.01,
+        0.01,
+        0.01,
+        0.01,
+        0,
+        0.01,
+        0.01,
+        0.005
+      ],
+      "hostname": "tradfri-4",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 280 días",
+      "traffic24hRx": "4 MB",
+      "traffic24hTx": "1 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "bombilla-5",
+      "name": "Bombilla pasillo",
+      "type": "iot",
+      "manufacturer": "Ikea Trådfri",
+      "ip": "192.168.8.94",
+      "mac": "CC:86:EC:10:04:25",
+      "routerId": "living",
+      "band": "2.4 GHz",
+      "signalDbm": -66,
+      "trafficMbps": 0,
+      "online": true,
+      "sparkline": [
+        -0,
+        0,
+        0,
+        0,
+        0,
+        0.01,
+        -0,
+        0.01,
+        -0,
+        0.01,
+        0.01,
+        0.005
+      ],
+      "hostname": "tradfri-5",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 280 días",
+      "traffic24hRx": "4 MB",
+      "traffic24hTx": "1 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "bombilla-6",
+      "name": "Bombilla cocina",
+      "type": "iot",
+      "manufacturer": "Ikea Trådfri",
+      "ip": "192.168.8.95",
+      "mac": "CC:86:EC:10:04:26",
+      "routerId": "living",
+      "band": "2.4 GHz",
+      "signalDbm": -60,
+      "trafficMbps": 0,
+      "online": true,
+      "sparkline": [
+        -0,
+        -0,
+        -0,
+        0.01,
+        0,
+        0.02,
+        0.01,
+        0.01,
+        0.01,
+        0.01,
+        -0,
+        0.005
+      ],
+      "hostname": "tradfri-6",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 280 días",
+      "traffic24hRx": "4 MB",
+      "traffic24hTx": "1 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "chromecast",
+      "name": "Chromecast HD",
+      "type": "tv",
+      "manufacturer": "Google",
+      "ip": "192.168.8.36",
+      "mac": "54:60:09:E3:5B:0A",
+      "routerId": "living",
+      "band": "5 GHz",
+      "signalDbm": -54,
+      "trafficMbps": 3.9,
+      "online": true,
+      "sparkline": [
+        2.65,
+        3.32,
+        3.28,
+        3.29,
+        4.65,
+        3.72,
+        4.01,
+        5.46,
+        5.1,
+        2.99,
+        3.91,
+        3.9
+      ],
+      "hostname": "chromecast-hd",
+      "dhcpLease": "renueva en 6 h 12 min",
+      "firstSeen": "hace 200 días",
+      "traffic24hRx": "21 GB",
+      "traffic24hTx": "380 MB",
+      "adguard": true,
+      "group": "tv"
+    },
+    {
+      "id": "homepod-mini",
+      "name": "HomePod mini",
+      "type": "altavoz",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.53",
+      "mac": "F0:D1:A9:3E:77:5C",
+      "routerId": "living",
+      "band": "5 GHz",
+      "signalDbm": -47,
+      "trafficMbps": 0.3,
+      "online": true,
+      "sparkline": [
+        0.21,
+        0.22,
+        0.2,
+        0.3,
+        0.34,
+        0.3,
+        0.2,
+        0.39,
+        0.35,
+        0.23,
+        0.2,
+        0.3
+      ],
+      "hostname": "homepod-mini",
+      "dhcpLease": "renueva en 10 h 41 min",
+      "firstSeen": "hace 190 días",
+      "traffic24hRx": "2,2 GB",
+      "traffic24hTx": "96 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "galaxy-s23",
+      "name": "Galaxy S23",
+      "type": "movil",
+      "manufacturer": "Samsung",
+      "ip": "192.168.8.42",
+      "mac": "5C:0A:5B:88:1D:E4",
+      "routerId": "living",
+      "band": "5 GHz",
+      "signalDbm": -51,
+      "trafficMbps": 0.9,
+      "online": true,
+      "sparkline": [
+        0.67,
+        1.25,
+        1.18,
+        1.07,
+        1,
+        0.95,
+        0.97,
+        1.06,
+        0.89,
+        0.66,
+        1.02,
+        0.9
+      ],
+      "hostname": "galaxy-s23",
+      "dhcpLease": "renueva en 8 h 55 min",
+      "firstSeen": "hace 175 días",
+      "traffic24hRx": "3,2 GB",
+      "traffic24hTx": "290 MB",
+      "adguard": true,
+      "group": "moviles"
+    },
+    {
+      "id": "echo-dot",
+      "name": "Echo Dot",
+      "type": "altavoz",
+      "manufacturer": "Amazon",
+      "ip": "192.168.8.54",
+      "mac": "74:C2:46:19:F0:6B",
+      "routerId": "living",
+      "band": "2.4 GHz",
+      "signalDbm": -56,
+      "trafficMbps": 0.2,
+      "online": true,
+      "sparkline": [
+        0.15,
+        0.25,
+        0.23,
+        0.27,
+        0.21,
+        0.22,
+        0.14,
+        0.21,
+        0.17,
+        0.14,
+        0.16,
+        0.2
+      ],
+      "hostname": "echo-dot-cocina",
+      "dhcpLease": "renueva en 11 h 18 min",
+      "firstSeen": "hace 210 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "74 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "nintendo-switch",
+      "name": "Nintendo Switch",
+      "type": "consola",
+      "manufacturer": "Nintendo",
+      "ip": "192.168.8.33",
+      "mac": "58:BD:A3:4C:E2:09",
+      "routerId": "living",
+      "band": "5 GHz",
+      "signalDbm": -53,
+      "trafficMbps": 0.1,
+      "online": true,
+      "sparkline": [
+        0.03,
+        0.15,
+        0.1,
+        -0,
+        0.11,
+        0.16,
+        0.15,
+        0.08,
+        0,
+        0,
+        0.2,
+        0.1
+      ],
+      "hostname": "switch-oled",
+      "dhcpLease": "renueva en 5 h 47 min",
+      "firstSeen": "hace 240 días",
+      "traffic24hRx": "8,6 GB",
+      "traffic24hTx": "310 MB",
+      "adguard": true,
+      "group": "tv"
+    },
+    {
+      "id": "portatil-invitado",
+      "name": "Portátil invitado",
+      "type": "portatil",
+      "manufacturer": "Desconocido",
+      "ip": "192.168.8.29",
+      "mac": "A2:7E:9C:41:0B:6D",
+      "routerId": "living",
+      "band": "5 GHz",
+      "signalDbm": -58,
+      "trafficMbps": 0.7,
+      "online": true,
+      "sparkline": [
+        0.59,
+        0.7,
+        0.58,
+        0.63,
+        0.68,
+        0.84,
+        0.52,
+        0.59,
+        0.92,
+        0.49,
+        0.66,
+        0.7
+      ],
+      "hostname": "unknown-7f2a",
+      "dhcpLease": "renueva en 2 h 9 min",
+      "firstSeen": "hoy",
+      "traffic24hRx": "480 MB",
+      "traffic24hTx": "62 MB",
+      "adguard": false,
+      "group": "ordenadores",
+      "isNew": true,
+      "newThisWeek": true
+    },
+    {
+      "id": "portatil-antiguo",
+      "name": "Portátil antiguo",
+      "type": "portatil",
+      "manufacturer": "HP",
+      "ip": "192.168.8.28",
+      "mac": "3C:52:82:5D:90:17",
+      "routerId": "living",
+      "band": "2.4 GHz",
+      "signalDbm": -62,
+      "trafficMbps": 0,
+      "online": false,
+      "sparkline": [],
+      "hostname": "hp-pavilion-15",
+      "dhcpLease": "Expirado",
+      "firstSeen": "hace 300 días",
+      "traffic24hRx": "0 MB",
+      "traffic24hTx": "0 MB",
+      "adguard": true,
+      "group": "ordenadores"
+    },
+    {
+      "id": "mac-mini",
+      "name": "Mac mini",
+      "type": "ordenador",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.22",
+      "mac": "A4:83:E7:66:2C:98",
+      "routerId": "estudio",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 1.9,
+      "online": true,
+      "sparkline": [
+        1.9,
+        2.16,
+        1.53,
+        1.83,
+        1.45,
+        1.25,
+        2.4,
+        2.08,
+        2.53,
+        2.7,
+        1.66,
+        1.9
+      ],
+      "hostname": "mac-mini",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 280 días",
+      "traffic24hRx": "44 GB",
+      "traffic24hTx": "5,6 GB",
+      "adguard": true,
+      "group": "ordenadores"
+    },
+    {
+      "id": "enchufe-ventilador",
+      "name": "Enchufe ventilador",
+      "type": "iot",
+      "manufacturer": "TP-Link",
+      "ip": "192.168.8.82",
+      "mac": "9C:53:22:B1:4E:70",
+      "routerId": "estudio",
+      "band": "2.4 GHz",
+      "signalDbm": -59,
+      "trafficMbps": 0.01,
+      "online": true,
+      "sparkline": [
+        0.01,
+        0.01,
+        0,
+        0.01,
+        0,
+        0,
+        0.01,
+        0.01,
+        0.01,
+        0.02,
+        0.02,
+        0.01
+      ],
+      "hostname": "tapo-p110-ventilador",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 120 días",
+      "traffic24hRx": "7 MB",
+      "traffic24hTx": "2 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "ipad-pro",
+      "name": "iPad Pro",
+      "type": "tablet",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.51",
+      "mac": "F0:18:98:91:5A:2B",
+      "routerId": "estudio",
+      "band": "5 GHz",
+      "signalDbm": -49,
+      "trafficMbps": 0.8,
+      "online": true,
+      "sparkline": [
+        0.85,
+        0.7,
+        1.02,
+        1.05,
+        0.54,
+        0.61,
+        1.05,
+        0.7,
+        0.82,
+        1.12,
+        0.81,
+        0.8
+      ],
+      "hostname": "ipad-pro",
+      "dhcpLease": "renueva en 9 h 26 min",
+      "firstSeen": "hace 160 días",
+      "traffic24hRx": "5,1 GB",
+      "traffic24hTx": "390 MB",
+      "adguard": true,
+      "group": "moviles"
+    },
+    {
+      "id": "hue-hub",
+      "name": "Hub Philips Hue",
+      "type": "iot",
+      "manufacturer": "Signify",
+      "ip": "192.168.8.15",
+      "mac": "00:17:88:2A:91:CE",
+      "routerId": "estudio",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.02,
+      "online": true,
+      "sparkline": [
+        0.02,
+        0.01,
+        0.03,
+        0,
+        0.04,
+        0.01,
+        0.02,
+        0.01,
+        0.01,
+        0.04,
+        0,
+        0.02
+      ],
+      "hostname": "philips-hue-bridge",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 280 días",
+      "traffic24hRx": "96 MB",
+      "traffic24hTx": "22 MB",
+      "adguard": false,
+      "group": "iot"
+    },
+    {
+      "id": "sonos-one",
+      "name": "Sonos One",
+      "type": "altavoz",
+      "manufacturer": "Sonos",
+      "ip": "192.168.8.55",
+      "mac": "48:A6:B8:14:72:E0",
+      "routerId": "estudio",
+      "band": "2.4 GHz",
+      "signalDbm": -57,
+      "trafficMbps": 0.5,
+      "online": true,
+      "sparkline": [
+        0.56,
+        0.71,
+        0.48,
+        0.43,
+        0.7,
+        0.43,
+        0.68,
+        0.33,
+        0.35,
+        0.68,
+        0.57,
+        0.5
+      ],
+      "hostname": "sonos-one-estudio",
+      "dhcpLease": "renueva en 10 h 4 min",
+      "firstSeen": "hace 195 días",
+      "traffic24hRx": "3,8 GB",
+      "traffic24hTx": "110 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "iphone-trabajo",
+      "name": "iPhone de trabajo",
+      "type": "movil",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.50",
+      "mac": "8C:85:90:47:C1:93",
+      "routerId": "estudio",
+      "band": "5 GHz",
+      "signalDbm": -47,
+      "trafficMbps": 0.3,
+      "online": true,
+      "sparkline": [
+        0.35,
+        0.38,
+        0.24,
+        0.31,
+        0.4,
+        0.27,
+        0.29,
+        0.4,
+        0.4,
+        0.41,
+        0.24,
+        0.3
+      ],
+      "hostname": "iphone-15-pro-work",
+      "dhcpLease": "renueva en 3 h 38 min",
+      "firstSeen": "hoy",
+      "traffic24hRx": "320 MB",
+      "traffic24hTx": "41 MB",
+      "adguard": true,
+      "group": "moviles",
+      "isNew": true,
+      "newThisWeek": true
+    },
+    {
+      "id": "macbook-viejo",
+      "name": "MacBook viejo",
+      "type": "portatil",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.25",
+      "mac": "3C:22:FB:0E:66:A1",
+      "routerId": "estudio",
+      "band": "2.4 GHz",
+      "signalDbm": -60,
+      "trafficMbps": 0,
+      "online": false,
+      "sparkline": [],
+      "hostname": "macbook-pro-2015",
+      "dhcpLease": "Expirado",
+      "firstSeen": "hace 320 días",
+      "traffic24hRx": "0 MB",
+      "traffic24hTx": "0 MB",
+      "adguard": true,
+      "group": "ordenadores"
+    },
+    {
+      "id": "camara-jardin",
+      "name": "Cámara jardín",
+      "type": "camara",
+      "manufacturer": "Reolink",
+      "ip": "192.168.8.73",
+      "mac": "EC:71:DB:44:12:9B",
+      "routerId": "patio",
+      "band": "2.4 GHz",
+      "signalDbm": -74,
+      "trafficMbps": 1.4,
+      "online": true,
+      "sparkline": [
+        1.84,
+        2,
+        1.08,
+        1.52,
+        1.59,
+        1.63,
+        0.97,
+        1.11,
+        1.9,
+        1.79,
+        1.04,
+        1.4
+      ],
+      "hostname": "reolink-jardin",
+      "dhcpLease": "renueva en 8 h 49 min",
+      "firstSeen": "hace 4 días",
+      "traffic24hRx": "14 GB",
+      "traffic24hTx": "820 MB",
+      "adguard": true,
+      "group": "iot",
+      "newThisWeek": true
+    },
+    {
+      "id": "sensor-riego",
+      "name": "Sensor de riego",
+      "type": "iot",
+      "manufacturer": "Tuya",
+      "ip": "192.168.8.89",
+      "mac": "D8:1F:12:5B:08:44",
+      "routerId": "patio",
+      "band": "2.4 GHz",
+      "signalDbm": -71,
+      "trafficMbps": 0.01,
+      "online": true,
+      "sparkline": [
+        0.02,
+        0.02,
+        0.02,
+        0.02,
+        0.01,
+        0.02,
+        0.01,
+        0,
+        0.02,
+        0.02,
+        0.02,
+        0.01
+      ],
+      "hostname": "tuya-riego-01",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 5 días",
+      "traffic24hRx": "2 MB",
+      "traffic24hTx": "1 MB",
+      "adguard": false,
+      "group": "iot",
+      "newThisWeek": true
+    },
+    {
+      "id": "enchufe-calefactor",
+      "name": "Enchufe calefactor",
+      "type": "iot",
+      "manufacturer": "TP-Link",
+      "ip": "192.168.8.80",
+      "mac": "50:C7:BF:31:7A:05",
+      "routerId": "patio",
+      "band": "2.4 GHz",
+      "signalDbm": -75,
+      "trafficMbps": 0.02,
+      "online": true,
+      "sparkline": [
+        0.03,
+        0.03,
+        0.03,
+        0.04,
+        0.02,
+        0.03,
+        0.01,
+        0.03,
+        0.02,
+        0.03,
+        0.02,
+        0.02
+      ],
+      "hostname": "tapo-p110-calefactor",
+      "dhcpLease": "renueva en 12 h 0 min",
+      "firstSeen": "hace 96 días",
+      "traffic24hRx": "6 MB",
+      "traffic24hTx": "2 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "camara-garaje",
+      "name": "Cámara garaje",
+      "type": "camara",
+      "manufacturer": "Reolink",
+      "ip": "192.168.8.74",
+      "mac": "EC:71:DB:44:13:02",
+      "routerId": "patio",
+      "band": "2.4 GHz",
+      "signalDbm": -78,
+      "trafficMbps": 0,
+      "online": false,
+      "sparkline": [],
+      "hostname": "reolink-garaje",
+      "dhcpLease": "Expirado",
+      "firstSeen": "hace 130 días",
+      "traffic24hRx": "0 MB",
+      "traffic24hTx": "0 MB",
+      "adguard": false,
+      "group": "iot"
+    },
+    {
+      "id": "switch-netgear",
+      "name": "Switch GS308E",
+      "type": "switch",
+      "manufacturer": "Netgear",
+      "ip": "192.168.8.13",
+      "mac": "28:C6:8E:1D:90:44",
+      "routerId": "living",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.02,
+      "online": true,
+      "sparkline": [
+        0.03,
+        0.01,
+        0.02,
+        0.04,
+        0,
+        0,
+        0.01,
+        0.03,
+        0,
+        0.01,
+        0.04,
+        0.02
+      ],
+      "port": "lan3",
+      "lldp": {
+        "chassis": "GS308E",
+        "mgmt": "192.168.8.13",
+        "caps": "Bridge",
+        "portDesc": "ge5"
+      },
+      "attachTo": "living",
+      "infra": "managed-switch",
+      "hostname": "gs308e",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 300 días",
+      "traffic24hRx": "64 MB",
+      "traffic24hTx": "12 MB",
+      "adguard": false,
+      "group": "red",
+      "iconOverride": "Network"
+    },
+    {
+      "id": "xbox-series-s",
+      "name": "Xbox Series S",
+      "type": "consola",
+      "manufacturer": "Microsoft",
+      "ip": "192.168.8.35",
+      "mac": "7C:ED:8D:4A:11:22",
+      "routerId": "living",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 9.8,
+      "online": true,
+      "sparkline": [
+        3,
+        5,
+        7,
+        9,
+        11,
+        12,
+        10,
+        9,
+        10,
+        9,
+        10,
+        9.8
+      ],
+      "attachTo": "dist-living-lan3",
+      "hostname": "xbox-series-s",
+      "dhcpLease": "renueva en 4 h 12 min",
+      "firstSeen": "hace 140 días",
+      "traffic24hRx": "31 GB",
+      "traffic24hTx": "1,9 GB",
+      "adguard": true,
+      "group": "tv"
+    },
+    {
+      "id": "apple-tv-4k",
+      "name": "Apple TV 4K",
+      "type": "tv",
+      "manufacturer": "Apple",
+      "ip": "192.168.8.36",
+      "mac": "F0:18:98:2B:33:44",
+      "routerId": "living",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 15.2,
+      "online": true,
+      "sparkline": [
+        6,
+        8,
+        10,
+        12,
+        14,
+        16,
+        15,
+        14,
+        15,
+        15,
+        15,
+        15.2
+      ],
+      "attachTo": "dist-living-lan3",
+      "hostname": "apple-tv-4k",
+      "dhcpLease": "renueva en 6 h 3 min",
+      "firstSeen": "hace 210 días",
+      "traffic24hRx": "88 GB",
+      "traffic24hTx": "3,4 GB",
+      "adguard": true,
+      "group": "tv"
+    },
+    {
+      "id": "receptor-denon",
+      "name": "Receptor Denon",
+      "type": "altavoz",
+      "manufacturer": "Denon",
+      "ip": "192.168.8.37",
+      "mac": "00:05:CD:55:66:77",
+      "routerId": "living",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.6,
+      "online": true,
+      "sparkline": [
+        0.4,
+        0.5,
+        0.5,
+        0.6,
+        0.6,
+        0.7,
+        0.6,
+        0.6,
+        0.6,
+        0.6,
+        0.6,
+        0.6
+      ],
+      "attachTo": "dist-living-lan3",
+      "hostname": "denon-avr",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 320 días",
+      "traffic24hRx": "640 MB",
+      "traffic24hTx": "42 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "pve",
+      "name": "Proxmox pve",
+      "type": "servidor",
+      "manufacturer": "Supermicro",
+      "ip": "192.168.8.5",
+      "mac": "3C:52:82:10:20:30",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 12.3,
+      "online": true,
+      "sparkline": [
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        12,
+        12,
+        12,
+        12,
+        12,
+        12.3
+      ],
+      "port": "lan5",
+      "infra": "hypervisor",
+      "hostname": "pve",
+      "dhcpLease": "IP fija (reserva)",
+      "firstSeen": "hace 400 días",
+      "traffic24hRx": "1,2 TB",
+      "traffic24hTx": "96 GB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-pihole",
+      "name": "Pi-hole",
+      "type": "servidor",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.41",
+      "mac": "BC:24:11:00:20:10",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 6.1,
+      "online": true,
+      "sparkline": [
+        4.1,
+        5.1,
+        6.1,
+        7.1,
+        8.1,
+        4.1,
+        5.1,
+        6.1,
+        7.1,
+        8.1,
+        4.1,
+        5.1
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-pihole",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-home-assistant",
+      "name": "Home Assistant",
+      "type": "iot",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.42",
+      "mac": "BC:24:11:00:21:11",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 4.2,
+      "online": true,
+      "sparkline": [
+        3.2,
+        4.2,
+        5.2,
+        6.2,
+        2.2,
+        3.2,
+        4.2,
+        5.2,
+        6.2,
+        2.2,
+        3.2,
+        4.2
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-home-assistant",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-nextcloud",
+      "name": "Nextcloud",
+      "type": "servidor",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.43",
+      "mac": "BC:24:11:00:22:12",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 7.8,
+      "online": true,
+      "sparkline": [
+        7.8,
+        8.8,
+        9.8,
+        5.8,
+        6.8,
+        7.8,
+        8.8,
+        9.8,
+        5.8,
+        6.8,
+        7.8,
+        8.8
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-nextcloud",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-jellyfin",
+      "name": "Jellyfin",
+      "type": "servidor",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.44",
+      "mac": "BC:24:11:00:23:13",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 9.4,
+      "online": true,
+      "sparkline": [
+        10.4,
+        11.4,
+        7.4,
+        8.4,
+        9.4,
+        10.4,
+        11.4,
+        7.4,
+        8.4,
+        9.4,
+        10.4,
+        11.4
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-jellyfin",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-immich",
+      "name": "Immich",
+      "type": "servidor",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.45",
+      "mac": "BC:24:11:00:24:14",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 3.3,
+      "online": true,
+      "sparkline": [
+        5.3,
+        1.2999999999999998,
+        2.3,
+        3.3,
+        4.3,
+        5.3,
+        1.2999999999999998,
+        2.3,
+        3.3,
+        4.3,
+        5.3,
+        1.2999999999999998
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-immich",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-gitea",
+      "name": "Gitea",
+      "type": "servidor",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.46",
+      "mac": "BC:24:11:00:25:15",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 1.2,
+      "online": true,
+      "sparkline": [
+        0.1,
+        0.19999999999999996,
+        1.2,
+        2.2,
+        3.2,
+        0.1,
+        0.19999999999999996,
+        1.2,
+        2.2,
+        3.2,
+        0.1,
+        0.19999999999999996
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-gitea",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-uptime-kuma",
+      "name": "Uptime Kuma",
+      "type": "iot",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.47",
+      "mac": "BC:24:11:00:26:16",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.4,
+      "online": true,
+      "sparkline": [
+        0.1,
+        0.3999999999999999,
+        1.4,
+        2.4,
+        0.1,
+        0.1,
+        0.3999999999999999,
+        1.4,
+        2.4,
+        0.1,
+        0.1,
+        0.3999999999999999
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-uptime-kuma",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-adguard-sync",
+      "name": "AdGuard sync",
+      "type": "servidor",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.48",
+      "mac": "BC:24:11:00:27:17",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.8,
+      "online": true,
+      "sparkline": [
+        0.8,
+        1.8,
+        2.8,
+        0.1,
+        0.1,
+        0.8,
+        1.8,
+        2.8,
+        0.1,
+        0.1,
+        0.8,
+        1.8
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-adguard-sync",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-postgres",
+      "name": "Postgres",
+      "type": "servidor",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.49",
+      "mac": "BC:24:11:00:28:18",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 2.1,
+      "online": true,
+      "sparkline": [
+        3.1,
+        4.1,
+        0.10000000000000009,
+        1.1,
+        2.1,
+        3.1,
+        4.1,
+        0.10000000000000009,
+        1.1,
+        2.1,
+        3.1,
+        4.1
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-postgres",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "ct-redis",
+      "name": "Redis",
+      "type": "servidor",
+      "manufacturer": "Proxmox VE (CT)",
+      "ip": "192.168.8.50",
+      "mac": "BC:24:11:00:29:19",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.9,
+      "online": true,
+      "sparkline": [
+        2.9,
+        0.1,
+        0.1,
+        0.8999999999999999,
+        1.9,
+        2.9,
+        0.1,
+        0.1,
+        0.8999999999999999,
+        1.9,
+        2.9,
+        0.1
+      ],
+      "attachTo": "pve",
+      "infra": "ct",
+      "hostname": "ct-redis",
+      "dhcpLease": "renueva en 3 h 10 min",
+      "firstSeen": "hace 90 días",
+      "traffic24hRx": "1,1 GB",
+      "traffic24hTx": "88 MB",
+      "adguard": true,
+      "group": "red"
+    },
+    {
+      "id": "tv-salon-cable",
+      "name": "TV Salón (cable)",
+      "type": "tv",
+      "manufacturer": "Samsung",
+      "ip": "192.168.8.61",
+      "mac": "8C:EA:48:AA:02:02",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 24.4,
+      "online": true,
+      "sparkline": [
+        22.9,
+        23.4,
+        23.9,
+        24.4,
+        22.9,
+        23.4,
+        23.9,
+        24.4,
+        22.9,
+        23.4,
+        23.9,
+        24.4
+      ],
+      "attachTo": "dist-flint2-lan3",
+      "hostname": "tv-salon-cable",
+      "dhcpLease": "renueva en 5 h 22 min",
+      "firstSeen": "hace 60 días",
+      "traffic24hRx": "2,4 GB",
+      "traffic24hTx": "120 MB",
+      "adguard": true,
+      "group": "tv"
+    },
+    {
+      "id": "impresora-hp",
+      "name": "Impresora HP",
+      "type": "iot",
+      "manufacturer": "HP",
+      "ip": "192.168.8.62",
+      "mac": "3C:D9:2B:AA:03:03",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.1,
+      "online": true,
+      "sparkline": [
+        0.05,
+        0.05,
+        0.10000000000000009,
+        0.05,
+        0.05,
+        0.05,
+        0.10000000000000009,
+        0.05,
+        0.05,
+        0.05,
+        0.10000000000000009,
+        0.05
+      ],
+      "attachTo": "dist-flint2-lan3",
+      "hostname": "impresora-hp",
+      "dhcpLease": "renueva en 5 h 22 min",
+      "firstSeen": "hace 60 días",
+      "traffic24hRx": "2,4 GB",
+      "traffic24hTx": "120 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "xbox-one",
+      "name": "Xbox One",
+      "type": "consola",
+      "manufacturer": "Microsoft",
+      "ip": "192.168.8.64",
+      "mac": "7C:ED:8D:AA:05:05",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 4.2,
+      "online": true,
+      "sparkline": [
+        3.7,
+        4.2,
+        2.7,
+        3.2,
+        3.7,
+        4.2,
+        2.7,
+        3.2,
+        3.7,
+        4.2,
+        2.7,
+        3.2
+      ],
+      "attachTo": "dist-flint2-lan3",
+      "hostname": "xbox-one",
+      "dhcpLease": "renueva en 5 h 22 min",
+      "firstSeen": "hace 60 días",
+      "traffic24hRx": "2,4 GB",
+      "traffic24hTx": "120 MB",
+      "adguard": true,
+      "group": "otros"
+    },
+    {
+      "id": "receptor-av",
+      "name": "Receptor AV",
+      "type": "altavoz",
+      "manufacturer": "Denon",
+      "ip": "192.168.8.65",
+      "mac": "00:05:CD:AA:06:06",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.3,
+      "online": true,
+      "sparkline": [
+        0.30000000000000004,
+        0.05,
+        0.05,
+        0.05,
+        0.30000000000000004,
+        0.05,
+        0.05,
+        0.05,
+        0.30000000000000004,
+        0.05,
+        0.05,
+        0.05
+      ],
+      "attachTo": "dist-flint2-lan3",
+      "hostname": "receptor-av",
+      "dhcpLease": "renueva en 5 h 22 min",
+      "firstSeen": "hace 60 días",
+      "traffic24hRx": "2,4 GB",
+      "traffic24hTx": "120 MB",
+      "adguard": true,
+      "group": "iot"
+    },
+    {
+      "id": "deco-orange",
+      "name": "Deco Orange",
+      "type": "tv",
+      "manufacturer": "Sagemcom",
+      "ip": "192.168.8.66",
+      "mac": "48:83:B4:AA:07:07",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 1.1,
+      "online": true,
+      "sparkline": [
+        0.05,
+        0.10000000000000009,
+        0.6000000000000001,
+        1.1,
+        0.05,
+        0.10000000000000009,
+        0.6000000000000001,
+        1.1,
+        0.05,
+        0.10000000000000009,
+        0.6000000000000001,
+        1.1
+      ],
+      "attachTo": "dist-flint2-lan3",
+      "hostname": "deco-orange",
+      "dhcpLease": "renueva en 5 h 22 min",
+      "firstSeen": "hace 60 días",
+      "traffic24hRx": "2,4 GB",
+      "traffic24hTx": "120 MB",
+      "adguard": true,
+      "group": "tv"
+    },
+    {
+      "id": "pc-invitado",
+      "name": "PC invitado",
+      "type": "ordenador",
+      "manufacturer": "—",
+      "ip": "192.168.8.67",
+      "mac": "A2:F4:11:AA:08:08",
+      "routerId": "flint2",
+      "band": "cable",
+      "signalDbm": null,
+      "trafficMbps": 0.8,
+      "online": true,
+      "sparkline": [
+        0.05,
+        0.30000000000000004,
+        0.8,
+        0.05,
+        0.05,
+        0.30000000000000004,
+        0.8,
+        0.05,
+        0.05,
+        0.30000000000000004,
+        0.8,
+        0.05
+      ],
+      "attachTo": "dist-flint2-lan3",
+      "hostname": "pc-invitado",
+      "dhcpLease": "renueva en 5 h 22 min",
+      "firstSeen": "hace 60 días",
+      "traffic24hRx": "2,4 GB",
+      "traffic24hTx": "120 MB",
+      "adguard": true,
+      "group": "ordenadores"
+    }
+  ],
+  "deviceTotals": {
+    "total": 65,
+    "online": 59,
+    "knownOffline": 6,
+    "newToday": 3
+  },
+  "distributionNodes": [
+    {
+      "id": "dist-flint2-lan3",
+      "kind": "inferred",
+      "routerId": "flint2",
+      "port": "lan3",
+      "macCount": 8
+    },
+    {
+      "id": "dist-pve",
+      "kind": "hypervisor",
+      "routerId": "flint2",
+      "port": "lan5",
+      "macCount": 11,
+      "hostDeviceId": "pve",
+      "name": "Proxmox pve"
+    },
+    {
+      "id": "dist-living-lan3",
+      "kind": "managed",
+      "routerId": "living",
+      "port": "lan3",
+      "macCount": 4,
+      "name": "GS308E",
+      "ip": "192.168.8.13",
+      "mac": "28:C6:8E:1D:90:44",
+      "lldp": {
+        "chassis": "GS308E",
+        "mgmt": "192.168.8.13",
+        "caps": "Bridge",
+        "portDesc": "ge5"
+      }
+    }
+  ],
+  "adguard": {
+    "host": "192.168.8.1",
+    "port": 3000,
+    "status": "active",
+    "queries24h": 84312,
+    "blocked24h": 15687,
+    "blockedPct": 18.6,
+    "trackersBlocked": 9204,
+    "dnsLatencyMs": 14,
+    "clientsUsing": 60,
+    "clientsTotal": 65,
+    "topBlocked": [
+      {
+        "domain": "graph.facebook.com",
+        "count": 1204
+      },
+      {
+        "domain": "adservice.google.com",
+        "count": 986
+      },
+      {
+        "domain": "metrics.icloud.com",
+        "count": 731
+      },
+      {
+        "domain": "telemetry.nvidia.com",
+        "count": 512
+      },
+      {
+        "domain": "ads.tiktok.com",
+        "count": 448
+      }
+    ],
+    "filterLists": 6,
+    "rules": 218442
+  },
+  "wireguard": {
+    "interface": "wg0",
+    "subnet": "10.0.0.1/24",
+    "status": "active",
+    "peers": [
+      {
+        "id": "pixel-8-pro",
+        "name": "Pixel 8 Pro",
+        "type": "movil",
+        "tunnelIp": "10.0.0.2",
+        "active": true,
+        "lastHandshake": "hace 38 s",
+        "rx": "1,2 GB",
+        "tx": "214 MB"
+      },
+      {
+        "id": "macbook-air",
+        "name": "MacBook Air",
+        "type": "portatil",
+        "tunnelIp": "10.0.0.3",
+        "active": true,
+        "lastHandshake": "hace 1 min",
+        "rx": "640 MB",
+        "tx": "88 MB"
+      },
+      {
+        "id": "ipad-air",
+        "name": "iPad Air",
+        "type": "tablet",
+        "tunnelIp": "10.0.0.4",
+        "active": false,
+        "lastHandshake": "hace 2 días",
+        "rx": "3,1 GB",
+        "tx": "402 MB"
+      },
+      {
+        "id": "portatil-trabajo",
+        "name": "Portátil trabajo",
+        "type": "portatil",
+        "tunnelIp": "10.0.0.5",
+        "active": false,
+        "lastHandshake": "hace 6 h",
+        "rx": "812 MB",
+        "tx": "121 MB"
+      },
+      {
+        "id": "casa-familia",
+        "name": "Casa familia",
+        "type": "sitio",
+        "tunnelIp": "10.0.0.6",
+        "active": false,
+        "lastHandshake": "hace 9 días",
+        "rx": "12 GB",
+        "tx": "4,2 GB"
+      }
+    ]
+  },
+  "wan": {
+    "plan": "600/600 Mbps",
+    "downMbps": 84.2,
+    "upMbps": 12.6,
+    "latencyMs": 8,
+    "lossPct": 0,
+    "publicIp": "84.122.x.x",
+    "isp": "Digi",
+    "peakTodayMbps": 412,
+    "peakTodayTime": "21:14",
+    "avgDownMbps": 61,
+    "total24h": "1,32 TB"
+  },
+  "health": {
+    "score": 92,
+    "label": "Excelente",
+    "caption": "Puntuación de salud de la red",
+    "note": "Penalizado por la temperatura del Patio.",
+    "breakdown": [
+      {
+        "label": "temp. Patio",
+        "delta": -4
+      },
+      {
+        "label": "cobertura Patio",
+        "delta": -2
+      },
+      {
+        "label": "canal 2.4 GHz congestionado",
+        "delta": -2
+      }
+    ]
+  }
+}

+ 64 - 0
server-go/cmd/gen-demo-canon/main.go

@@ -0,0 +1,64 @@
+// gen-demo-canon — genera app/src/data/demo-canon.json desde el canon Go
+// (SPEC-65 D65-1: la fuente de verdad única del demo es Go).
+//
+// Uso: go run ./cmd/gen-demo-canon [-out ruta.json]
+// Sin -out, resuelve <repo>/app/src/data/demo-canon.json localizando la raíz
+// del repo (directorio que contiene server-go/go.mod) desde el cwd.
+package main
+
+import (
+	"encoding/json"
+	"flag"
+	"fmt"
+	"os"
+	"path/filepath"
+
+	"github.com/gnacho/netpulse/server-go/internal/adapters"
+)
+
+func repoRoot() (string, error) {
+	dir, err := os.Getwd()
+	if err != nil {
+		return "", err
+	}
+	for {
+		if st, err := os.Stat(filepath.Join(dir, "server-go", "go.mod")); err == nil && !st.IsDir() {
+			return dir, nil
+		}
+		parent := filepath.Dir(dir)
+		if parent == dir {
+			return "", fmt.Errorf("no se encuentra la raíz del repo (server-go/go.mod) desde el cwd")
+		}
+		dir = parent
+	}
+}
+
+func main() {
+	out := flag.String("out", "", "ruta de salida (por defecto <repo>/app/src/data/demo-canon.json)")
+	flag.Parse()
+	path := *out
+	if path == "" {
+		root, err := repoRoot()
+		if err != nil {
+			fmt.Fprintln(os.Stderr, "gen-demo-canon:", err)
+			os.Exit(1)
+		}
+		path = filepath.Join(root, "app", "src", "data", "demo-canon.json")
+	}
+	canon := adapters.BuildDemoCanon()
+	b, err := json.MarshalIndent(canon, "", "  ")
+	if err != nil {
+		fmt.Fprintln(os.Stderr, "gen-demo-canon:", err)
+		os.Exit(1)
+	}
+	b = append(b, '\n')
+	if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
+		fmt.Fprintln(os.Stderr, "gen-demo-canon:", err)
+		os.Exit(1)
+	}
+	if err := os.WriteFile(path, b, 0o644); err != nil {
+		fmt.Fprintln(os.Stderr, "gen-demo-canon:", err)
+		os.Exit(1)
+	}
+	fmt.Printf("demo-canon: %d devices → %s (%d bytes)\n", len(canon.Devices), path, len(b))
+}

+ 6 - 2
server-go/internal/adapters/demo.go

@@ -197,18 +197,22 @@ func (d *Demo) GetOverview(context.Context) (*Overview, error) {
 }
 
 func (d *Demo) buildOverview() *Overview {
+	wg := d.wireguardSnapshot()
+	dists := canonDistributionNodes()
 	return &Overview{
 		Health:            canonHealthScore(),
 		WAN:               d.wan,
 		Traffic:           canonTraffic(),
 		Adguard:           d.adguard,
-		Wireguard:         d.wireguardSnapshot(),
+		Wireguard:         wg,
 		Routers:           d.routersCopy(),
 		DeviceTotals:      deviceTotalsOf(d.devices), // D5: derivado del dataset
 		TopDevices:        d.topDevices(5),
 		Alerts:            d.alertsCopy(),
 		UnreadAlerts:      d.engine.UnreadCount(),
-		DistributionNodes: canonDistributionNodes(),
+		DistributionNodes: dists,
+		Topology:          BuildTopoSemantics(d.routers, d.devices, wg, dists), // SPEC-65 D65-3
+		VM:                ViewModelVersion,                                    // SPEC-65 D65-4
 		Ts:                time.Now().Unix(),
 	}
 }

+ 47 - 0
server-go/internal/adapters/demo_canon.go

@@ -0,0 +1,47 @@
+// demo_canon.go — Serialización del canon demo a JSON (SPEC-65 D65-1).
+//
+// La fuente de verdad única del canon es Go (demo_dataset.go/demo_extras.go);
+// app/src/data/demo-canon.json es un ARTEFACTO GENERADO (cmd/gen-demo-canon)
+// que la app importa en build. El test de frescura
+// (demo_canon_json_test.go) exige que el JSON commiteado coincida con lo que
+// produce BuildDemoCanon — si diverge: go run ./cmd/gen-demo-canon.
+//
+// NO se incluyen: traffic (series con random walk), alerts (tienen Seed del
+// engine) ni topDevices (la app los deriva ordenando por trafficMbps).
+package adapters
+
+// DemoCanonJSON es el contenido EXACTO de app/src/data/demo-canon.json
+// (claves camelCase, mismas formas que el contrato API de types.go).
+type DemoCanonJSON struct {
+	Routers           []Router           `json:"routers"`
+	Devices           []Device           `json:"devices"`
+	DeviceTotals      DeviceTotals       `json:"deviceTotals"`
+	DistributionNodes []DistributionNode `json:"distributionNodes"`
+	Adguard           AdGuardStats       `json:"adguard"`
+	Wireguard         WireGuardStats     `json:"wireguard"`
+	WAN               WAN                `json:"wan"`
+	Health            HealthScore        `json:"health"`
+}
+
+// BuildDemoCanon construye el canon completo con los agregados DERIVADOS del
+// dataset (SPEC-CANON D5): deviceTotals con deviceTotalsOf (NO literal),
+// router.clients con onlineClientsOf y adguard.clientsTotal = IDs únicos.
+func BuildDemoCanon() DemoCanonJSON {
+	devices := canonAllDevices()
+	routers := canonRouters()
+	for i := range routers {
+		routers[i].Clients = onlineClientsOf(devices, routers[i].ID)
+	}
+	adguard := canonAdguard()
+	adguard.ClientsTotal = len(devices)
+	return DemoCanonJSON{
+		Routers:           routers,
+		Devices:           devices,
+		DeviceTotals:      deviceTotalsOf(devices),
+		DistributionNodes: canonDistributionNodes(),
+		Adguard:           adguard,
+		Wireguard:         canonWireguard(),
+		WAN:               canonWAN(),
+		Health:            canonHealthScore(),
+	}
+}

+ 41 - 0
server-go/internal/adapters/demo_canon_json_test.go

@@ -0,0 +1,41 @@
+package adapters
+
+import (
+	"encoding/json"
+	"os"
+	"path/filepath"
+	"reflect"
+	"testing"
+)
+
+// Test de frescura del canon (SPEC-65 D65-1): app/src/data/demo-canon.json es
+// un artefacto GENERADO desde el canon Go — el test exige igualdad profunda
+// con BuildDemoCanon (tras normalizar ambos lados vía JSON marshal/unmarshal,
+// para comparar la forma serializada y no los tipos Go). Si diverge:
+//
+//	regenerar: go run ./cmd/gen-demo-canon
+func TestDemoCanonJSONFresco(t *testing.T) {
+	path := filepath.Join("..", "..", "..", "app", "src", "data", "demo-canon.json")
+	raw, err := os.ReadFile(path)
+	if err != nil {
+		t.Fatalf("leer %s: %v — regenerar: go run ./cmd/gen-demo-canon", path, err)
+	}
+	normalize := func(v any) any {
+		b, err := json.Marshal(v)
+		if err != nil {
+			t.Fatalf("marshal: %v", err)
+		}
+		var out any
+		if err := json.Unmarshal(b, &out); err != nil {
+			t.Fatalf("unmarshal: %v", err)
+		}
+		return out
+	}
+	var disk any
+	if err := json.Unmarshal(raw, &disk); err != nil {
+		t.Fatalf("%s no es JSON válido: %v", path, err)
+	}
+	if !reflect.DeepEqual(normalize(disk), normalize(BuildDemoCanon())) {
+		t.Fatalf("demo-canon.json desactualizado respecto al canon Go — regenerar: go run ./cmd/gen-demo-canon")
+	}
+}

+ 8 - 3
server-go/internal/adapters/demo_dataset.go

@@ -8,6 +8,10 @@
 // SPEC-CANON (fase 6): D1 switch gestionado = Device + distnode managed;
 // D3 una sola identidad por ID; D4 puertos del gateway; D5 totales
 // DERIVADOS del dataset (deviceTotalsOf / onlineClientsOf), no literales.
+// SPEC-65 D65-2: Device.Infra sellado en el canon (pve=hypervisor, sus
+// CTs/VMs=ct, switch-netgear=managed-switch).
+//
+//go:generate go run ../../cmd/gen-demo-canon
 package adapters
 
 import (
@@ -453,7 +457,8 @@ func topologyDevices() []Device {
 		withDetails(devExtra(Device{ID: "switch-netgear", Name: "Switch GS308E", Type: "switch", Manufacturer: "Netgear",
 			IP: "192.168.8.13", MAC: "28:C6:8E:1D:90:44", RouterID: "living", Band: "cable",
 			SignalDbm: nil, TrafficMbps: 0.02, Online: true, AttachTo: "living", Port: "lan3",
-			Lldp: &LldpInfo{Chassis: "GS308E", Mgmt: "192.168.8.13", Caps: "Bridge", PortDesc: "ge5"}}, 15, 0.04),
+			Infra: "managed-switch",
+			Lldp:  &LldpInfo{Chassis: "GS308E", Mgmt: "192.168.8.13", Caps: "Bridge", PortDesc: "ge5"}}, 15, 0.04),
 			"gs308e", "IP fija (reserva)", "hace 300 días", "64 MB", "12 MB", false, "red", "Network"),
 		// 3 clientes detrás del switch gestionado identificado por LLDP
 		// (nodo managed dist-living-lan3, Salón)
@@ -476,7 +481,7 @@ func topologyDevices() []Device {
 		// se anidan (OUI BC:24:11)
 		withDetails(Device{ID: "pve", Name: "Proxmox pve", Type: "servidor", Manufacturer: "Supermicro",
 			IP: "192.168.8.5", MAC: "3C:52:82:10:20:30", RouterID: "flint2", Band: "cable",
-			SignalDbm: nil, TrafficMbps: 12.3, Online: true, Port: "lan5",
+			SignalDbm: nil, TrafficMbps: 12.3, Online: true, Port: "lan5", Infra: "hypervisor",
 			Sparkline: []float64{8, 9, 10, 11, 12, 13, 12, 12, 12, 12, 12, 12.3}},
 			"pve", "IP fija (reserva)", "hace 400 días", "1,2 TB", "96 GB", true, "red", ""),
 	}
@@ -504,7 +509,7 @@ func topologyDevices() []Device {
 		out = append(out, withDetails(Device{
 			ID: c.id, Name: c.name, Type: c.typ, Manufacturer: "Proxmox VE (CT)",
 			IP: c.ip, MAC: fmt.Sprintf("BC:24:11:00:2%d:%02X", i, 0x10+i), RouterID: "flint2", Band: "cable",
-			SignalDbm: nil, TrafficMbps: mbps, Online: true, AttachTo: "pve", Sparkline: sp},
+			SignalDbm: nil, TrafficMbps: mbps, Online: true, AttachTo: "pve", Infra: "ct", Sparkline: sp},
 			c.id, "renueva en 3 h 10 min", "hace 90 días", "1,1 GB", "88 MB", true, "red", ""))
 	}
 	// Tras el switch/bridge inferido (gateway lan3, OUI heterogéneo, sin IP).

+ 102 - 0
server-go/internal/adapters/infra_test.go

@@ -0,0 +1,102 @@
+package adapters
+
+import "testing"
+
+// SPEC-65 D65-2: Device.infra sellado server-side ("hypervisor" | "ct" |
+// "managed-switch"); ausente = dispositivo normal.
+
+// Demo: el canon sella pve=hypervisor, sus 10 CTs/VMs=ct y
+// switch-netgear=managed-switch; ningún otro device lleva infra.
+func TestInfraSelladoDemoCanon(t *testing.T) {
+	devices := canonAllDevices()
+	cts := 0
+	for _, d := range devices {
+		switch {
+		case d.ID == "pve":
+			if d.Infra != "hypervisor" {
+				t.Fatalf("pve.infra=%q, esperaba hypervisor", d.Infra)
+			}
+		case d.ID == "switch-netgear":
+			if d.Infra != "managed-switch" {
+				t.Fatalf("switch-netgear.infra=%q, esperaba managed-switch", d.Infra)
+			}
+		case len(d.ID) > 3 && d.ID[:3] == "ct-":
+			if d.Infra != "ct" {
+				t.Fatalf("%s.infra=%q, esperaba ct", d.ID, d.Infra)
+			}
+			cts++
+		default:
+			if d.Infra != "" {
+				t.Fatalf("%s no debería llevar infra: %q", d.ID, d.Infra)
+			}
+		}
+	}
+	if cts != 10 {
+		t.Fatalf("CTs del pve: %d, esperaba 10", cts)
+	}
+	// Y llega al snapshot del overview.
+	d := NewDemo()
+	ov, err := d.GetOverview(t.Context())
+	if err != nil {
+		t.Fatal(err)
+	}
+	found := map[string]string{}
+	for _, dev := range ov.TopDevices {
+		found[dev.ID] = dev.Infra
+	}
+	for _, dev := range d.GetDevices(t.Context()) {
+		if dev.ID == "pve" && dev.Infra != "hypervisor" {
+			t.Fatalf("pve.infra en /api/devices: %q", dev.Infra)
+		}
+	}
+}
+
+// Live: el pipeline de topología sella el host del hipervisor y sus VMs.
+func TestInfraSelladoLiveHipervisor(t *testing.T) {
+	polled := polledWithFDB("flint2", "94:83:C4:00:00:01", map[string]string{
+		"3C:52:82:10:20:30": "lan2", // host (OUI normal)
+		"BC:24:11:00:20:10": "lan2", // CT1 (OUI Proxmox)
+		"BC:24:11:00:20:11": "lan2", // CT2
+	})
+	devices := []Device{
+		dev("3C:52:82:10:20:30", "flint2", "cable"),
+		dev("BC:24:11:00:20:10", "flint2", "cable"),
+		dev("BC:24:11:00:20:11", "flint2", "cable"),
+	}
+	devices, _ = inferTopology(polled, devices)
+	if devices[0].Infra != "hypervisor" {
+		t.Fatalf("host.infra=%q, esperaba hypervisor", devices[0].Infra)
+	}
+	for _, d := range devices[1:] {
+		if d.Infra != "ct" {
+			t.Fatalf("CT %s.infra=%q, esperaba ct", d.MAC, d.Infra)
+		}
+	}
+}
+
+// Live: un vecino LLDP managed cuya chassis-MAC existe como Device queda
+// sellado managed-switch.
+func TestInfraSelladoLiveManagedSwitch(t *testing.T) {
+	polled := polledWithFDB("living", "C1:83:C4:00:00:02", map[string]string{
+		"28:C6:8E:1D:90:44": "lan3", // chassis-MAC del GS308E
+		"7C:ED:8D:4A:11:22": "lan3", // cliente tras el switch
+	})
+	polled["living"].lldp = []LldpNeighbor{{
+		Port: "lan3", ChassisMac: "28:C6:8E:1D:90:44", Chassis: "GS308E",
+		Mgmt: "192.168.8.13", Caps: []string{"Bridge"},
+	}}
+	devices := []Device{
+		dev("28:C6:8E:1D:90:44", "living", "cable"),
+		dev("7C:ED:8D:4A:11:22", "living", "cable"),
+	}
+	devices, dists := inferTopology(polled, devices)
+	if len(dists) != 1 || dists[0].Kind != "managed" {
+		t.Fatalf("distnode managed esperado: %+v", dists)
+	}
+	if devices[0].Infra != "managed-switch" {
+		t.Fatalf("switch.infra=%q, esperaba managed-switch", devices[0].Infra)
+	}
+	if devices[1].Infra != "" {
+		t.Fatalf("el cliente tras el switch no lleva infra: %q", devices[1].Infra)
+	}
+}

+ 2 - 0
server-go/internal/adapters/live.go

@@ -1271,6 +1271,8 @@ func (l *Live) buildOverview(ctx context.Context) (*Overview, error) {
 		},
 		TopDevices: top, Alerts: alertsCopy, UnreadAlerts: unread,
 		DistributionNodes: distNodes,
+		Topology:          BuildTopoSemantics(routerList, devices, wgStats, distNodes), // SPEC-65 D65-3
+		VM:                ViewModelVersion,                                            // SPEC-65 D65-4
 		Ts:                time.Now().Unix(),
 	}, nil
 }

+ 263 - 0
server-go/internal/adapters/topo_semantics.go

@@ -0,0 +1,263 @@
+// topo_semantics.go — Builder del modelo SEMÁNTICO de topología (SPEC-65
+// D65-3), compartido demo/live. Porta a Go la lógica de asignación de
+// anillos y enlaces de app/src/components/topology/model.ts
+// (buildTopologyModel), SIN geometría: nada de coordenadas, radios, paths
+// SVG ni flujo de paquetes — eso queda en la app.
+//
+// Paridad con model.ts (canon demo fijada en topo_semantics_test.go):
+//   - El switch gestionado existe como Device Y como distnode managed: se
+//     excluye de chips/enlaces cualquier Device cuya MAC coincida con la
+//     chassis-MAC de un distnode managed (D1).
+//   - Anclaje al gateway: cableado SIN evidencia (ni attachTo ni puerto FDB)
+//     cuelga del gateway, no de su AP.
+//   - Solo los distnodes inferred|managed son hubs de enlaces "dist"; el
+//     hipervisor enlaza vía su Device host (sus CTs/VMs cuelgan del host).
+//   - Peers WG: los activos que exceden las 4 coordenadas canónicas no
+//     generan enlace (la app los agrupa en su chip "+N" de peers).
+package adapters
+
+import "strings"
+
+// Capacidad de los anillos canónicos de model.ts (GATEWAY_RINGS 5+8,
+// AP_RINGS 7+13): el límite de chips visibles por anillo que aplica la app.
+// HiddenPeers = clientes del anillo - visibles con este mismo límite.
+const (
+	topoGatewayRingCap = 13
+	topoAPRingCap      = 20
+)
+
+// maxTopoPeerChips: coordenadas canónicas de peers WG en model.ts (4); los
+// activos que exceden no se trazan como túnel propio.
+const maxTopoPeerChips = 4
+
+// BuildTopoSemantics deriva enlaces, anillos y peers ocultos del mismo bundle
+// que hoy consume la app (routers, devices, wireguard, distributionNodes).
+func BuildTopoSemantics(routers []Router, devices []Device, wg WireGuardStats, dists []DistributionNode) *TopoSemantics {
+	sem := &TopoSemantics{Links: []TopoLink{}, Rings: map[string][]string{}}
+	if len(routers) == 0 {
+		return sem
+	}
+
+	// Gateway y APs como model.ts: roleBadge "Principal" → gateway (si no,
+	// el primero); el resto (máx 3 = coordenadas canónicas de AP) son APs.
+	gateway := routers[0]
+	for _, r := range routers {
+		if r.RoleBadge == "Principal" {
+			gateway = r
+			break
+		}
+	}
+	aps := make([]Router, 0, 3)
+	for _, r := range routers {
+		if r.ID == gateway.ID {
+			continue
+		}
+		if len(aps) >= 3 {
+			break
+		}
+		aps = append(aps, r)
+	}
+	routerNodes := append([]Router{gateway}, aps...)
+	inRouter := map[string]bool{}
+	for _, r := range routerNodes {
+		inRouter[r.ID] = true
+	}
+
+	// D1: los Devices cuya MAC es la chassis-MAC de un distnode managed se
+	// representan SOLO como nodo managed (sin chip ni enlaces propios).
+	managedMacs := map[string]bool{}
+	for _, n := range dists {
+		if n.Kind == "managed" && n.Mac != "" {
+			managedMacs[strings.ToUpper(n.Mac)] = true
+		}
+	}
+	online := make([]Device, 0, len(devices))
+	for _, d := range devices {
+		if !d.Online || managedMacs[strings.ToUpper(d.MAC)] {
+			continue
+		}
+		online = append(online, d)
+	}
+	deviceByID := map[string]Device{}
+	for _, d := range online {
+		deviceByID[d.ID] = d
+	}
+	distByID := map[string]DistributionNode{}
+	for _, n := range dists {
+		distByID[n.ID] = n
+	}
+
+	// hubOf: attachTo (si resuelve a router/distnode/device conocido) o su
+	// router; un cableado SIN evidencia (ni attachTo ni puerto FDB) se ancla
+	// al GATEWAY (regla 2-Ago-2026 de model.ts).
+	hubOf := func(d Device) string {
+		if d.AttachTo != "" {
+			if inRouter[d.AttachTo] {
+				return d.AttachTo
+			}
+			if _, ok := distByID[d.AttachTo]; ok {
+				return d.AttachTo
+			}
+			if _, ok := deviceByID[d.AttachTo]; ok {
+				return d.AttachTo
+			}
+		}
+		if d.Band == "cable" && d.Port == "" {
+			return gateway.ID
+		}
+		return d.RouterID
+	}
+
+	// deviceHubs: dispositivos con hijos propios (switch gestionado,
+	// hipervisor), en orden de descubrimiento (orden del dataset, como el
+	// Set de JS). hypervisorHosts: hosts con distnode kind=hypervisor.
+	var deviceHubOrder []string
+	deviceHubs := map[string]bool{}
+	for _, d := range online {
+		if d.AttachTo == "" || deviceHubs[d.AttachTo] {
+			continue
+		}
+		if _, ok := deviceByID[d.AttachTo]; ok {
+			deviceHubs[d.AttachTo] = true
+			deviceHubOrder = append(deviceHubOrder, d.AttachTo)
+		}
+	}
+	hypervisorHosts := map[string]bool{}
+	for _, n := range dists {
+		if n.Kind == "hypervisor" && n.HostDeviceID != "" {
+			hypervisorHosts[n.HostDeviceID] = true
+		}
+	}
+
+	wiredLink := func(from string, d Device) {
+		sem.Links = append(sem.Links, TopoLink{From: from, To: d.ID, Kind: "wired", Port: d.Port})
+	}
+
+	// -- enlaces (mismo orden que model.ts) --------------------------------
+	sem.Links = append(sem.Links, TopoLink{From: "internet", To: gateway.ID, Kind: "wan"})
+	for _, ap := range aps {
+		l := TopoLink{From: gateway.ID, To: ap.ID, Kind: "uplink"}
+		if ap.Lldp != nil {
+			l.Port = ap.Lldp.PortDesc // puerto del uplink en el gateway (C2)
+		}
+		sem.Links = append(sem.Links, l)
+	}
+	// router → distnode (solo inferred|managed son hubs propios en el mapa)
+	for _, rn := range routerNodes {
+		for _, dn := range dists {
+			if dn.RouterID != rn.ID || (dn.Kind != "inferred" && dn.Kind != "managed") {
+				continue
+			}
+			sem.Links = append(sem.Links, TopoLink{From: rn.ID, To: dn.ID, Kind: "dist", Port: dn.Port})
+		}
+	}
+	// cableados directos del router (sin los device-hubs, que enlazan después)
+	for _, rn := range routerNodes {
+		for _, d := range online {
+			if d.Band != "cable" || deviceHubs[d.ID] || hubOf(d) != rn.ID {
+				continue
+			}
+			wiredLink(rn.ID, d)
+		}
+	}
+	// hijos cableados de device-hubs NO hipervisor (los CTs van en su fase)
+	for _, hubID := range deviceHubOrder {
+		if hypervisorHosts[hubID] {
+			continue
+		}
+		for _, d := range online {
+			if d.Band != "cable" || hubOf(d) != hubID {
+				continue
+			}
+			wiredLink(hubID, d)
+		}
+	}
+	// el cable del propio hub (chip con hijos; el hipervisor entre ellos)
+	for _, hubID := range deviceHubOrder {
+		wiredLink(hubOf(deviceByID[hubID]), deviceByID[hubID])
+	}
+	// hijos cableados de distnodes (abanico alrededor del círculo)
+	for _, rn := range routerNodes {
+		for _, dn := range dists {
+			if dn.RouterID != rn.ID || (dn.Kind != "inferred" && dn.Kind != "managed") {
+				continue
+			}
+			for _, d := range online {
+				if d.Band != "cable" || hubOf(d) != dn.ID {
+					continue
+				}
+				wiredLink(dn.ID, d)
+			}
+		}
+	}
+	// CTs/VMs anidados bajo el host hipervisor (línea desde el host)
+	for _, dn := range dists {
+		if dn.Kind != "hypervisor" || dn.HostDeviceID == "" {
+			continue
+		}
+		if _, ok := deviceByID[dn.HostDeviceID]; !ok {
+			continue
+		}
+		for _, d := range online {
+			if hubOf(d) != dn.HostDeviceID {
+				continue
+			}
+			wiredLink(dn.HostDeviceID, d)
+		}
+	}
+	// túneles WG: peers activos con coordenada canónica (máx 4)
+	n := 0
+	for _, p := range wg.Peers {
+		if !p.Active {
+			continue
+		}
+		if n >= maxTopoPeerChips {
+			break
+		}
+		sem.Links = append(sem.Links, TopoLink{From: "peer-" + p.ID, To: "internet", Kind: "wg"})
+		n++
+	}
+
+	// -- anillos por router --------------------------------------------------
+	// Anillo = chips que cuelgan DIRECTAMENTE del router (cableados directos,
+	// incluidos los device-hubs, y wifi). Orden SPEC-65: cableados primero,
+	// luego por banda 5GHz/2.4GHz, estable (orden del dataset).
+	for _, rn := range routerNodes {
+		var wired, g5, g24, other []string
+		for _, d := range online {
+			if hubOf(d) != rn.ID {
+				continue
+			}
+			switch d.Band {
+			case "cable":
+				wired = append(wired, d.ID)
+			case "5 GHz":
+				g5 = append(g5, d.ID)
+			case "2.4 GHz":
+				g24 = append(g24, d.ID)
+			default:
+				other = append(other, d.ID)
+			}
+		}
+		ring := make([]string, 0, len(wired)+len(g5)+len(g24)+len(other))
+		ring = append(ring, wired...)
+		ring = append(ring, g5...)
+		ring = append(ring, g24...)
+		ring = append(ring, other...)
+		if len(ring) == 0 {
+			continue
+		}
+		sem.Rings[rn.ID] = ring
+		cap := topoAPRingCap
+		if rn.ID == gateway.ID {
+			cap = topoGatewayRingCap
+		}
+		if hidden := len(ring) - cap; hidden > 0 {
+			if sem.HiddenPeers == nil {
+				sem.HiddenPeers = map[string]int{}
+			}
+			sem.HiddenPeers[rn.ID] = hidden
+		}
+	}
+	return sem
+}

+ 150 - 0
server-go/internal/adapters/topo_semantics_test.go

@@ -0,0 +1,150 @@
+package adapters
+
+import (
+	"reflect"
+	"testing"
+)
+
+// Golden test de la topología semántica (SPEC-65 D65-3): para el canon demo,
+// los links/rings/hiddenPeers del builder Go deben coincidir con lo que
+// produce hoy buildTopologyModel de app/src/components/topology/model.ts
+// (revisado a mano contra model.ts @ audit/v2-main):
+//   - wan + 3 uplinks (living/estudio con puerto LLDP del gateway; patio wifi)
+//   - 2 enlaces dist (switch inferido del gateway y GS308E managed del Salón)
+//   - cableados directos: nas/mac-mini/hue-hub anclados al GATEWAY (mac-mini y
+//     hue-hub son de Estudio pero no tienen evidencia: ni attachTo ni puerto
+//     FDB → regla de anclaje al gateway), ps5 al Salón, pve (host hipervisor)
+//   - 8 clientes tras el switch inferido + 3 tras el GS308E + 10 CTs del pve
+//   - 2 túneles WG (los 2 peers activos)
+//   - El GS308E (switch-netgear) NO genera chips/enlaces: su MAC es la
+//     chassis-MAC del distnode managed (D1)
+//   - Anillos: cableados primero, luego 5GHz, luego 2.4GHz (orden dataset)
+//   - hiddenPeers ausente: todos los anillos bajo el límite de chips visibles
+//     de la app (gateway 13, AP 20)
+func TestTopoSemanticsGoldenCanon(t *testing.T) {
+	sem := BuildTopoSemantics(canonRouters(), canonAllDevices(), canonWireguard(), canonDistributionNodes())
+
+	wantLinks := []TopoLink{
+		{From: "internet", To: "flint2", Kind: "wan"},
+		{From: "flint2", To: "living", Kind: "uplink", Port: "lan1"},
+		{From: "flint2", To: "estudio", Kind: "uplink", Port: "lan2"},
+		{From: "flint2", To: "patio", Kind: "uplink"},
+		{From: "flint2", To: "dist-flint2-lan3", Kind: "dist", Port: "lan3"},
+		{From: "living", To: "dist-living-lan3", Kind: "dist", Port: "lan3"},
+		{From: "flint2", To: "nas-synology", Kind: "wired", Port: "lan4"},
+		{From: "flint2", To: "mac-mini", Kind: "wired"},
+		{From: "flint2", To: "hue-hub", Kind: "wired"},
+		{From: "living", To: "ps5", Kind: "wired", Port: "lan1"},
+		{From: "flint2", To: "pve", Kind: "wired", Port: "lan5"},
+		{From: "dist-flint2-lan3", To: "pc-sobremesa", Kind: "wired"},
+		{From: "dist-flint2-lan3", To: "raspberry-pi", Kind: "wired"},
+		{From: "dist-flint2-lan3", To: "tv-salon-cable", Kind: "wired"},
+		{From: "dist-flint2-lan3", To: "impresora-hp", Kind: "wired"},
+		{From: "dist-flint2-lan3", To: "xbox-one", Kind: "wired"},
+		{From: "dist-flint2-lan3", To: "receptor-av", Kind: "wired"},
+		{From: "dist-flint2-lan3", To: "deco-orange", Kind: "wired"},
+		{From: "dist-flint2-lan3", To: "pc-invitado", Kind: "wired"},
+		{From: "dist-living-lan3", To: "xbox-series-s", Kind: "wired"},
+		{From: "dist-living-lan3", To: "apple-tv-4k", Kind: "wired"},
+		{From: "dist-living-lan3", To: "receptor-denon", Kind: "wired"},
+		{From: "pve", To: "ct-pihole", Kind: "wired"},
+		{From: "pve", To: "ct-home-assistant", Kind: "wired"},
+		{From: "pve", To: "ct-nextcloud", Kind: "wired"},
+		{From: "pve", To: "ct-jellyfin", Kind: "wired"},
+		{From: "pve", To: "ct-immich", Kind: "wired"},
+		{From: "pve", To: "ct-gitea", Kind: "wired"},
+		{From: "pve", To: "ct-uptime-kuma", Kind: "wired"},
+		{From: "pve", To: "ct-adguard-sync", Kind: "wired"},
+		{From: "pve", To: "ct-postgres", Kind: "wired"},
+		{From: "pve", To: "ct-redis", Kind: "wired"},
+		{From: "peer-pixel-8-pro", To: "internet", Kind: "wg"},
+		{From: "peer-macbook-air", To: "internet", Kind: "wg"},
+	}
+	if !reflect.DeepEqual(sem.Links, wantLinks) {
+		t.Fatalf("links:\n got: %+v\nwant: %+v", sem.Links, wantLinks)
+	}
+
+	wantRings := map[string][]string{
+		"flint2": {"nas-synology", "mac-mini", "hue-hub", "pve",
+			"pixel-8-pro", "iphone-ana", "macbook-pro", "pixel-7",
+			"timbre-nest", "enchufe-lavadora"},
+		"living": {"ps5",
+			"imac-salon", "tv-samsung", "galaxy-tab-s9", "chromecast", "homepod-mini",
+			"galaxy-s23", "nintendo-switch", "portatil-invitado",
+			"bombilla-1", "bombilla-2", "bombilla-3", "bombilla-4", "bombilla-5",
+			"bombilla-6", "echo-dot"},
+		"estudio": {"macbook-air", "ipad-pro", "iphone-trabajo",
+			"nest-mini", "enchufe-ventilador", "sonos-one"},
+		"patio": {"robot-aspirador", "camara-porche", "camara-jardin",
+			"sensor-riego", "enchufe-calefactor"},
+	}
+	if !reflect.DeepEqual(sem.Rings, wantRings) {
+		t.Fatalf("rings:\n got: %+v\nwant: %+v", sem.Rings, wantRings)
+	}
+
+	// Todos los anillos bajo el límite de chips visibles → sin "+N".
+	if len(sem.HiddenPeers) != 0 {
+		t.Fatalf("hiddenPeers debería estar vacío en el canon: %+v", sem.HiddenPeers)
+	}
+}
+
+// HiddenPeers: superado el límite de chips visibles del anillo (gateway 13,
+// AP 20), el exceso se reporta como "+N" por router.
+func TestTopoSemanticsHiddenPeers(t *testing.T) {
+	routers := []Router{
+		{ID: "gw", RoleBadge: "Principal"},
+		{ID: "ap", RoleBadge: "AP"},
+	}
+	devices := make([]Device, 0, 15+22)
+	for i := 0; i < 15; i++ {
+		devices = append(devices, Device{
+			ID: "gw-" + string(rune('a'+i)), MAC: "00:00:00:00:01:" + string(rune('A'+i)),
+			RouterID: "gw", Band: "5 GHz", Online: true,
+		})
+	}
+	for i := 0; i < 22; i++ {
+		devices = append(devices, Device{
+			ID: "ap-" + string(rune('a'+i)), MAC: "00:00:00:00:02:" + string(rune('A'+i)),
+			RouterID: "ap", Band: "2.4 GHz", Online: true,
+		})
+	}
+	sem := BuildTopoSemantics(routers, devices, WireGuardStats{}, nil)
+	want := map[string]int{"gw": 2, "ap": 2} // 15-13 y 22-20
+	if !reflect.DeepEqual(sem.HiddenPeers, want) {
+		t.Fatalf("hiddenPeers: got %+v want %+v", sem.HiddenPeers, want)
+	}
+	if got := len(sem.Rings["gw"]); got != 15 {
+		t.Fatalf("el anillo conserva TODOS los clientes (visibles+ocultos): %d", got)
+	}
+}
+
+// El overview demo lleva topology y vm SIEMPRE (SPEC-65 D65-3/D65-4).
+func TestDemoOverviewIncluyeTopologyYVM(t *testing.T) {
+	d := NewDemo()
+	ov, err := d.GetOverview(t.Context())
+	if err != nil {
+		t.Fatal(err)
+	}
+	if ov.VM != ViewModelVersion {
+		t.Fatalf("overview.vm=%d, ViewModelVersion=%d", ov.VM, ViewModelVersion)
+	}
+	if ov.Topology == nil {
+		t.Fatal("overview.Topology ausente en demo")
+	}
+	// Mismo resultado que el builder puro sobre el canon.
+	want := BuildTopoSemantics(canonRouters(), canonAllDevices(), canonWireguard(), canonDistributionNodes())
+	if !reflect.DeepEqual(ov.Topology, want) {
+		t.Fatalf("overview.Topology != builder canon:\n got: %+v\nwant: %+v", ov.Topology, want)
+	}
+}
+
+// Sin routers: semántica vacía pero no nil (la app cae a su cálculo propio).
+func TestTopoSemanticsSinRouters(t *testing.T) {
+	sem := BuildTopoSemantics(nil, nil, WireGuardStats{}, nil)
+	if sem == nil || sem.Links == nil || sem.Rings == nil {
+		t.Fatalf("semántica vacía debe tener links/rings no-nil: %+v", sem)
+	}
+	if len(sem.Links) != 0 || len(sem.Rings) != 0 {
+		t.Fatalf("sin routers no hay links ni anillos: %+v", sem)
+	}
+}

+ 9 - 0
server-go/internal/adapters/topology.go

@@ -167,9 +167,13 @@ func inferTopology(polled map[string]*routerPolled, devices []Device) ([]Device,
 						ID: id, Kind: "hypervisor", RouterID: routerID, Port: port,
 						MacCount: len(kept), HostDeviceID: devices[hidx].ID, Name: devices[hidx].Name,
 					})
+					// SPEC-65 D65-2: sellado de infra — host = hypervisor,
+					// las MACs con OUI de hipervisor anidadas bajo él = ct.
+					devices[hidx].Infra = "hypervisor"
 					for _, mac := range vmMACs {
 						if idx, ok := byMAC[mac]; ok && devices[idx].RouterID == routerID {
 							devices[idx].AttachTo = devices[hidx].ID
+							devices[idx].Infra = "ct"
 						}
 					}
 					continue
@@ -186,6 +190,11 @@ func inferTopology(polled map[string]*routerPolled, devices []Device) ([]Device,
 					MacCount: len(kept), Name: nb.displayName(), Ip: nb.Mgmt,
 					Mac: nb.ChassisMac, Lldp: nb.info(),
 				})
+				// SPEC-65 D65-2: el vecino LLDP managed que existe como Device
+				// queda sellado como managed-switch.
+				if idx, ok := byMAC[nb.ChassisMac]; ok {
+					devices[idx].Infra = "managed-switch"
+				}
 				for _, mac := range kept {
 					// SPEC-CANON D2: la chassis-MAC del propio switch NO cuelga
 					// de su propio nodo — su Device queda con attachTo al

+ 37 - 1
server-go/internal/adapters/types.go

@@ -173,6 +173,11 @@ type Device struct {
 	// AttachTo: hub del que cuelga en el mapa (router por defecto; id de
 	// DistributionNode inferido o de otro Device — hipervisor/switch).
 	AttachTo string `json:"attachTo,omitempty"`
+	// Infra: rol de infraestructura sellado server-side (Fase 6.5). La app NO
+	// infiere: pinta badge si viene. "hypervisor" (host Proxmox/VMware/…),
+	// "ct" (CT/VM anidado bajo hipervisor), "managed-switch" (switch con gestión
+	// identificado por LLDP — hoy switch-netgear).
+	Infra string `json:"infra,omitempty"` // "hypervisor"|"ct"|"managed-switch"
 	// --- extras demo (omitempty = ausentes en live) ---
 	Hostname     string `json:"hostname,omitempty"`
 	DHCPLease    string `json:"dhcpLease,omitempty"`
@@ -223,6 +228,32 @@ type DistributionNode struct {
 // el alias mantiene el contrato adapters.AlertEvent para handlers y tests.
 type AlertEvent = alerts.AlertEvent
 
+// ViewModelVersion es la versión del view-model de presentación (SPEC-65
+// D65-4). La API es un view-model versionado: un cliente debe rechazar/avisar
+// si `vm` supera la versión que soporta. Bump = cualquier cambio incompatible
+// de forma (añadir campos opcionales NO bumpea).
+const ViewModelVersion = 1
+
+// TopoSemantics: modelo semántico de la topología (Fase 6.5). La app conserva
+// SOLO la geometría de píxeles; asignaciones de anillo, enlaces y conteos de
+// peers ocultos llegan calculados.
+type TopoSemantics struct {
+	Links []TopoLink `json:"links"`
+	// Rings: routerId → ids de Device en su anillo (orden: cableados primero,
+	// luego por banda 5GHz/2.4GHz, estable).
+	Rings map[string][]string `json:"rings"`
+	// HiddenPeers: routerId → nº de clientes no pintados como chip (el "+N").
+	HiddenPeers map[string]int `json:"hiddenPeers,omitempty"`
+}
+
+// TopoLink es un enlace semántico del mapa (sin geometría).
+type TopoLink struct {
+	From string `json:"from"` // id: router | device | distnode | "internet" | "peer-<wgPeerId>"
+	To   string `json:"to"`
+	Kind string `json:"kind"`           // "wan"|"uplink"|"wired"|"dist"|"wg"
+	Port string `json:"port,omitempty"` // puerto físico si aplica
+}
+
 // Overview es el bundle completo (SPEC §7.8). Ts en SEGUNDOS.
 type Overview struct {
 	Health       HealthScore    `json:"health"`
@@ -239,7 +270,12 @@ type Overview struct {
 	// v5). Vacío/ausente si aún no hay datos FDB: el mapa cuelga los
 	// cableados del router (degradación amable).
 	DistributionNodes []DistributionNode `json:"distributionNodes,omitempty"`
-	Ts                int64              `json:"ts"` // floor(now/1000) — SEGUNDOS
+	// Topology: semántica de topología precalculada (SPEC-65 D65-3). Puntero:
+	// ausente en snapshots viejos → la app usa su cálculo actual como fallback.
+	Topology *TopoSemantics `json:"topology,omitempty"`
+	// VM: versión del view-model (SPEC-65 D65-4). SIEMPRE presente.
+	VM int `json:"vm"`
+	Ts int64 `json:"ts"` // floor(now/1000) — SEGUNDOS
 }
 
 // ---------------------------------------------------------------------------

+ 2 - 0
server-go/internal/db/db.go

@@ -154,6 +154,8 @@ func Open(dataDir string) (*DB, error) {
 	migrate(sqldb, "sessions", "ua", "ALTER TABLE sessions ADD COLUMN ua TEXT")
 	migrate(sqldb, "sessions", "user_id", "ALTER TABLE sessions ADD COLUMN user_id INTEGER")
 	migrate(sqldb, "users", "language", "ALTER TABLE users ADD COLUMN language TEXT DEFAULT 'auto'")
+	// SPEC-65 D65-5: nombre visible por usuario ("" = usar el username).
+	migrate(sqldb, "users", "display_name", "ALTER TABLE users ADD COLUMN display_name TEXT DEFAULT ''")
 
 	// Si no hubo migración Node (instalación fresca creada por Go), marca la
 	// DB para que el siguiente arranque no dispare una "migración" espuria

+ 12 - 5
server-go/internal/httpapi/auth.go

@@ -47,7 +47,8 @@ func (s *server) handleLogout(w http.ResponseWriter, r *http.Request) {
 	w.WriteHeader(http.StatusNoContent)
 }
 
-// handleMe: {user, role, language, mode} (language releído de users).
+// handleMe: {user, role, language, displayName, mode} (language/displayName
+// releídos de users; SPEC-65 D65-5: displayName "" = no puesto).
 func (s *server) handleMe(mode string) http.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) {
 		user := auth.UserFromContext(r.Context())
@@ -60,11 +61,17 @@ func (s *server) handleMe(mode string) http.HandlerFunc {
 		if err := s.db.QueryRow("SELECT language FROM users WHERE id = ?", user.ID).Scan(&lang); err == nil && lang != nil {
 			language = *lang
 		}
+		displayName := ""
+		var dn *string
+		if err := s.db.QueryRow("SELECT display_name FROM users WHERE id = ?", user.ID).Scan(&dn); err == nil && dn != nil {
+			displayName = *dn
+		}
 		writeJSON(w, http.StatusOK, map[string]any{
-			"user":     user.Username,
-			"role":     user.Role,
-			"language": language,
-			"mode":     mode,
+			"user":        user.Username,
+			"role":        user.Role,
+			"language":    language,
+			"displayName": displayName,
+			"mode":        mode,
 		})
 	}
 }

+ 3 - 1
server-go/internal/httpapi/server.go

@@ -102,6 +102,7 @@ func NewHandler(d Deps) http.Handler {
 	mux.HandleFunc("GET /api/topology", s.handleTopology)
 	mux.HandleFunc("GET /api/dawn", s.handleDawn)
 	mux.HandleFunc("GET /api/adguard/clients", s.handleAdguardClients)
+	mux.HandleFunc("GET /api/system/info", s.handleSystemInfo)
 
 	// --- Sondeo manual (botón "Refrescar" de Topología; 202 + SSE empuja) ---
 	mux.HandleFunc("POST /api/refresh", s.handleRefresh)
@@ -120,8 +121,9 @@ func NewHandler(d Deps) http.Handler {
 	mux.HandleFunc("POST /api/push/unsubscribe", s.handlePushUnsubscribe)
 
 	// --- Users ---
-	// Idioma propio: FUERA del gate admin (se registra antes en Node).
+	// Idioma y nombre propios: FUERA del gate admin (se registran antes en Node).
 	mux.HandleFunc("PUT /api/users/me/language", s.handleMyLanguage)
+	mux.HandleFunc("PUT /api/users/me/display-name", s.handleMyDisplayName)
 	// Resto: solo admin.
 	mux.Handle("GET /api/users", auth.RequireAdmin(http.HandlerFunc(s.handleListUsers)))
 	mux.Handle("POST /api/users", auth.RequireAdmin(http.HandlerFunc(s.handleCreateUser)))

+ 112 - 0
server-go/internal/httpapi/system.go

@@ -0,0 +1,112 @@
+// system.go — GET /api/system/info (SPEC-65 D65-6): datos REALES del
+// proceso/servidor (nunca hardcodeados), autenticado (cualquier usuario).
+// Las lecturas de /proc y /etc tienen fallback amable ("" / 0) si no son
+// legibles (p.ej. contenedor sin /proc completo); los parseadores son
+// funciones puras para testearlas con fixtures.
+package httpapi
+
+import (
+	"net/http"
+	"os"
+	"runtime"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// systemInfo es la respuesta de GET /api/system/info.
+type systemInfo struct {
+	Version    string `json:"version"`    // versión de la app (const Version, la de update.go)
+	GoVersion  string `json:"goVersion"`  // runtime.Version()
+	OS         string `json:"os"`         // runtime.GOOS
+	Arch       string `json:"arch"`       // runtime.GOARCH
+	Distro     string `json:"distro"`     // /etc/os-release PRETTY_NAME ("" si no legible)
+	Kernel     string `json:"kernel"`     // /proc/sys/kernel/osrelease ("" si no legible)
+	CPUModel   string `json:"cpuModel"`   // /proc/cpuinfo "model name" (o "Model" en ARM)
+	CPUCores   int    `json:"cpuCores"`   // runtime.NumCPU()
+	MemTotalMb int64  `json:"memTotalMb"` // /proc/meminfo MemTotal → MiB
+	UptimeS    int64  `json:"uptimeS"`    // uptime del PROCESO netpulse, segundos
+	Demo       bool   `json:"demo"`       // DEMO_MODE activo
+}
+
+// parseOsReleasePretty extrae PRETTY_NAME de un contenido de os-release
+// ("" si ausente). Tolera comillas y espacios.
+func parseOsReleasePretty(content string) string {
+	for _, line := range strings.Split(content, "\n") {
+		line = strings.TrimSpace(line)
+		if !strings.HasPrefix(line, "PRETTY_NAME=") {
+			continue
+		}
+		v := strings.TrimPrefix(line, "PRETTY_NAME=")
+		v = strings.TrimSpace(v)
+		v = strings.Trim(v, `"`)
+		return v
+	}
+	return ""
+}
+
+// parseCPUModel devuelve la primera entrada "model name" (x86) o "Model"
+// (ARM/DeviceTree) de un contenido de /proc/cpuinfo ("" si ninguna).
+func parseCPUModel(content string) string {
+	for _, line := range strings.Split(content, "\n") {
+		key, val, ok := strings.Cut(line, ":")
+		if !ok {
+			continue
+		}
+		switch strings.TrimSpace(key) {
+		case "model name", "Model":
+			return strings.TrimSpace(val)
+		}
+	}
+	return ""
+}
+
+// parseMemTotalMB convierte MemTotal (kB) de un contenido de /proc/meminfo a
+// MiB (0 si ausente o inválido).
+func parseMemTotalMB(content string) int64 {
+	for _, line := range strings.Split(content, "\n") {
+		if !strings.HasPrefix(line, "MemTotal:") {
+			continue
+		}
+		fields := strings.Fields(line)
+		if len(fields) < 2 {
+			return 0
+		}
+		kb, err := strconv.ParseInt(fields[1], 10, 64)
+		if err != nil {
+			return 0
+		}
+		return kb / 1024
+	}
+	return 0
+}
+
+// readFileOrEmpty lee un fichero de texto del sistema ("" si no legible).
+func readFileOrEmpty(path string) string {
+	b, err := os.ReadFile(path)
+	if err != nil {
+		return ""
+	}
+	return string(b)
+}
+
+// handleSystemInfo: 200 con los datos del proceso/servidor (sesión).
+func (s *server) handleSystemInfo(w http.ResponseWriter, _ *http.Request) {
+	started := s.started
+	if started.IsZero() {
+		started = time.Now() // tests sin Started: uptime ~0 en vez de negativo
+	}
+	writeJSON(w, http.StatusOK, systemInfo{
+		Version:    Version,
+		GoVersion:  runtime.Version(),
+		OS:         runtime.GOOS,
+		Arch:       runtime.GOARCH,
+		Distro:     parseOsReleasePretty(readFileOrEmpty("/etc/os-release")),
+		Kernel:     strings.TrimSpace(readFileOrEmpty("/proc/sys/kernel/osrelease")),
+		CPUModel:   parseCPUModel(readFileOrEmpty("/proc/cpuinfo")),
+		CPUCores:   runtime.NumCPU(),
+		MemTotalMb: parseMemTotalMB(readFileOrEmpty("/proc/meminfo")),
+		UptimeS:    int64(time.Since(started).Seconds()),
+		Demo:       s.adapter.Mode() == "demo",
+	})
+}

+ 39 - 9
server-go/internal/httpapi/users.go

@@ -1,6 +1,7 @@
 // users.go — CRUD de usuarios (paridad routes/users.js).
 //
 //	PUT  /api/users/me/language   (cualquier rol — fuera del gate admin)
+//	PUT  /api/users/me/display-name (cualquier rol — fuera del gate admin)
 //	GET  /api/users               (admin)
 //	POST /api/users               (admin) → 201 · 400 · 409
 //	PUT  /api/users/:id/password  (admin) → 204 (invalida sus sesiones)
@@ -14,6 +15,7 @@ import (
 	"regexp"
 	"strconv"
 	"strings"
+	"unicode/utf8"
 
 	"github.com/gnacho/netpulse/server-go/internal/auth"
 	"github.com/gnacho/netpulse/server-go/internal/db"
@@ -52,6 +54,31 @@ func (s *server) adminCount() int {
 	return n
 }
 
+// handleMyDisplayName (SPEC-65 D65-5): {displayName: string} → 204 (fuera del
+// gate admin). Trim, máx 40 runes, vacío permitido (= volver al username) y
+// sin '<' ni '>' (el frontend ya escapa, pero no se permite HTML).
+func (s *server) handleMyDisplayName(w http.ResponseWriter, r *http.Request) {
+	me := auth.UserFromContext(r.Context())
+	var body struct {
+		DisplayName *string `json:"displayName"`
+	}
+	if !readJSONBody(r, &body) || body.DisplayName == nil {
+		writeError(w, http.StatusBadRequest, "invalid_input", `Se esperaba { "displayName": string }`)
+		return
+	}
+	name := strings.TrimSpace(*body.DisplayName)
+	if utf8.RuneCountInString(name) > 40 {
+		writeError(w, http.StatusBadRequest, "invalid_input", "displayName máximo 40 caracteres")
+		return
+	}
+	if strings.ContainsAny(name, "<>") {
+		writeError(w, http.StatusBadRequest, "invalid_input", "displayName no puede contener '<' ni '>'")
+		return
+	}
+	_, _ = s.db.Exec("UPDATE users SET display_name = ? WHERE id = ?", name, me.ID)
+	w.WriteHeader(http.StatusNoContent)
+}
+
 // handleMyLanguage: {language: auto|es|en} → 204 (fuera del gate admin).
 func (s *server) handleMyLanguage(w http.ResponseWriter, r *http.Request) {
 	me := auth.UserFromContext(r.Context())
@@ -67,9 +94,10 @@ func (s *server) handleMyLanguage(w http.ResponseWriter, r *http.Request) {
 	w.WriteHeader(http.StatusNoContent)
 }
 
-// handleListUsers: {users:[{id, username, role, language, created_at}]} por username.
+// handleListUsers: {users:[{id, username, role, language, displayName, created_at}]}
+// por username (SPEC-65 D65-5: displayName, "" si no puesto).
 func (s *server) handleListUsers(w http.ResponseWriter, r *http.Request) {
-	rows, err := s.db.Query("SELECT id, username, role, language, created_at FROM users ORDER BY username")
+	rows, err := s.db.Query("SELECT id, username, role, language, display_name, created_at FROM users ORDER BY username")
 	if err != nil {
 		writeError(w, http.StatusInternalServerError, "internal_error")
 		return
@@ -78,13 +106,14 @@ func (s *server) handleListUsers(w http.ResponseWriter, r *http.Request) {
 	users := []map[string]any{}
 	for rows.Next() {
 		var (
-			id        int64
-			username  string
-			role      string
-			language  sql.NullString
-			createdAt int64
+			id          int64
+			username    string
+			role        string
+			language    sql.NullString
+			displayName sql.NullString
+			createdAt   int64
 		)
-		if err := rows.Scan(&id, &username, &role, &language, &createdAt); err != nil {
+		if err := rows.Scan(&id, &username, &role, &language, &displayName, &createdAt); err != nil {
 			continue
 		}
 		var lang any
@@ -92,7 +121,8 @@ func (s *server) handleListUsers(w http.ResponseWriter, r *http.Request) {
 			lang = language.String
 		}
 		users = append(users, map[string]any{
-			"id": id, "username": username, "role": role, "language": lang, "created_at": createdAt,
+			"id": id, "username": username, "role": role, "language": lang,
+			"displayName": displayName.String, "created_at": createdAt,
 		})
 	}
 	writeJSON(w, http.StatusOK, map[string]any{"users": users})