Files
diskless-workstation/serving/kiosk-app/README.md
T

64 lines
2.6 KiB
Markdown

# Fleet Kiosk App
A cyber sci-fi **spaceship monitoring & control terminal** — the page the
diskless kiosk (weston + Chromium) loads at boot. Replaces the old single static
`serving/http/kiosk/index.html` test page.
Built with **Svelte 5** + **Tailwind CSS v4** + **Vite**, served as a static
bundle from its own nginx, and reverse-proxied at `/kiosk/` by the main serving
nginx (`../http/default.conf`). Fully self-contained — no CDNs or web fonts — so
it renders on the air-gapped boot LAN (the stack's dnsmasq sinkholes external
call-home).
## Pages
Top navbar with five views, each with dummy telemetry:
- **BRIDGE** — overview tiles, systems status, subsystem load, event log
- **REACTOR** — core output/temp/containment, power distribution, fuel cells
- **NAVIGATION** — heading/velocity, tactical radar plot, flight plan, FTL drive
- **LIFE SUPPORT** — atmosphere mix, per-deck environment, recyclers
- **COMMS** — channels, signal bars, message traffic
Routing is hash-based (`#/power`, `#/nav`, …) so deep links stay client-side and
the proxy needs no SPA-fallback rewrite. A shared 1 Hz clock and small
random-walk "jitter" helpers make the static data feel live.
## Develop
```bash
npm install
npm run dev # http://localhost:5173/kiosk/
```
## Build the container
This is an **independent project** with its own CI. The build is standalone:
```bash
docker build -t fleet-kiosk:dev .
docker run --rm -p 8088:80 fleet-kiosk:dev # http://localhost:8088/
```
CI ([.gitea/workflows/ci.yaml](.gitea/workflows/ci.yaml)) builds + pushes
`git.bitasylum.org/audiobuzz/fleet-kiosk` (branch-aware tags; `:latest` on
`main`). The fleet **serving stack consumes the published image** — it sets
`KIOSK_IMAGE`/`KIOSK_VERSION` in its `.env` and the `kiosk` compose service pulls
it (publishing on `127.0.0.1:${KIOSK_APP_PORT:-8088}`, proxied at `/kiosk/`). For
local serving-stack dev you can instead uncomment `build: ./kiosk-app` on that
service. To point the diskless kiosk here, keep the Packer
`kiosk_url=http://boot.fleet.lab/kiosk/` default (resolved by the stack's dnsmasq).
## Relationship to the fleet repo
Consumed by `diskless-workstation` as a **git submodule** at `serving/kiosk-app/`.
This repo owns the app + its image; the OS-side kiosk runtime (weston, Chromium
lockdown, `kiosk-session`, the systemd unit) lives in that parent repo under
`files/kiosk/`. See [CLAUDE.md](CLAUDE.md) for the integration contracts.
## Replacing the dummy data
All fictional telemetry lives in [src/lib/data.js](src/lib/data.js). A future
runtime agent could swap these constants for a `fetch()` to a fleet API; the
components only read from that module.