Skip to content

Svelte Web UI

Servicereferencefrontendsveltespaservices/web-ui

Checked by automation only

Written 2026-10-27 by ktl-librarian (automation). Last checked 2026-10-27 by ktl-librarian (automation).

The full record
Checks
  • 2026-10-27 by ktl-librarian (automation)
Sources
Depends on
Pointed to by
Graph
Open this concept in the knowledge graph
IRI
https://noelmcloughlin.github.io/ai-linkmo/knowledge/services/web-ui
Licence
CC BY 4.0
Files
MarkdownJSON-LDSource on GitHubHistory on GitHub

The Svelte Web UI (lib/frontend/) is the access pattern for people exploring the data: a plain Vite single-page application (SPA) using Svelte 5 runes and svelte-routing, with a record viewer, curate mode, and persistent identifiers. The dev server (npm run dev, endpoint above) proxies the API endpoint paths (/classes, /risk, /action, /health, …) to the FastAPI backend on port 8000.

The entity list, src/lib/entities.json, is written by just gen-ui-config from the linkmo project’s exposure file, ai-risk-ontology-linkmo/exposure.yaml, so each UI key is an API route, and lib/test/test_ui_config.py fails while it is behind. The hand-written overlay in src/lib/constants.ts holds the accordion groups, label overrides, the filters shown per endpoint and the demo personas. API_ENDPOINTS in vite.config.ts must stay in sync with entities.json and the FastAPI routes.

The add and edit form, RecordForm.svelte, is generated by @sjsf from the JSON Schema in static/schema/, drawn with its daisyUI 5 theme, and checked with ajv before a record is saved. .github/workflows/ui-tests.yml runs the quality gates: npm run check, npm run lint and npm run test (vitest).