@origintrail-official/dkg-node-ui
v0.0.1-dev.1773614346.8bc4e9c
Published
Web dashboard for DKG V9 nodes. Provides a browser-based UI for monitoring node health, exploring the knowledge graph, running SPARQL queries, and chatting with agents.
Readme
@origintrail-official/dkg-node-ui
Web dashboard for DKG V9 nodes. Provides a browser-based UI for monitoring node health, exploring the knowledge graph, running SPARQL queries, and chatting with agents.
Features
- Dashboard — real-time node metrics (peers, KAs published, queries served, uptime)
- Knowledge Explorer — browse and search Knowledge Assets with interactive graph visualization (powered by
@origintrail-official/dkg-graph-viz) - SPARQL editor — write and execute SPARQL queries with syntax highlighting and result tables
- Chat interface — send messages and invoke skills on remote agents
- Metrics & telemetry —
DashboardDB(SQLite) for persistent metric snapshots,MetricsCollectorfor gauges and counters,OperationTrackerfor request tracing - Structured logging —
StructuredLoggerwith operation context, log levels, and JSON output - Chat assistant —
ChatAssistantwith configurable LLM backend for in-dashboard AI help
Architecture
The package has two sides:
- Server-side (exported as a library) —
handleNodeUIRequest()serves the built UI assets and API endpoints;DashboardDB,MetricsCollector, andOperationTrackerprovide telemetry infrastructure - Client-side (Vite/React app) — the dashboard UI, built separately via
pnpm build:ui
Usage
import { handleNodeUIRequest, initTelemetry } from '@origintrail-official/dkg-node-ui';
// In the daemon's HTTP server
if (url.startsWith('/ui')) {
return handleNodeUIRequest(req, res);
}Development
# Start the UI dev server (hot reload)
pnpm dev:ui
# Build the production UI bundle
pnpm build:ui
# Build the full package (server + UI)
pnpm buildInternal Dependencies
@origintrail-official/dkg-core— configuration types, event bus integration@origintrail-official/dkg-graph-viz— interactive RDF graph visualization component
