Skip to main content
Home / Portfolio / AI Command Center
Infrastructure

AI Command Center

A local home screen for a self-hosted app fleet, with Claude Code inside

Built by Rogue AI · Local home screen + embedded terminal · Localhost only

Designed and built in one day, 11 November 2026. The first two visual versions were rejected; the third, a 3D globe with the apps in orbit, is the one that shipped. A chat panel planned in the spec was removed the same day.

AI Command Center, A local home screen for a self-hosted app fleet, with Claude Code inside

The problem

A fleet of local apps, each in its own Docker stack on its own port, means a row of browser tabs, a terminal for docker compose, another for Claude Code, and no single place that says what is running and what today holds. I wanted one screen that opens like an app, shows the day from the apps that already know it, starts whatever is stopped, and puts the coding agent one click away, without opening any of it to the network.

What I built

A plain Node server on the host, no framework and no build step, that serves one page as an app window. The centrepiece is a 3D dotted globe drawn with three.js, with the fleet's apps orbiting it as satellites: green means open, grey means click to start it via docker compose. Cards on top show today (calendar, the planned training day and the planned meals, read from three app databases), new opportunities with NEW badges for anything first seen since the last visit, the top three high-priority tasks as chips, and a system ring for containers and local AI services. A collapsible panel runs a real Claude Code session in the browser through node-pty and xterm.js over a WebSocket.

Architecture

Plain Node host server
One server file and three small modules, no framework, no bundler. Edit the page and reload; edit the server and restart. Runs on the host next to Docker rather than inside it, because it has to call docker and spawn a terminal.
Read-only data sources
Each source is one function with a 5 second timeout that returns data or an error. Database access uses each app's own least-privilege role, its password read from that app's env file at startup, and every session opens with default_transaction_read_only on.
3D fleet globe
three.js with vendored world-atlas land data, served from node_modules with no CDN. Apps orbit as satellites; a click opens a running app or starts a stopped one through the single write endpoint, which only accepts names from a fixed list.
Embedded Claude Code terminal
node-pty spawns the agent in the project folder; xterm.js renders it over a WebSocket. One session at a time, and it survives a page reload because the pty keeps running and the page re-attaches.
Localhost-only security model
Listens on 127.0.0.1, Host allowlist, Origin check on WebSocket and POSTs, a per-start random token injected into the served page, strict CSP with frame-ancestors none, no-store caching and no referrer.
App window launcher
A desktop shortcut starts the server hidden if it is not running and opens the page as a chromeless app window, with fallbacks if the preferred browser is missing.

Tech stack

Node.jsthree.jsxterm.jsnode-ptyWebSocket (ws)PostgreSQL (read-only)Docker Compose

What broke first

  • ▸

    An embedded terminal is full control of the machine, so I wrote the guard list before the panel: bind to 127.0.0.1 only, a Host allowlist against DNS rebinding, an Origin check on the WebSocket and every POST, a random token made at each server start and only readable by the served page, and a strict CSP.

  • ▸

    One dead source must never take the page down. Every data source is one function that returns data or an error inside a 5 second timeout, and a panel whose app is stopped shows a Start button instead of a blank card.

  • ▸

    Cutting was part of the build. A question box wired to the LLM bridge was in the spec, turned out not to be needed, and came out the same day together with its allowlist entry. Less surface on a page that already holds a shell.

Outcome

One window that shows the day, the state of the fleet, and the coding agent side by side, with every stopped app one click from running. It reads from the other apps and never changes their data, and nothing about it is reachable from outside the machine.

Honest limits

This is a personal tool for one person on one machine, not a product. There is no login: the localhost bind and the per-start token are the gate, which is fine on a single-user desktop and wrong anywhere else, so it is never exposed to the network. It reads other apps' databases but never writes to them; the only write is starting an app from a fixed list. Finance and health data are kept off the page on purpose, those apps only show as up or down.

Related reading

← Back to portfolio