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

Technology Stack

The MATIH frontend is built on a modern TypeScript-first stack optimized for large-scale enterprise applications with multiple independent workbench applications sharing a common foundation.


Core Technologies

TechnologyVersionPurpose
React18+UI component library with Concurrent Mode
TypeScript5.xStatic typing across all workbenches
Vite5.xBuild tool and dev server with HMR
Tailwind CSS3.xUtility-first CSS framework
Zustand4.xLightweight state management
Redux Toolkit2.xComplex domain state (BI store)
React Router6.xClient-side routing
TanStack Query5.xServer state management and caching

Visualization and Editor Libraries

LibraryPurpose
Vega-LiteDeclarative chart specifications (BI charts)
RechartsReact-native chart components (dashboards)
D3.jsLow-level SVG visualizations (lineage, networks)
React FlowNode-based graph editors (pipelines, workflows, DNN)
Monaco EditorCode editing (SQL, Python, YAML, dbt)
DagreDirected graph layout algorithms
Framer MotionAnimation library (onboarding, transitions)

Build and Development

ToolPurpose
ViteDevelopment server with instant HMR
ESBuildJavaScript/TypeScript bundling
PostCSSCSS processing with Tailwind
VitestUnit and component testing
StorybookComponent development and documentation
ESLintLinting with TypeScript rules
PrettierCode formatting

Project Structure

Each workbench follows a consistent project structure:

{workbench}/
  src/
    App.tsx              # Root application component
    main.tsx             # Vite entry point
    module.tsx           # Module federation export
    index.ts             # Public API exports
    components/          # Workbench-specific components
    hooks/               # Workbench-specific hooks
    store/               # Workbench-level state stores
    services/            # API service layer
    types/               # TypeScript type definitions
    utils/               # Helper utilities
    pages/               # Route-level page components
    __tests__/           # Test files
  public/                # Static assets
  index.html             # HTML entry point
  vite.config.ts         # Vite configuration
  tsconfig.json          # TypeScript configuration
  tailwind.config.js     # Tailwind configuration
  package.json           # Dependencies and scripts

TypeScript Configuration

All workbenches share a base TypeScript configuration with strict mode enabled:

{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["ES2022", "DOM", "DOM.Iterable"],
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "jsx": "react-jsx",
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"],
      "@matih/shared": ["../shared/src"]
    }
  }
}

Tailwind CSS Design System

MATIH uses a custom Tailwind theme with Sanskrit-inspired color naming:

Color TokenHexUsage
jnana (knowledge)#8b5cf6Primary accent, links, interactive elements
spashta (clarity)#06b6d4Success states, data visualization
savadhan (awareness)#f59e0bWarnings, attention states
santulan (balance)#18181b - #fafafaNeutral scale, backgrounds, text

The design system applies CSS custom properties for runtime theme switching:

:root {
  --font-size-multiplier: 1;
  --density-multiplier: 1;
  --font-scale: 1;
}
 
.dark {
  --bg-primary: #18181b;
  --text-primary: #e4e4e7;
}
 
.light {
  --bg-primary: #ffffff;
  --text-primary: #18181b;
}

Vite Configuration

Each workbench uses Vite with the following shared configuration patterns:

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
 
export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
      '@matih/shared': path.resolve(__dirname, '../shared/src'),
    },
  },
  server: {
    port: 3000, // Varies per workbench
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
      },
      '/ws': {
        target: 'ws://localhost:8080',
        ws: true,
      },
    },
  },
  build: {
    sourcemap: true,
    rollupOptions: {
      output: {
        manualChunks: {
          vendor: ['react', 'react-dom', 'react-router-dom'],
          charts: ['recharts', 'vega-lite', 'vega'],
          editor: ['@monaco-editor/react'],
        },
      },
    },
  },
});

Module Federation

The Data Plane UI acts as a host shell that dynamically loads workbench modules. Each workbench exports a module.tsx entry point that can be consumed by the unified shell:

// bi-workbench/src/module.tsx
export { default as BiWorkbench } from './App';
export { BiWorkbenchRoutes } from './routes';
export type { BiWorkbenchConfig } from './types';

This architecture enables independent deployment of workbenches while maintaining a unified user experience through the Data Plane UI shell.