@origintrail-official/dkg-node-ui
v10.0.0-rc.2-dev.1777921432.16109c1
Published
Web dashboard for DKG V10 nodes. Provides a browser-based UI for monitoring node health, exploring the knowledge graph, running SPARQL queries, and chatting with integrated agents.
Readme
@origintrail-official/dkg-node-ui
Web dashboard for DKG V10 nodes. Provides a browser-based UI for monitoring node health, exploring the knowledge graph, running SPARQL queries, and chatting with integrated 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
- Integrated-agent side panel - connect a local agent, chat in the right rail, inspect network peers, and browse persisted sessions
- 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
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
