Summary
Add a GET /api/v1/header endpoint to the Rust API that reports the host the FluxNode
instance is running on, and render it on the right-hand side of the site footer — mirroring
the system-info line in the Fluxtracker header.
This was scoped out of the footer rework (v1.1.1) because the client is a static bundle and
has no way to learn anything about the machine serving it. Everything else in that rework
shipped; this is the remaining piece.
Motivation
Fluxtracker's header carries a line like:
Hosted in Melbourne, Australia | Running on linux | cpus 8 | mem 12.4/32.0 GB (39%)
It is genuinely useful — it makes it obvious the site is itself running on Flux, and which
node is serving you. FluxNode currently cannot show this: the browser has no access to the
serving node's identity or specs, and the site is served by nginx from a static build.
Three options were considered:
| Option |
Verdict |
Flux network-wide totals from gstore |
Free, but it is network capacity, not this host — different meaning |
Viewer's own device via navigator.* |
Describes the visitor, not the site; deviceMemory is Chrome-only |
| Rust API endpoint |
Correct data, needs the API deployed ← this issue |
Proposed endpoint
GET /api/v1/header
Implementation notes
- Crate: add
sysinfo for cores / memory / uptime.
It is cross-platform and needs no privileged access.
- Router: register in
api_v1::make_router() in api/src/main.rs, alongside the existing
/nodes, /node-single/:addr, /demo and /bench-version routes.
- Location: resolve the container's public IP once at startup and geolocate it, then
cache for the process lifetime — do not look it up per request. Fall back to null and
let the UI omit the segment. Flux apps relocate between nodes, so it must be re-resolved
on boot rather than baked into the image.
- Caching: memoise the whole payload for ~30s. The footer polls, and
sysinfo refreshes
are not free.
- CORS: the existing
mirror_request() handling already covers this.
- Cost: the response must stay small — this is on every page load.
Client work
- Render as a right-aligned block in
client/src/components/Footer/index.jsx, matching the
existing footer theme (not Fluxtracker's terminal green).
- Poll on the same cadence as the rest of the dashboard (30s), and degrade silently: if
the endpoint 404s or the API is not deployed, render nothing. Production currently runs
with REACT_APP_FLUXNODE_INFO_API_MODE=debug and talks to the official APIs directly, so
the endpoint being absent is the normal case until this is deployed.
- Hide the whole block under ~768px, as Fluxtracker does with its
.host-line.
Acceptance criteria
References
- Fluxtracker header:
src/lib/components/Header.svelte — see .host-line and its @media (max-width: 768px) rule
- Fluxtracker API shape:
GET /api/header → data.host.{platform,location,cpuCores,totalMemMB,usedMemMB,memPercent}
Summary
Add a
GET /api/v1/headerendpoint to the Rust API that reports the host the FluxNodeinstance is running on, and render it on the right-hand side of the site footer — mirroring
the system-info line in the Fluxtracker header.
This was scoped out of the footer rework (v1.1.1) because the client is a static bundle and
has no way to learn anything about the machine serving it. Everything else in that rework
shipped; this is the remaining piece.
Motivation
Fluxtracker's header carries a line like:
It is genuinely useful — it makes it obvious the site is itself running on Flux, and which
node is serving you. FluxNode currently cannot show this: the browser has no access to the
serving node's identity or specs, and the site is served by nginx from a static build.
Three options were considered:
gstorenavigator.*deviceMemoryis Chrome-onlyProposed endpoint
GET /api/v1/header{ "host": { "platform": "linux", // std::env::consts::OS "arch": "x86_64", // std::env::consts::ARCH "cpuCores": 8, "totalMemMB": 32768, "usedMemMB": 12698, "memPercent": 39, "uptimeSeconds": 864321, "location": { // null when lookup fails — treat as optional "city": "Helsinki", "country": "Finland", "countryCode": "FI" } }, "app": { "version": "1.1.1", // env!("CARGO_PKG_VERSION") "fluxOsVersion": "5.2.1", // optional, if resolvable "arcaneCodename": "..." // optional }, "generatedAt": 1756180000000 }Implementation notes
sysinfofor cores / memory / uptime.It is cross-platform and needs no privileged access.
api_v1::make_router()inapi/src/main.rs, alongside the existing/nodes,/node-single/:addr,/demoand/bench-versionroutes.cache for the process lifetime — do not look it up per request. Fall back to
nullandlet the UI omit the segment. Flux apps relocate between nodes, so it must be re-resolved
on boot rather than baked into the image.
sysinforefreshesare not free.
mirror_request()handling already covers this.Client work
client/src/components/Footer/index.jsx, matching theexisting footer theme (not Fluxtracker's terminal green).
the endpoint 404s or the API is not deployed, render nothing. Production currently runs
with
REACT_APP_FLUXNODE_INFO_API_MODE=debugand talks to the official APIs directly, sothe endpoint being absent is the normal case until this is deployed.
.host-line.Acceptance criteria
GET /api/v1/headerreturns the shape above, in under 50 ms warmnullwithout breaking the responseReferences
src/lib/components/Header.svelte— see.host-lineand its@media (max-width: 768px)ruleGET /api/header→data.host.{platform,location,cpuCores,totalMemMB,usedMemMB,memPercent}