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 stylesKey Numbers
| Metric | Value |
|---|---|
| Port | 3007 |
| Onboarding steps | 5 |
| Page components | 5 |
| Custom hooks | 2 |
| Total components | 5 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 workbenchStep Details
| Step | Page | Purpose | User Action |
|---|---|---|---|
| 1 | WelcomePage | Introduce the platform and set expectations | Read overview, click "Get Started" |
| 2 | PersonaSelectionPage | Identify user role for personalized experience | Select persona (Analyst, Engineer, Data Scientist, Admin) |
| 3 | ConnectionSetupPage | Connect the first data source | Enter connection details, test connection |
| 4 | FirstQueryPage | Experience the core value proposition | Ask a natural language question, see results |
| 5 | CompletionPage | Celebrate success and guide to next steps | Choose which workbench to explore |
Step 1: Welcome Page
The WelcomePage introduces the MATIH platform with a concise overview:
Welcome Content
| Section | Content |
|---|---|
| Greeting | Personalized welcome with tenant name |
| Platform overview | Brief description of platform capabilities |
| What to expect | Summary 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
| Persona | Description | Default Workbench | Onboarding Focus |
|---|---|---|---|
| Data Analyst | "I explore data and build dashboards" | BI Workbench | Chart creation, dashboard building |
| Data Engineer | "I build and manage data pipelines" | Data Workbench | Pipeline builder, data quality |
| Data Scientist | "I build and deploy ML models" | ML Workbench | Experiment tracking, model registry |
| Platform Administrator | "I manage the platform and users" | Control Plane UI | Tenant 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 Source | Connection Parameters | Test Method |
|---|---|---|
| PostgreSQL | Host, port, database, username, password | SELECT 1 |
| MySQL | Host, port, database, username, password | SELECT 1 |
| SQL Server | Host, port, database, username, password | SELECT 1 |
| Snowflake | Account, warehouse, database, username, password | Connection test |
| BigQuery | Project ID, service account JSON | Table list query |
| Amazon Redshift | Cluster, database, username, password | SELECT 1 |
| S3 / GCS / Azure Blob | Bucket/container, credentials | List objects |
| CSV Upload | File upload | Schema 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 relationshipsConnection 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
secretKeyRefin 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
| Section | Content |
|---|---|
| Success message | Congratulations with a checkmark animation |
| Summary | Recap of what was accomplished (data connected, first query executed) |
| Recommended next steps | Based on selected persona |
| Workbench launch | Button to navigate to the recommended workbench |
| Additional exploration | Links to other workbenches and documentation |
Persona-Specific Next Steps
| Persona | Recommended Action | Target |
|---|---|---|
| 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:
| Element | Treatment |
|---|---|
AnimatedBackground | Subtle gradient animation behind content |
StepIndicator | Horizontal progress bar showing current step (1-5) |
TransitionWrapper | Smooth page transitions between steps |
OnboardingLayout | Centered card layout with maximum width constraint |
| Color scheme | Follows the platform design system with welcoming accents |
| Typography | Larger body text for readability during guidance |
The TransitionWrapper component animates page transitions with slide and fade effects, respecting the useShouldReduceMotion() preference.
Key Source Files
| Component | Location |
|---|---|
| Application entry | frontend/onboarding-ui/src/App.tsx |
| Welcome page | frontend/onboarding-ui/src/pages/WelcomePage.tsx |
| Persona selection | frontend/onboarding-ui/src/pages/PersonaSelectionPage.tsx |
| Connection setup | frontend/onboarding-ui/src/pages/ConnectionSetupPage.tsx |
| First query | frontend/onboarding-ui/src/pages/FirstQueryPage.tsx |
| Completion page | frontend/onboarding-ui/src/pages/CompletionPage.tsx |
| Step indicator | frontend/onboarding-ui/src/components/StepIndicator.tsx |
| Animated background | frontend/onboarding-ui/src/components/AnimatedBackground.tsx |
| Onboarding layout | frontend/onboarding-ui/src/components/OnboardingLayout.tsx |
| Transition wrapper | frontend/onboarding-ui/src/components/TransitionWrapper.tsx |
| Onboarding state hook | frontend/onboarding-ui/src/hooks/useOnboardingState.ts |
| Onboarding API hook | frontend/onboarding-ui/src/hooks/useOnboardingApi.ts |