Commit graph

56 commits

Author SHA1 Message Date
Claude
5d56a1d902
Phase 1b: SSH jump-host chaining, TOFU host-key verification, multi-host Settings UI
Terminal connections can now reference a jumpHostIntegrationId on the SSH
integration config; the backend connects to the jump host first and tunnels
to the real target via ssh2's forwardOut(), rather than connecting directly.

Added an ssh_host_keys table and a hostVerifier callback that accepts and
stores a host's fingerprint on first connect, then hard-rejects on any
mismatch on subsequent connects (trust-on-first-use).

Settings previously only ever showed/edited one integration per type, which
silently prevented configuring more than one SSH host at all. Added a
dedicated multi-host SSH section (per-host Save/Test/Delete, Add SSH Host,
and a Jump Host dropdown) so jump-host chaining is actually usable from the UI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-19 11:04:46 +00:00
Claude
067bf16c04
Mark Phase 1a complete in migration doc 2026-06-19 10:52:15 +00:00
Claude
71f49e0700
Add Phase 1a: core SSH terminal (Termix migration)
Implements the minimal-viable terminal described in TERMIX_MIGRATION.md
Phase 1a: a real interactive SSH session in the browser over a
WebSocket, using xterm.js on the frontend and ssh2 on the backend.
Reuses ArchNest's existing SSH integrations (host/port/username/
password/privateKey/passphrase) instead of introducing a second,
duplicate host-management system the way Termix has one.

Backend: new /api/terminal WebSocket route (registered via
@fastify/websocket) handling connect/input/resize/disconnect messages,
authenticated via a JWT passed as a query param (browsers can't set
custom headers on the WS handshake). Extracted the integration secret
loader out of routes/integrations.ts into db/secrets.ts so the new
terminal route can reuse it without duplicating the decrypt logic.

Frontend: new Terminal.tsx page listing configured SSH hosts and
rendering an xterm.js terminal wired to the WebSocket; wired into
App.tsx at /terminal. vite.config.ts's dev proxy now forwards
WebSocket upgrades (ws: true) so this works under `npm run dev`.

Verified end-to-end against a real (test) ssh2-based SSH server:
connect, shell banner, keystroke echo, and prompt redraw all worked
correctly over the actual WebSocket protocol.

Deliberately deferred to Phase 1b/1c per the migration doc: jump-host
chaining, tab/split-pane UI, terminal theme/font settings, OPKSSH cert
auth, tmux session monitor, session recording.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-19 10:52:04 +00:00
Claude
f2629a22f8
Document the Termix-to-ArchNest migration plan
User wants full Termix feature parity (SSH terminal, tunnels, file
manager, Docker management, RDP/VNC/Telnet) merged into ArchNest as a
single app, single backend, single auth, single database, reskinned
to ArchNest's look, with Termix's Electron app/installers/OIDC-LDAP-2FA/
translations explicitly dropped per the user's approved tradeoff.

Splits the work into 5 phases (terminal, tunnels, file manager, Docker,
RDP/VNC), each independently committable, plus a sub-split for Phase 1
itself given its real size (~5,000 lines across session management,
jump-host chaining, OPKSSH cert auth, and tmux monitoring) so the first
checkpoint is a working core terminal rather than one giant unreviewable
change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-19 10:48:42 +00:00
Claude
1d1f98f5aa
Update HANDOFF.md: Proxmox TLS and fast-jwt fixes are done 2026-06-19 10:28:58 +00:00
Claude
e42853a046
Allow self-signed TLS for Proxmox and fix critical fast-jwt vuln
Proxmox ships with a self-signed cert by default, which Node's fetch
rejected outright; route Proxmox requests through an undici Agent with
rejectUnauthorized disabled so real Proxmox hosts can be connected.

