diff --git a/AGENTS.md b/AGENTS.md index f0a2025..595fc99 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -440,14 +440,14 @@ Each `NodeType` has a custom React Flow node component in `client/src/components | Node Type | Component | Visual Style | |---|---|---| -| `DEVICE` | `DeviceNode.tsx` | Rack icon; accent border color by ModuleType; shows IP if linked | -| `SERVICE` | `ServiceNode.tsx` | Rounded card, colored left border, icon + label | -| `DATABASE` | `DatabaseNode.tsx` | Cylinder icon, dark teal accent | -| `API` | `ApiNode.tsx` | Badge style with optional method tag (REST/gRPC/WS) | -| `EXTERNAL` | `ExternalNode.tsx` | Dashed border, cloud icon | +| `DEVICE` | `DeviceNode.tsx` | Rack icon; accent border color by ModuleType; shows IP if linked or overridden by metadata | +| `SERVICE` | `ServiceNode.tsx` | Rounded card, colored left border, icon + label; shows IP/Port if set in metadata | +| `DATABASE` | `DatabaseNode.tsx` | Cylinder icon, dark teal accent; shows IP/Port if set in metadata | +| `API` | `ApiNode.tsx` | Badge style with optional method tag (REST/gRPC/WS); shows IP/Port if set in metadata | +| `EXTERNAL` | `ExternalNode.tsx` | Dashed border, cloud icon; shows IP/Port if set in metadata | | `VLAN` | `VlanNode.tsx` | Colored square matching VLAN color swatch | -| `FIREWALL` | `FirewallNode.tsx` | Shield icon, red accent | -| `LOAD_BALANCER` | `LBNode.tsx` | Scale/balance icon | +| `FIREWALL` | `FirewallNode.tsx` | Shield icon, red accent; shows IP/Port if set in metadata | +| `LOAD_BALANCER` | `LBNode.tsx` | Scale/balance icon; shows IP/Port if set in metadata | | `USER` | `UserNode.tsx` | Person icon, neutral gray | | `NOTE` | `NoteNode.tsx` | Sticky note style, no handles, free text | @@ -463,7 +463,7 @@ Each `NodeType` has a custom React Flow node component in `client/src/components - Right-click canvas → context menu: Add Node (all 10 types placed at cursor position) - Right-click node → Edit (label/colour/module link), Duplicate, Delete - Right-click edge → Toggle Animation, set edge type (bezier/smooth/step/straight), Delete -- Double-click node → `NodeEditModal` (label, accent colour swatch + custom picker, rack module link) +- Double-click node → `NodeEditModal` (label, accent colour swatch + custom picker, logical IP/Port metadata, rack module link) ### Persistence @@ -608,6 +608,8 @@ The Dockerfile should run `npx prisma migrate deploy && node dist/index.js` as t 8. **Ports auto-generated on Module creation** — use `MODULE_PORT_DEFAULTS`. Do not require manual port addition. 9. **DeviceNode position is canvas-independent** — linking a node to a Module does not constrain its canvas position. 10. **VLAN seed is blank** — the user creates all VLANs manually. Do not pre-seed VLAN records. +11. **Logical Address Metadata** — IP and Port for mapper nodes are stored as a JSON string in the `metadata` field of the `ServiceNode` table. This avoids schema migrations for functional logical address tracking. +12. **Fixed Drag & Drop** — Rack Planner drag-and-drop utilizes `@dnd-kit` with optimized hit-testing via `document.elementFromPoint` and `pointer-events: none` on the `DragOverlay`. Dragged modules remain mounted to maintain library state. --- diff --git a/RREADME.md b/README.md similarity index 92% rename from RREADME.md rename to README.md index b7bed92..924f96e 100644 --- a/RREADME.md +++ b/README.md @@ -19,7 +19,9 @@ A self-hosted, dark-mode web app for visualising and managing network rack infra - Right-click canvas → add any node type at cursor position - Right-click node → Edit, Duplicate, Delete - Right-click edge → Toggle animation, change edge type, Delete -- Double-click a node → edit label, accent colour, and rack module link +- Double-click a node → edit label, accent colour, logical IP/Port, and rack module link +- Logical Address mapping — assign IP and Port to any node type via metadata (stored as JSON) +- Persistent storage — all node details and logical addresses are saved to the SQLite database - Auto-populate nodes from all rack modules ("Import Rack" button) - Connect nodes by dragging from handles; Delete key removes selected items - Minimap, zoom controls, snap-to-grid (15px), PNG export