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

Chapter 15: Frontend Architecture

The MATIH frontend is a suite of nine React/TypeScript/Vite applications -- called workbenches -- that provide specialized user interfaces for every domain of the platform. Each workbench is an independent single-page application sharing a common foundation of 102 shared components, 28+ hooks, 16 API client modules, and cross-workbench state management through a centralized shared library. This chapter provides a comprehensive examination of the frontend architecture, from the shared library that unifies the suite through the domain-specific workbenches that deliver the platform's capabilities to end users.


What You Will Learn

By the end of this chapter, you will understand:

  • The workbench architecture including how nine independent React applications share code through a unified library of 102 components, 28+ hooks, and 16 API client modules
  • The shared component library with reusable UI primitives for navigation, authentication, data visualization, code editing, accessibility, and cross-workbench collaboration
  • State management patterns combining Zustand for cross-workbench preferences and entity handoff, Redux Toolkit for complex domain state, and a custom lightweight store with middleware support
  • The API client layer built on the native Fetch API with httpOnly cookie authentication, CSRF protection, automatic retries with exponential backoff, request cancellation, and unified pagination normalization across Java and Python backends
  • The BI Workbench (64 components) for dashboard building, chart creation, semantic model management, metrics libraries, and AI-assisted data exploration
  • The ML Workbench (41 components) for AutoML wizards, DNN builder, experiment tracking, model registry, deployment management, and monitoring
  • The Data Workbench (50 components) for catalog browsing, lineage visualization, ontology building, pipeline editing, dbt editing, and query execution
  • The Agentic Workbench (85 components) for agent studio, workflow canvas, agent registry, marketplace, approval workflows, and chain-of-thought visualization
  • The Ops Workbench (32 components) for operational dashboards, observability health, incidents, and conversational ops agent
  • The Control Plane UI (56 components) for platform administration, executive dashboards, user management, billing, audit, and privacy
  • The Data Plane UI (34 components) for the unified shell, workbench routing, command palette, and navigation
  • The Onboarding UI (11 components) for guided first-time user experience with persona selection and connection setup
  • Real-time infrastructure including WebSocket connection management, Server-Sent Events for streaming, presence tracking, and live notification delivery

Chapter Structure

SectionDescriptionAudience
Technology StackReact, Vite, TypeScript, Tailwind CSS configuration and toolingFrontend developers, architects
Shared Component Library102 shared components, design system primitives, and cross-workbench utilitiesFrontend developers, designers
State ManagementZustand stores, Redux Toolkit, custom store with middleware, cross-tab synchronizationFrontend developers, architects
Authentication and API ClientFetch-based client, httpOnly cookie auth, CSRF, retries, pagination normalization, 16 service modulesFrontend developers, security engineers
Shared Library Deep DiveDetailed breakdowns of API clients, hooks, stores, auth, realtime, editors, and moreFrontend developers
BI WorkbenchDashboard builder, chart library, filters, widgets, semantic models, metrics, AI chatBI developers, data analysts
ML WorkbenchAutoML wizard, DNN builder, model registry, experiments, deployment, monitoringML engineers, data scientists
Data WorkbenchCatalog browser, lineage viewer, ontology builder, pipeline editor, dbt, query editorData engineers, catalog admins
Agentic WorkbenchAgent studio, workflow canvas, registry, marketplace, approvals, chain-of-thoughtAI engineers, business analysts
Ops WorkbenchOperations dashboard, observability, incidents, conversational chat interfacePlatform operators, SREs
Control Plane UIAuth pages, executive dashboard, user management, billing, audit, privacy, provisioningPlatform administrators
Onboarding UIWelcome flow, persona selection, connection setup, guided first queryNew users, product managers

Architecture at a Glance

The frontend suite consists of nine workbench applications, each served as an independent Vite-built SPA, connected through shared libraries and cross-workbench state synchronization via the Data Plane UI unified shell.

                    +----------------------------------+
                    |        Browser / Client           |
                    +----------------------------------+
                    |                                    |
    +----------+----------+----------+----------+-------+------+----------+
    |          |          |          |          |       |      |          |
    v          v          v          v          v       v      v          v
 BI Work-  Data Work- ML Work-  Agentic   Control  Ops    Onboard-  Data Plane
  bench      bench     bench   Workbench  Plane   Work-    ing     UI (Shell)
 (3000)     (3002)    (3001)   (3003)     UI      bench    UI
                                         (3004)  (3005)
    |          |          |          |       |       |        |          |
    +----------+----------+----------+-------+-------+--------+----------+
                                    |
                        +-----------+-----------+
                        |   @matih/shared       |
                        |  (102 components)     |
                        |  (28+ hooks)          |
                        |  (16 API clients)     |
                        |  (Zustand stores)     |
                        +-----------+-----------+
                                    |
                    +---------------+---------------+
                    |               |               |
              API Gateway     WebSocket       SSE Streaming
              (8080)          Server           Server

Workbench Summary

WorkbenchComponentsPortKey Technologies
bi-workbench643000Vega-Lite, Recharts, react-grid-layout
ml-workbench413001React Flow, D3.js, MLflow integration
data-workbench503002React Flow, Monaco Editor, Dagre
agentic-workbench853003React Flow, Monaco Editor, SSE
control-plane-ui563004React Router, Recharts
data-plane-ui343005Module Federation, Zustand
ops-workbench32-Recharts, Tailwind CSS
onboarding-ui11-Framer Motion, step wizard
shared102-Zustand, Monaco, WebSocket

Cross-Workbench Communication

The platform uses several mechanisms for cross-workbench communication:

  1. BroadcastChannel API -- The crossWorkbenchStore uses the browser's BroadcastChannel API (matih-cross-workbench channel) to synchronize entity selection, navigation requests, and global filters across browser tabs.

  2. LocalStorage persistence -- Zustand's persist middleware stores selected entities, catalog context, and global time ranges in localStorage for cross-session persistence.

  3. Unified Shell routing -- The Data Plane UI's WorkbenchRouter loads workbenches via module federation or lazy imports, providing seamless navigation between domains.

  4. WebSocket channels -- The shared WebSocketProvider enables real-time data subscription across workbenches via channel-based pub/sub messaging.

Source Code Organization

frontend/
  shared/                    # @matih/shared - the shared library
    src/
      api/                   # 16 API client modules
      components/            # 102 reusable components (33 directories)
      hooks/                 # 28+ custom React hooks
      stores/                # Zustand stores (cross-workbench, preferences)
      state/                 # Custom store framework with middleware
      realtime/              # WebSocket, SSE, presence, notifications
      observability/         # Frontend telemetry and error tracking
      services/              # Offline manager, semantic cache
      styles/                # Design tokens (colors, typography, spacing)
      types/                 # Canonical type definitions
      utils/                 # Utilities (API client, validation, config)
  bi-workbench/              # BI analytics workbench
  ml-workbench/              # ML/AI workbench
  data-workbench/            # Data engineering workbench
  agentic-workbench/         # Agentic AI workbench
  ops-workbench/             # Operations workbench
  control-plane-ui/          # Platform administration UI
  data-plane-ui/             # Unified shell and workbench router
  onboarding-ui/             # First-time user onboarding flow