OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

analytics-dashboard

Analytics dashboards with customizable widgets and queries

  • Type: feature
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @analytics-dashboard
  • Tags: analytics, dashboards, widgets, queries
  • field.key.label
    analytics-dashboard
    field.version.label
    1.0.0
    field.type.label
    feature
    field.title.label
    analytics-dashboard
    field.description.label

    Analytics dashboards with customizable widgets and queries

  • Type: feature
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @analytics-dashboard
  • Tags: analytics, dashboards, widgets, queries
  • field.tags.label
    analytics,dashboards,widgets,queries
    field.owners.label
    @analytics-dashboard
    field.stability.label
    experimental

    Analytics dashboards with customizable widgets and queries

    Operations (6)

    `analytics.dashboard.create` (v1.0.0)

    `analytics.dashboard.list` (v1.0.0)

    `analytics.dashboard.get` (v1.0.0)

    `analytics.widget.add` (v1.0.0)

    `analytics.query.create` (v1.0.0)

    `analytics.query.execute` (v1.0.0)

    Events (3)

    `analytics.dashboard.created` (v1.0.0)

    `analytics.widget.added` (v1.0.0)

    `analytics.query.created` (v1.0.0)

    Presentations (5)

    `analytics.dashboard.viewList` (v1.0.0)

    `analytics.dashboard.view` (v1.0.0)

    `analytics.dashboard.editor` (v1.0.0)

    `analytics.query.list` (v1.0.0)

    `analytics.query.builder` (v1.0.0)

    Source Definition

    /**
     * Analytics Dashboard Feature Module
     *
     * Comprehensive analytics and dashboarding solution for data visualization
     * and reporting across the platform.
     *
     * This feature module bundles all dashboard and query operations, events,
     * and presentations into an installable feature following FeatureModuleSpec.
     */
    
    import { defineFeature } from '@lssm-tech/lib.contracts-spec';
    import { AnalyticsVisualizationRefs } from './visualizations';
    
    // ============ Feature Definition ============
    
    export const AnalyticsDashboardFeature = defineFeature({
    	meta: {
    		key: 'analytics-dashboard',
    		version: '1.0.0',
    		title: 'Analytics Dashboard',
    		description: 'Analytics dashboards with customizable widgets and queries',
    		domain: 'analytics',
    		owners: ['@analytics-dashboard'],
    		tags: ['analytics', 'dashboards', 'widgets', 'queries'],
    		stability: 'experimental',
    	},
    
    	// ============ Contract Operations ============
    	// All contract operations included in this feature (OpRef[])
    	operations: [
    		// Dashboard operations
    		{ key: 'analytics.dashboard.create', version: '1.0.0' },
    		{ key: 'analytics.dashboard.list', version: '1.0.0' },
    		{ key: 'analytics.dashboard.get', version: '1.0.0' },
    
    		// Widget operations
    		{ key: 'analytics.widget.add', version: '1.0.0' },
    
    		// Query operations
    		{ key: 'analytics.query.create', version: '1.0.0' },
    		{ key: 'analytics.query.execute', version: '1.0.0' },
    	],
    
    	// ============ Events ============
    	// Events emitted by this feature (EventRef[])
    	events: [
    		// Dashboard events
    		{ key: 'analytics.dashboard.created', version: '1.0.0' },
    
    		// Widget events
    		{ key: 'analytics.widget.added', version: '1.0.0' },
    
    		// Query events
    		{ key: 'analytics.query.created', version: '1.0.0' },
    	],
    
    	// ============ Presentations ============
    	// Presentations associated with this feature (PresentationRef[])
    	presentations: [
    		// Dashboard presentations
    		{ key: 'analytics.dashboard.viewList', version: '1.0.0' },
    		{ key: 'analytics.dashboard.view', version: '1.0.0' },
    		{ key: 'analytics.dashboard.editor', version: '1.0.0' },
    
    		// Query presentations
    		{ key: 'analytics.query.list', version: '1.0.0' },
    		{ key: 'analytics.query.builder', version: '1.0.0' },
    	],
    
    	visualizations: [...AnalyticsVisualizationRefs],
    
    	// ============ Op-to-Presentation Links ============
    	// Links operations to their primary presentations
    	opToPresentation: [
    		{
    			op: { key: 'analytics.dashboard.list', version: '1.0.0' },
    			pres: { key: 'analytics.dashboard.viewList', version: '1.0.0' },
    		},
    		{
    			op: { key: 'analytics.dashboard.get', version: '1.0.0' },
    			pres: { key: 'analytics.dashboard.view', version: '1.0.0' },
    		},
    		{
    			op: { key: 'analytics.dashboard.create', version: '1.0.0' },
    			pres: { key: 'analytics.dashboard.editor', version: '1.0.0' },
    		},
    		{
    			op: { key: 'analytics.query.create', version: '1.0.0' },
    			pres: { key: 'analytics.query.builder', version: '1.0.0' },
    		},
    	],
    
    	// ============ Presentation Targets ============
    	// Target requirements for multi-surface rendering
    	presentationsTargets: [
    		{
    			key: 'analytics.dashboard.viewList',
    			version: '1.0.0',
    			targets: ['react', 'markdown', 'application/json'],
    		},
    		{
    			key: 'analytics.dashboard.view',
    			version: '1.0.0',
    			targets: ['react', 'markdown'],
    		},
    		{
    			key: 'analytics.dashboard.editor',
    			version: '1.0.0',
    			targets: ['react'],
    		},
    		{
    			key: 'analytics.query.builder',
    			version: '1.0.0',
    			targets: ['react'],
    		},
    	],
    
    	// ============ Capabilities ============
    	// Capability requirements for this feature
    	capabilities: {
    		requires: [
    			{ key: 'identity', version: '1.0.0' },
    			{ key: 'metering', version: '1.0.0' },
    			{ key: 'audit-trail', version: '1.0.0' },
    		],
    	},
    
    	telemetry: [{ key: 'analytics-dashboard.telemetry', version: '1.0.0' }],
    
    	docs: [
    		'docs.examples.analytics-dashboard',
    		'docs.examples.analytics-dashboard.goal',
    		'docs.examples.analytics-dashboard.usage',
    		'docs.examples.analytics-dashboard.constraints',
    	],
    });