MATIH Platform is in active MVP development. Documentation reflects current implementation status.
16. User Experience
Onboarding Wizard

Onboarding Wizard

The Onboarding UI is a guided setup experience running on port 3007 that walks new tenants through their first interaction with the MATIH platform. It covers persona selection, data source connection, schema mapping, and a first query execution, ensuring that users reach their initial insight within minutes of account activation. This section covers the onboarding flow architecture, its page components, state management, and integration with backend services.


Application Structure

frontend/onboarding-ui/src/
  components/
    AnimatedBackground.tsx   # Visual background animations
    OnboardingLayout.tsx     # Layout wrapper for onboarding pages
    StepIndicator.tsx        # Progress indicator showing current step
    TransitionWrapper.tsx    # Page transition animations
    index.ts                 # Barrel exports
  hooks/
    useOnboardingApi.ts      # Backend API integration
    useOnboardingState.ts    # Onboarding progress state management
  pages/
    WelcomePage.tsx           # Step 1: Welcome and introduction
    PersonaSelectionPage.tsx  # Step 2: Choose user persona
    ConnectionSetupPage.tsx   # Step 3: Connect data source
    FirstQueryPage.tsx        # Step 4: Execute first query
    CompletionPage.tsx        # Step 5: Success and next steps
  App.tsx                    # Root application component
  main.tsx                   # Vite entry point
  index.css                  # Onboarding-specific styles

Key Numbers

MetricValue
Port3007
Onboarding steps5
Page components5
Custom hooks2
Total components5 shared + 5 pages

Onboarding Flow

The onboarding flow consists of five sequential steps, each implemented as a dedicated page component:

Step 1          Step 2           Step 3            Step 4           Step 5
Welcome    -->  Persona     -->  Connection   -->  First       -->  Completion
Page            Selection        Setup             Query            Page

Greeting,       Choose role      Connect a         Ask a question   Success!
platform        and workflow     data source       in natural       Navigate to
overview        focus                              language         workbench

Step Details

StepPagePurposeUser Action
1WelcomePageIntroduce the platform and set expectationsRead overview, click "Get Started"
2PersonaSelectionPageIdentify user role for personalized experienceSelect persona (Analyst, Engineer, Data Scientist, Admin)
3ConnectionSetupPageConnect the first data sourceEnter connection details, test connection
4FirstQueryPageExperience the core value propositionAsk a natural language question, see results
5CompletionPageCelebrate success and guide to next stepsChoose which workbench to explore

Step 1: Welcome Page

The WelcomePage introduces the MATIH platform with a concise overview:

Welcome Content

SectionContent
GreetingPersonalized welcome with tenant name
Platform overviewBrief description of platform capabilities
What to expectSummary of the onboarding steps ahead
Time estimate"This will take about 5 minutes"
Call to action"Get Started" button

The AnimatedBackground component provides subtle visual interest during the welcome step, with configurable animations that respect the user's reduced-motion preference.


Step 2: Persona Selection

The PersonaSelectionPage asks users to identify their primary role. The selected persona customizes the subsequent onboarding steps and the default workbench experience.

Persona Options

PersonaDescriptionDefault WorkbenchOnboarding Focus
Data Analyst"I explore data and build dashboards"BI WorkbenchChart creation, dashboard building
Data Engineer"I build and manage data pipelines"Data WorkbenchPipeline builder, data quality
Data Scientist"I build and deploy ML models"ML WorkbenchExperiment tracking, model registry
Platform Administrator"I manage the platform and users"Control Plane UITenant config, user management

Persona Selection UI

