---
type: Service
genre: reference
id: https://noelmcloughlin.github.io/ai-linkmo/knowledge/services/web-ui
title: Svelte Web UI
description: Vite + Svelte 5 single-page application for exploring AI governance data through the FastAPI backend, aimed at non-technical stakeholders.
endpoint: http://localhost:5173
resource: lib/frontend
documentation: https://github.com/noelmcloughlin/ai-linkmo/blob/main/lib/frontend/README.md
tags:
  - frontend
  - svelte
  - spa
timestamp: "2026-08-12T00:00:00Z"
dependsOn:
  - https://noelmcloughlin.github.io/ai-linkmo/knowledge/services/fastapi-backend
verified:
  - by: process:ktl-librarian
    at: "2026-10-27T01:10:23Z"
generated:
  by: process:ktl-librarian
  at: "2026-10-27T17:36:28Z"
---

# Overview

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).