Also bump @fastify/jwt to v10, which pulls in a patched fast-jwt and
resolves the critical advisories (crit-header bypass, algorithm
confusion, cache collision, ReDoS, empty-HMAC-secret auth bypass) that
npm audit flagged on the old v9/fast-jwt<=6.2.3 pairing. Verified auth
still works end-to-end (setup, valid token, rejected bad token) after
the upgrade; npm audit now reports 0 vulnerabilities.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-19 10:28:37 +00:00
Claude
70b2ef8a69
Update README and add HANDOFF.md for session handoff
Documents the real backend, all 8 completed integration adapters, known
caveats (Proxmox TLS, fast-jwt vuln, SSH key textarea UX, the
IntegrationType/integrationTypes enum duplication footgun), and what's
explicitly on hold (Terminal/Termix), so another AI session can resume
work with full context.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 21:12:50 +00:00
Claude
7524690ebd
Add SSH integration adapter for local infra without an API
Many self-hosted machines have no management API, so add an SSH-based
adapter (using ssh2) that connects with password or key auth and probes
hostname/disk/mem/load via a single shell command, surfacing health
status like the other integrations. Also fixes routes/integrations.ts's
hardcoded type enum, which was out of sync with the IntegrationType
union and rejected the new 'ssh' type.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 21:06:16 +00:00
Claude
0cc86474e9
Add AWS integration adapter with real EC2 instance listing
Implements testConnection via STS GetCallerIdentity and listResources via
EC2 DescribeInstances, mapping instance state to resource health. Verified
end-to-end against real AWS endpoints — invalid credentials return AWS's
actual rejection message rather than crashing. Intended for use with a
dedicated, least-privilege IAM user (ec2:DescribeInstances + sts:GetCallerIdentity).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 20:18:26 +00:00
Claude
1540380442
Add Weather integration adapter
Implements testConnection against wttr.in's JSON API using the
configured location, no API key required. listResources is intentionally
omitted since weather conditions don't map to the resource-health model.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 20:17:23 +00:00
Claude
907f5deb5f
Add Cloudflare integration adapter with real zone status
Implements testConnection and listResources against the Cloudflare API,
reporting the configured zone's real status (active/pending/etc) as a
resource. Fixed a bug where non-2xx responses with non-JSON bodies (e.g.
invalid zone ID) threw inside the JSON parse instead of failing cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 20:16:19 +00:00
Claude
527e7dad17
Add NetBird integration adapter with real peer listing
Implements testConnection and listResources against the NetBird
Management API (/api/peers), mapping connected/disconnected peers to
resource health. Defaults to the NetBird Cloud API but respects an
optional baseUrl override for self-hosted management servers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 20:15:11 +00:00
Claude
57f53a3ab4
Add Proxmox integration adapter with real resource listing
Implements testConnection (via /api2/json/version) and listResources
(via /api2/json/cluster/resources) using Proxmox's API token auth header,
following the same pattern as the Docker adapter. Verified end-to-end:
graceful failure against an unreachable host, correct event logging, and
exclusion from the resources endpoint when not connected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 20:12:40 +00:00
Claude
49c49635a9
Remove remaining mock data: fake user identity, notification badge, system status
TopBar, Sidebar, and the Settings profile form previously showed a hardcoded
"ArchNest Ops" identity, a fake unread-notification count, and a static "All
Systems Operational" indicator. These now use the real logged-in user (with
a new PUT /api/auth/me endpoint to edit display name/email/avatar) and real
integration health for the sidebar status dot.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 20:08:30 +00:00
Claude
3b920fcfb2
Replace mock data on Glance and Infrastructure with real backend data
Adds an events table + logEvent helper for a genuine activity log, and
a /api/integrations/resources aggregate endpoint backed by a new optional
listResources adapter method (implemented for Docker via its containers API).
StatusCards, MiddleRow, BottomRow, and Infrastructure now render real
integration/resource/event data instead of hardcoded numbers, with empty
states where no data source exists yet (AWS cost, historical trends).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 19:56:10 +00:00
Claude
b49f8ac8f5
Wire BookNest to real bookmarks API, removing mock data
Bookmarks, categories, favorites, quick access, recently added, link
health, and category breakdown are now all derived from real backend
data instead of hardcoded arrays. Adds an Add Bookmark modal (with
inline new-category creation) and a working favorite toggle, both
backed by the existing /api/bookmarks endpoints. Adds
createBookmarkCategory/updateBookmark to the API client.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 19:33:26 +00:00
Claude
5c1fc911c9
Wire Settings Integrations to real backend API
Replaces mock integration data in Settings.tsx with live calls to
api.listIntegrations/createIntegration/updateIntegration/testIntegration.
Also fixes apiFetch sending Content-Type: application/json on bodyless
requests, which made Fastify reject Test Connection calls with 400.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 19:26:48 +00:00
Claude
e2793b06fe
Add enrollment, login, and auth-gated routing to the frontend
- New AuthContext drives app state (loading/needs-setup/enrolling/
  logged-out/logged-in) by checking GET /api/system/setup-status and
  GET /api/auth/me on load; JWT stored in localStorage
