AUDIO

Listen to this page

0:00
Chapters

    Admin dashboard

    Web SPA served by the core at /admin (Vite + Svelte 5 runes + Tailwind v4; the build lives in server/dashboard, the built bundle is baked into the core image). Screen visibility depends on the user role — only admin sees the full set.

    Login
    └── Dashboard (widget grid)
        ├── Plugins ── Plugin detail
        ├── Marketplace (npm)
        ├── Voice console
        ├── Users & roles
        ├── AI provider
        ├── Env variables
        ├── Software updates (admin)
        ├── Remote access
        └── Audit log
    
    1. Login — username/password → JWT; role determines visible screens and available tools.
    2. Dashboard — a widget grid on a 4-column layout (2 on phones, wide widgets clamp to the narrower row height scheme). A fixed system bar sits on top of the grid (pulsing core / STT / TTS health dots — the pulse is cosmetic, the check itself runs on a 30 s refresh — plugins enabled, active AI provider sit right-aligned without dots: counters, not live statuses). Every plugin may offer widgets (declared in its manifest — see plugins-api, "Dashboard widgets"): cameras shows the last motion snapshot, Tuya pairs quick device toggles with sensor charts — a 24 h sparkline per reading (temperature, voltage, current, power, energy, humidity, illuminance, battery) with the current value and an up/down mark against the 24 h average — and, through a runtime hook, one chart card per device (added from the picker, same charts plus a toggle), scenarios offers quick-run buttons, Orbit the current weather, backup the last-snapshot age; the core also provides a live events tile. Each user arranges their own dashboard: Edit layout enables a drag-and-drop mode (pointer-based, works on touch) — dragging a tile moves it in the flow, a size button cycles its span within the plugin-declared min/max (1×1, 2×1, 1×2, 2×2 …), ✕ removes it and an add-picker lists widgets not yet placed; Save persists the arrangement per user, Cancel reverts it. Tiles of widgets that declare settings carry a ⚙ button (see plugins-api, "Widget settings"): a modal opens with the widget's own options — the Tuya overview filters online-only vs all devices plus a per-device checkbox list, the device card picks the chart period (24 h / 7 d / 30 d) and the charted parameters. The Tuya overview is toggles-only and the device cards are charts-only; its settings picker lists only toggle-capable devices, and toggling a switch from the tile asks for a ✓/✕ confirmation first (auto-cancelled after a few seconds); the same widget kind can be placed several times with different settings — two cards of one device, one for temperature, one for humidity.
    3. Plugins — table (name, version, enabled, scopes, minRole) with enable/disable, update and rollback. The update flow shows a permission-diff dialog ("new version requests system:exec — approve?") and a progress bar for the migrate → swap → health-check stages.
    4. Plugin detail — manifest viewer, version history, migration status, per-plugin audit trail.
    5. Marketplace (npm) — search, install and update plugins from the npm registry; every row carries its trust badge (official = org npm scope, approved = org-vetted allowlist, unverified = explicit own-risk confirmation); see marketplace.
    6. Voice console — record from the browser mic → sends .wav to /voice, plays the TTS response; displays transcript + chosen tool + args. The main screen for debugging the agent's tool matching.
    7. Users & roles — household members, role dropdown (admin/user/guest/kid), time-based restrictions for kids, voice-profile enrollment for speaker recognition.
    8. AI provider — provider switch (mock / local Ollama / Llama.cpp / OpenAI / Anthropic / OpenRouter), model selection, temperature, fallback provider. Each provider keeps its own settings (model, base URL, key); the selected one is the default that answers requests.
    9. Env variables — key list with masked values; secrets can be overwritten but never viewed again after saving.
    10. Software updates (admin) — current version, stable/unstable channel, "check for updates", the available release with its notes and the confirmed Update now flow (db snapshot → host updater → health check, live progress) plus one-click Roll back; details in deployment → "Software updates & rollback".
    11. Remote access — status of the hub tunnel, connection QR code (encoded as holai://connect?hub=…&home=…&key=…&ek=…), hub credentials, register / rotate pair key; see hub.
    12. Audit log — filterable table: who, when, which tool, args, result; CSV export. A checkbox above the tool field switches it between "search tool" and "exclude tool" (tick = show only, untick = hide that tool). The Result column shows the stored response — a tool's result, the agent's answer, or a plugin route's JSON body (full text in the tooltip); the CSV export carries a result column too. Every chat/voice request also logs the AGENT step as tool "agent": which provider decided and answered (e.g. "openrouter/nvidia/…" — external LLM usage is visible here), the question, the language and the tool it called — plus the answer that came back.
    13. Event priorities — the home's event tags: a rule matches an event's type, source and/or a text fragment and assigns moderate (a notification on the phones — e.g. a person on camera) or alarm (the phones play a siren even in the background, the speaker speaks the message — fire, gas, water). Events only happen in the future, so rules are manual; a "recent events" list (since restart) lets you mark a past event to prefill a rule — the list is filterable (type, source, priority, free-text search over text and parameters) and shows each event's parameters, so a tool.call row reveals which tool ran, by whom and with what result. First matching rule wins, no rule = normal; moderate/alarm events land in the audit log as tool events too.
    14. AI permissions (admin) — what the AI may use on its own, per user (architecture "AI permissions & consent"): three modes per subject — always allow, ask each time (default: a confirmation dialog in the app / a spoken yes-no on the speaker) and deny. The page lists the external AI services, every tool's control actions and the tuya devices; a pending consent request can also be answered here indirectly — the "Always" button in the app dialog writes the same store. Mode changes are audited.
    15. Plugin pages — every installed plugin with a ui manifest block automatically gets a navigation item and renders inside the dashboard at #/pui/<plugin-name>; community tools with configuration UI therefore behave like first-class screens (page contract: plugins-api).

    Dashboard i18n

    The UI ships en/ru/es/de/pl/fr/nl. Strings live in one file (dashboard/src/lib/i18n.ts); language auto-detects from the browser locale, an override selector sits at the bottom of the sidebar and persists in localStorage 'holai_lang'; missing keys fall back to English (never empty text). dashboard/tests/i18n-keys.mjs guarantees every language covers the SAME key set. Changing the language updates open plugin pages live (storage event, no reload). A sun/moon toggle next to the language select switches the common black/white theme — black is the default, the choice persists in the browser (localStorage) and plugin pages follow it too.

    Development notes

    • Dev mode: npm run dev in server/dashboard (Vite proxies /api + WS to port 8080).
    • A component style change is not live in /admin until npm run build in server/dashboard and a core restart/rebuild.
    • Conventions: Svelte 5 runes ($state, $derived) — not legacy let reactivity; shadcn-style primitives in src/lib/ui/*.svelte; all HTTP via src/lib/api.ts (JWT from the auth store).

    Last updated: November 2026