MATIH Platform is in active MVP development. Documentation reflects current implementation status.
15. Workbench Architecture
Overview

BI Workbench Overview

The BI Workbench (frontend/bi-workbench/) is the platform's primary interface for data analysis, dashboard creation, and AI-assisted data exploration. With 64 components, it provides a comprehensive suite for building interactive dashboards, creating chart visualizations, managing semantic models, curating metrics libraries, and collaborating in real-time.


Architecture

bi-workbench/src/
  App.tsx                     # Root application with routing
  module.tsx                  # Module federation export
  components/
    dashboard/                # DashboardBuilder, DashboardGrid, DashboardHeader, RefreshControl
    DashboardBuilder/         # Enhanced builder with WidgetPalette, WidgetConfigPanel
    DashboardViewer/          # Read-only dashboard viewer
    charts/                   # BarChart, LineChart, PieChart, AreaChart, KPICard, VegaChart
    filters/                  # FilterBar, SingleSelect, MultiSelect, DateRange, Boolean, etc.
    widgets/                  # BaseWidget, MetricCardWidget, TableWidget, GaugeWidget, etc.
    SemanticModel/            # ERDViewer, EntityNode, EntityDetailPanel, SemanticModelDesigner
    MetricsLibrary/           # MetricsLibrary, ApprovalWorkflow
    BIAssistant/              # AI chat interface for BI
    BILifecycle/              # Lifecycle stepper and stage panels
    collaboration/            # CollaboratorCursors, CollaboratorPresence
    advanced/                 # DrillDown, DataTable, ChartAnnotations, ExportManager
    Home/                     # DashboardGrid, LifecycleProgressCard, RecentQueriesWidget
  hooks/
    useDashboard.ts           # Dashboard CRUD operations
    useFilters.ts             # Filter state management
    useWidgets.ts             # Widget lifecycle hooks
    useCollaboration.ts       # Real-time collaboration
    useRealTimeRefresh.ts     # Auto-refresh scheduling
    useWidgetDataSubscription.ts  # Widget data streaming
  store/
    dashboard-store.ts        # Zustand dashboard state
  services/
    api-client.ts             # BI-specific API client
    dashboard-service.ts      # Dashboard service layer
    filter-service.ts         # Filter service layer
    widget-service.ts         # Widget service layer
    collaboration-service.ts  # Collaboration service
  types/
    dashboard.ts              # Dashboard types
    widget.ts                 # Widget types
    filter.ts                 # Filter types
    semantic.ts               # Semantic model types
    collaboration.ts          # Collaboration types
  utils/
    chartGenerators.ts        # Vega-Lite spec generators
    chartPresets.ts           # Chart configuration presets
    dataTransformers.ts       # Data transformation utilities
    colors.ts                 # Color palette utilities
    format.ts                 # Number/date formatting

Key Features

FeatureComponentsDescription
Dashboard BuilderDashboardBuilder, DashboardGrid, WidgetPaletteDrag-and-drop dashboard creation
ChartsBarChart, LineChart, PieChart, VegaChart, KPICard8+ chart types with Vega-Lite
FiltersFilterBar, 7 filter typesInteractive dashboard filtering
WidgetsBaseWidget, 6 widget typesConfigurable dashboard widgets
Semantic ModelERDViewer, SemanticModelDesignerVisual entity-relationship design
Metrics LibraryMetricsLibrary, ApprovalWorkflowCurated metric definitions
CollaborationCollaboratorCursors, CollaboratorPresenceReal-time multi-user editing
ExportExportManagerPDF/PNG dashboard export
BI AssistantBIAssistantAI-powered data exploration
AdvancedDrillDown, DataTable, ChartAnnotationsAdvanced analytics features

Widget Types

The BI Workbench supports 11 widget types defined in types/widget.ts:

TypeDescriptionDefault Size
BAR_CHARTCompare values across categories4x3
LINE_CHARTShow trends over time6x3
PIE_CHARTShow proportions3x3
DONUT_CHARTPie with center cutout3x3
AREA_CHARTVolume over time6x3
SCATTER_PLOTCorrelation between values4x4
HEATMAPData density with colors6x4
TABLETabular data display6x4
METRIC_CARDSingle value with trend2x2
GAUGEProgress towards goal2x2
TEXTMarkdown text content4x2