- Enrollment page: step 1 creates the admin account via POST /api/setup,
  step 2 lets you connect integrations (or skip) before entering the app
- Login page for returning sessions; TopBar's Sign Out now calls
  logout() instead of being a dead link
- Verified end-to-end in a browser: fresh setup -> connect/skip ->
  dashboard, reload persists the session, sign out -> login -> back in

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 19:13:27 +00:00
Claude
a0b71c7028
Add backend skeleton: Fastify + SQLite API with auth and integrations
- Single-user JWT auth with a first-run /api/setup endpoint, gated by
  GET /api/system/setup-status, to back an upcoming enrollment page
- SQLite schema for users, integrations, secrets (AES-256-GCM encrypted),
  bookmarks, and bookmark categories
- Integration adapter registry with real health-check adapters for
  Uptime Kuma and Docker, stubs for the rest, wired to
  POST /api/integrations/:id/test
- CRUD routes for integrations and bookmarks
- backend/ as its own Docker service in docker-compose.yml, Vite dev
  proxy for /api, .env.example for required secrets

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 19:04:48 +00:00
Claude
f24edb74b2
Add avatar upload to Settings, document Settings page, update README
- Profile section: click avatar to upload a personal photo (FileReader
  preview, hover camera icon overlay), replacing static initials
- README.md rewritten with project-specific page status table, dev
  setup, tech stack, and deployment notes