+-----------------------------------------------------------+
|  What is your primary role?                                |
|                                                            |
|  +-------------------------+  +-------------------------+  |
|  |                         |  |                         |  |
|  |  [Chart icon]           |  |  [Pipeline icon]        |  |
|  |                         |  |                         |  |
|  |  Data Analyst           |  |  Data Engineer           |  |
|  |  Explore data and       |  |  Build and manage        |  |
|  |  build dashboards       |  |  data pipelines          |  |
|  |                         |  |                         |  |
|  +-------------------------+  +-------------------------+  |
|                                                            |
|  +-------------------------+  +-------------------------+  |
|  |                         |  |                         |  |
|  |  [Model icon]           |  |  [Admin icon]           |  |
|  |                         |  |                         |  |
|  |  Data Scientist         |  |  Platform Administrator  |  |
|  |  Build and deploy       |  |  Manage the platform     |  |
|  |  ML models              |  |  and users               |  |
|  |                         |  |                         |  |
|  +-------------------------+  +-------------------------+  |
|                                                            |
|  [Back]                                        [Continue]  |
+-----------------------------------------------------------+

Step 3: Connection Setup

The ConnectionSetupPage guides users through connecting their first data source.

Supported Connection Types

Data SourceConnection ParametersTest Method
PostgreSQLHost, port, database, username, passwordSELECT 1
MySQLHost, port, database, username, passwordSELECT 1
SQL ServerHost, port, database, username, passwordSELECT 1
SnowflakeAccount, warehouse, database, username, passwordConnection test
BigQueryProject ID, service account JSONTable list query
Amazon RedshiftCluster, database, username, passwordSELECT 1
S3 / GCS / Azure BlobBucket/container, credentialsList objects
CSV UploadFile uploadSchema detection

Connection Setup Flow

1. Select data source type
   [PostgreSQL] [MySQL] [Snowflake] [BigQuery] [S3] [CSV Upload] ...
        |
        v
2. Enter connection details
   +-----------------------------------+
   | Host:     [db.example.com       ] |
   | Port:     [5432                  ] |
   | Database: [analytics             ] |
   | Username: [matih_reader          ] |
   | Password: [*****************    ] |
   +-----------------------------------+
        |
        v
3. Test connection
   [Testing...] --> [Connection successful! 12 tables found]
        |
        v
4. Select schema and tables
   [x] public.orders        (1.2M rows)
   [x] public.customers     (45K rows)
   [x] public.products      (2.3K rows)
   [ ] public.audit_log     (8.5M rows)
        |
        v
5. Schema mapping preview
   Detected columns, data types, and relationships

Connection Security

All connection credentials are:

  • Transmitted over HTTPS only
  • Never stored in the frontend (sent directly to the backend)
  • Stored as Kubernetes secrets by the backend service
  • Referenced via secretKeyRef in service configurations

Step 4: First Query

The FirstQueryPage delivers the platform's core value proposition: asking a question in natural language and getting an answer from the connected data.

First Query Experience

+-----------------------------------------------------------+
|  Ask your first question                                   |
|                                                            |
|  Your data has been connected. Try asking a question:      |
|                                                            |
|  Suggested questions:                                      |
|  - "What are my top 10 customers by revenue?"              |
|  - "Show me the order trend over the last 12 months"       |
|  - "Which products have the highest return rate?"          |
|                                                            |
|  +-----------------------------------------------------+  |
|  | What are my top 10 customers by revenue?             |  |
|  +-----------------------------------------------------+  |
|                                                   [Ask]    |
|                                                            |
|  AI Response:                                              |
|  "Here are your top 10 customers by total revenue:"       |
|                                                            |
|  | Rank | Customer      | Revenue     |                   |
|  |------|---------------|-------------|                   |
|  | 1    | Acme Corp     | $1,245,000  |                   |
|  | 2    | Globex Inc    | $892,000    |                   |
|  | ...  | ...           | ...         |                   |
|                                                            |
|  [View SQL] [Create Dashboard] [Ask Follow-up]             |
|                                                            |
+-----------------------------------------------------------+

The first query experience uses the shared useAIService hook and the AI Service's Text-to-SQL capabilities. Question suggestions are dynamically generated based on the connected schema.


Step 5: Completion

The CompletionPage celebrates the successful onboarding and guides users to their recommended workbench:

Completion Content

SectionContent
Success messageCongratulations with a checkmark animation
SummaryRecap of what was accomplished (data connected, first query executed)
Recommended next stepsBased on selected persona
Workbench launchButton to navigate to the recommended workbench
Additional explorationLinks to other workbenches and documentation