- design-decisions.md: add Settings Page subsection documenting layout,
  section-switching, and the avatar upload technique

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 18:50:43 +00:00
Claude
e386e327b4
Add Settings page with Profile, Appearance, Integrations, Notifications, Data & Backup, About sections 2026-06-18 18:44:26 +00:00
Claude
f87e88420c
Document BookNest page design decisions 2026-06-18 18:35:39 +00:00
Claude
4e4855f380
Stretch BookNest sidebar cards to align bottom borders with main column 2026-06-18 18:31:22 +00:00
Claude
9d7fc518de
Align BookNest header layout closer to blueprint: stats under title, Quick Access label 2026-06-18 18:27:37 +00:00
Claude
bed903914a
Restructure BookNest hero header: bigger title, taller Favorites card, Add Bookmark button 2026-06-18 18:25:19 +00:00
Claude
8882d0af7c
Push BookNest hero reveal further down 2026-06-18 18:15:28 +00:00
Claude
b97e4f5648
Push BookNest content down to reveal more of hero banner 2026-06-18 18:14:51 +00:00
Claude
87e8422563
Add hero banner blend and subtitle to BookNest page 2026-06-18 18:13:26 +00:00
Claude
2bc140db33
Fix lucide-react icon export errors in BookNest page 2026-06-18 18:10:16 +00:00
Claude
106af334a3
Remove standalone Network page, add as future tab on Infrastructure
Drop the /network route, page, and sidebar entry. Network will instead
become a tab alongside Overview on the Infrastructure page later, so add
a disabled placeholder tab for now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 18:02:09 +00:00
Claude
f29bce550f
Add Network page
First pass built from the blueprint spec: status cards row, Top Talkers,
Network Topology dot map, Interface Utilization + Alert Summary, Traffic
Over Time, Protocol Distribution, Recent Events, and footer stats bar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:59:40 +00:00
Claude
2bad101342
Document Infrastructure page decisions in design-decisions.md
Captures hero layout, card blending technique, and the small-infra
node-grid rationale so future pages can reuse these patterns.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:57:35 +00:00
Claude
2f15baee38
Replace Infrastructure world map with a Node Status grid
A world map didn't fit a small-scale infra. Show servers as a tile grid
with colored status dots (healthy/warning/critical) instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:56:11 +00:00
Claude
d3bb51f621
Note future integration goal for live cloud provider data
Capture that Infrastructure (and likely Glance) KPI data should eventually
come from real provider APIs (AWS, Linode, etc.) via user-supplied API
keys, for pricing/budget/utilization/region data instead of static mocks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:49:34 +00:00
Claude
ef6ffb2426
Restore dim/vignette blend on middle row cards only
Resource Trend stays plain per clarification; only Resource Distribution
and Infrastructure Map get the hero-style blend.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:47:09 +00:00
Claude
107bf2e1ba
Remove hero-style vignette/dim from middle row and Resource Trend cards
Leave the card backgrounds plain/regular instead of blending them like
the hero banner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:43:28 +00:00
Claude
fe9e2ab62a
Polish Infrastructure status cards and add network background to Resource Trend
Make status cards more transparent with centered, better-spaced content,
and apply the network-traffic background to Resource Trend with a
blue/orange/green/brown line set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:39:47 +00:00
Claude
1481b9e39c
Use blank KPI background with overlaid titles for middle-row cards
The baked-in labels on the Resource Distribution and Infrastructure Map
background art were getting covered by the dim/shadow overlay, so switch
both cards to the blank KPI background and render the title as our own
text element on top instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:32:11 +00:00
Claude
c2aeaa1202
Revert status row to plain cards and dim middle-row KPI backgrounds
The blank KPI background didn't read well on the top status row, so
revert those to the plain card style. Add a dimming overlay to the
Resource Distribution and Infrastructure Map backgrounds to reduce
visual clutter in the middle row.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:28:52 +00:00
Claude
9876798a5c
Restore Resource Distribution card, remove Resource Utilization, apply blank KPI bg to status row
Swap back to Resource Distribution + Infrastructure Map in the middle
row, drop Resource Utilization, and scale the card vignette back so
border art stays readable while still blending into the background.
Apply the new blank KPI background asset to the top status cards row.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:26:39 +00:00
Claude
8689e0982b
Blend KPI card borders into background and remove Resource Distribution card
Fix radial-gradient vignette to use closest-side sizing so card border
art fades fully at edge midpoints, not just corners. Remove the Resource
Distribution donut card and expand Infrastructure Map to fill the space.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 17:20:38 +00:00
Claude
7af31c0202
Apply KPI background art to Infrastructure middle row cards
Pulls in the new gold-framed hex-pattern background assets for Resource
Distribution, Infrastructure Map, and Top Resources by Utilization,
replacing the plain card styling with the baked-in border/labels.
Also stages network-kpi-bg.png in public/ for the future Network page.
2026-06-18 17:06:53 +00:00
Claude
0ba30804f1
Push Infrastructure KPI cards down further from hero banner 2026-06-18 16:56:18 +00:00
Claude
4cd6d31467
Add breathing room above Infrastructure KPI status cards 2026-06-18 16:53:55 +00:00
Claude
54b7aa1e32
Extend Infrastructure hero banner to the top, overlapping the top bar
Moves the hero rendering to the layout level so the banner shows the
full golden arch and sky behind the page title, search bar, and
sub-tabs row. TopBar and the search input backgrounds are now
transparent so the banner reads through cleanly.
2026-06-18 16:50:06 +00:00
Claude
2c87c32fd7
Remove future sub-tabs from Infrastructure page, keep Overview only 2026-06-18 16:41:45 +00:00
Claude
8f2962eb13
Add seamless hero banner to Infrastructure page
Fades the banner image into the page background using a mask gradient
and radial vignette, matching the borderless blend technique from Glance.
2026-06-18 16:26:10 +00:00
Claude
ec04f568dd
Add client-side routing and build Infrastructure page
Wires up react-router-dom so the sidebar nav actually navigates between
pages, with route-aware active highlighting and dynamic page titles.
Extracts Glance content into its own page component and adds a new
Infrastructure page matching the mockup: status cards, resource
distribution/cost breakdown donuts, infra map, top resources by
utilization, resource trend chart, recent activity, and footer stats.
2026-06-18 16:15:34 +00:00
Claude
b97a14a682
Move sidebar collapse toggle to floating edge button
Previously sat as an inline button below the nav items, disconnected
from the rest of the layout. Now it's a small circle straddling the
sidebar/content boundary, vertically centered on the viewport - the
common pattern for collapsible side panels.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 16:02:42 +00:00
Claude
1cbc1dab40
Redesign sidebar nav and stretch Glance layout to fill viewport
Sidebar: prominent gold arc logo using a cleaned transparent-background
asset (keys out the source PNG's baked-in brown texture), horizontal
icon+label nav items with larger spacing, and a filled gold-tinted
highlight box on the selected item.

Layout: main content is now a flex column filling the viewport - hero
fixed at top, middle row (Resource Overview / Recent Activity / Top
Alerts) stretches to fill available height with items distributed, and
the bottom row (Network Traffic / Shortcuts) anchored to the bottom.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
2026-06-18 14:53:34 +00:00