Persona-Specific Next Steps

PersonaRecommended ActionTarget
Data Analyst"Create your first dashboard"BI Workbench
Data Engineer"Explore your data catalog"Data Workbench
Data Scientist"Start your first experiment"ML Workbench
Platform Administrator"Configure your tenant"Control Plane UI

State Management

Onboarding State Hook

// frontend/onboarding-ui/src/hooks/useOnboardingState.ts
export function useOnboardingState() {
  const [step, setStep] = useState<number>(1);
  const [persona, setPersona] = useState<Persona | null>(null);
  const [connection, setConnection] = useState<ConnectionConfig | null>(null);
  const [firstQueryResult, setFirstQueryResult] = useState<QueryResult | null>(null);
  const [isComplete, setIsComplete] = useState(false);
 
  const goToNextStep = useCallback(() => setStep((s) => Math.min(s + 1, 5)), []);
  const goToPreviousStep = useCallback(() => setStep((s) => Math.max(s - 1, 1)), []);
  const canProceed = useMemo(() => {
    switch (step) {
      case 1: return true;
      case 2: return persona !== null;
      case 3: return connection !== null;
      case 4: return firstQueryResult !== null;
      case 5: return true;
      default: return false;
    }
  }, [step, persona, connection, firstQueryResult]);
 
  return {
    step, persona, connection, firstQueryResult, isComplete, canProceed,
    setPersona, setConnection, setFirstQueryResult, setIsComplete,
    goToNextStep, goToPreviousStep,
  };
}

Onboarding API Hook

// frontend/onboarding-ui/src/hooks/useOnboardingApi.ts
export function useOnboardingApi() {
  // Test data source connection
  const testConnection = useCallback(async (config: ConnectionConfig) => { /* ... */ }, []);
 
  // Discover schema from connected data source
  const discoverSchema = useCallback(async (connectionId: string) => { /* ... */ }, []);
 
  // Execute first query using AI Service
  const executeFirstQuery = useCallback(async (question: string, connectionId: string) => { /* ... */ }, []);
 
  // Mark onboarding as complete
  const completeOnboarding = useCallback(async (persona: Persona) => { /* ... */ }, []);
 
  return { testConnection, discoverSchema, executeFirstQuery, completeOnboarding };
}

Visual Design

The onboarding UI uses distinct visual treatments to create a welcoming first impression:

ElementTreatment
AnimatedBackgroundSubtle gradient animation behind content
StepIndicatorHorizontal progress bar showing current step (1-5)
TransitionWrapperSmooth page transitions between steps
OnboardingLayoutCentered card layout with maximum width constraint
Color schemeFollows the platform design system with welcoming accents
TypographyLarger body text for readability during guidance

The TransitionWrapper component animates page transitions with slide and fade effects, respecting the useShouldReduceMotion() preference.


Key Source Files

ComponentLocation
Application entryfrontend/onboarding-ui/src/App.tsx
Welcome pagefrontend/onboarding-ui/src/pages/WelcomePage.tsx
Persona selectionfrontend/onboarding-ui/src/pages/PersonaSelectionPage.tsx
Connection setupfrontend/onboarding-ui/src/pages/ConnectionSetupPage.tsx
First queryfrontend/onboarding-ui/src/pages/FirstQueryPage.tsx
Completion pagefrontend/onboarding-ui/src/pages/CompletionPage.tsx
Step indicatorfrontend/onboarding-ui/src/components/StepIndicator.tsx
Animated backgroundfrontend/onboarding-ui/src/components/AnimatedBackground.tsx
Onboarding layoutfrontend/onboarding-ui/src/components/OnboardingLayout.tsx
Transition wrapperfrontend/onboarding-ui/src/components/TransitionWrapper.tsx
Onboarding state hookfrontend/onboarding-ui/src/hooks/useOnboardingState.ts
Onboarding API hookfrontend/onboarding-ui/src/hooks/useOnboardingApi.ts