# anujkaushikit/servicehub architecture

> Architecture diagram of the GitHub repository anujkaushikit/servicehub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anujkaushikit/servicehub
- Repository: https://github.com/anujkaushikit/servicehub

## Overview

ServiceHub is a frontend for business-workspace setup and management. The visible user journey starts at login, moves through workspace selection and shop/company onboarding, then opens a workspace dashboard. Onboarding uses configuration-driven, multi-step forms with field-specific controls and a review step; the dashboard presents configured statistics, actions, and activity. The supplied evidence shows no authentication service, persistence, or operational backend, so these are not represented as runtime integrations. Connections are limited to the excerpts and SOURCE INDEX references provided.

Main entry points: [`servicehub-frontend/src/components/forms/DynamicForm.tsx`](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/DynamicForm.tsx) (Dynamic form), [`servicehub-frontend/src/App.tsx`](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/App.tsx) (Page flow), [`servicehub-frontend/src/components/dashboard/DashboardPage.tsx`](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/DashboardPage.tsx) (Dashboard page), [`servicehub-frontend/src/pages/onboarding/OnboardingPage.tsx`](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/pages/onboarding/OnboardingPage.tsx) (Setup page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Entry and selection"]
  node_app["Page flow<br/>[App.tsx]"]
  node_login["Login screen<br/>[LoginPage.tsx]"]
  node_welcome["Workspace choice<br/>[WelcomePage.tsx]"]
end

subgraph group_setup["Workspace setup"]
  node_onboarding["Setup page<br/>[OnboardingPage.tsx]"]
  node_dynamicform["Dynamic form<br/>[DynamicForm.tsx]"]
  node_shopconfig["Shop form config"]
  node_companyconfig["Company form config"]
  node_formstepper["Form stepper<br/>[FormStepper.tsx]"]
  node_review["Review summary<br/>[ReviewSummary.tsx]"]
  node_phone["Phone input<br/>[PhoneInput.tsx]"]
  node_location["Location fields<br/>[LocationFields.tsx]"]
  node_postal["Postal input"]
end

subgraph group_dashboard["Workspace dashboard"]
  node_dashboardlayout["Dashboard layout"]
  node_sidebar["Sidebar<br/>[Sidebar.tsx]"]
  node_topbar["Topbar<br/>[Topbar.tsx]"]
  node_dashboardpage["Dashboard page<br/>[DashboardPage.tsx]"]
  node_dashboardconfig["Dashboard config"]
  node_dashboardheader["Dashboard header"]
  node_dashboardstats["Dashboard stats<br/>[DashboardStats.tsx]"]
  node_quickactions["Quick actions<br/>[QuickActions.tsx]"]
  node_recentactivity["Recent activity<br/>[RecentActivity.tsx]"]
  node_statcard["Stat card<br/>[StatCard.tsx]"]
end

subgraph group_shared["Shared UI and types"]
  node_formtypes["Form types<br/>[form.types.ts]"]
  node_dashboardtypes["Dashboard types<br/>[dashboard.types.ts]"]
  node_button["Button<br/>[Button.tsx]"]
  node_card["Card<br/>[Card.tsx]"]
  node_input["Input<br/>[Input.tsx]"]
  node_select["Select<br/>[Select.tsx]"]
end

node_user(("Business user"))

node_user -->|"enters credentials"| node_login
node_login -->|"signals login"| node_app
node_app -->|"renders"| node_welcome
node_welcome -->|"selects workspace"| node_app
node_app -->|"renders"| node_onboarding
node_onboarding -->|"completes setup"| node_app
node_app -->|"wraps dashboard"| node_dashboardlayout
node_app -->|"renders"| node_dashboardpage
node_onboarding -->|"renders"| node_dynamicform
node_onboarding -->|"selects config"| node_shopconfig
node_onboarding -->|"selects config"| node_companyconfig
node_dynamicform -->|"renders"| node_formstepper
node_dynamicform -->|"renders"| node_review
node_dynamicform -->|"renders"| node_phone
node_dynamicform -->|"renders"| node_location
node_dynamicform -->|"renders"| node_postal
node_dynamicform -->|"uses controls"| node_button
node_dynamicform -->|"renders"| node_input
node_dynamicform -->|"renders"| node_select
node_dynamicform -->|"renders"| node_card
node_dashboardlayout -->|"renders"| node_sidebar
node_dashboardlayout -->|"renders"| node_topbar
node_dashboardpage -->|"reads config"| node_dashboardconfig
node_dashboardpage -->|"renders"| node_dashboardheader
node_dashboardpage -->|"renders"| node_dashboardstats
node_dashboardpage -->|"renders"| node_quickactions
node_dashboardpage -->|"renders"| node_recentactivity
node_dashboardstats -->|"renders"| node_statcard
node_quickactions -->|"renders"| node_card
node_recentactivity -->|"renders"| node_card
node_statcard -->|"renders"| node_card
node_select -->|"uses options"| node_formtypes
node_dashboardconfig -->|"uses types"| node_dashboardtypes
node_shopconfig -->|"uses types"| node_formtypes
node_companyconfig -->|"uses types"| node_formtypes

click node_app "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/App.tsx"
click node_login "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/pages/LoginPage.tsx"
click node_welcome "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/pages/WelcomePage.tsx"
click node_onboarding "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/pages/onboarding/OnboardingPage.tsx"
click node_dynamicform "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/DynamicForm.tsx"
click node_shopconfig "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/config/shopSetup.config.ts"
click node_companyconfig "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/config/companySetup.config.ts"
click node_formtypes "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/types/form.types.ts"
click node_formstepper "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/FormStepper.tsx"
click node_review "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/ReviewSummary.tsx"
click node_phone "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/PhoneInput.tsx"
click node_location "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/LocationFields.tsx"
click node_postal "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/PostalCodeInput.tsx"
click node_dashboardlayout "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/layouts/DashboardLayout.tsx"
click node_sidebar "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/layouts/Sidebar.tsx"
click node_topbar "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/layouts/Topbar.tsx"
click node_dashboardpage "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/DashboardPage.tsx"
click node_dashboardconfig "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/config/dashboard.config.ts"
click node_dashboardtypes "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/types/dashboard.types.ts"
click node_dashboardheader "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/DashboardHeader.tsx"
click node_dashboardstats "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/DashboardStats.tsx"
click node_quickactions "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/QuickActions.tsx"
click node_recentactivity "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/RecentActivity.tsx"
click node_statcard "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/StatCard.tsx"
click node_button "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/ui/Button.tsx"
click node_card "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/ui/Card.tsx"
click node_input "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/ui/Input.tsx"
click node_select "https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/ui/Select.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_login,node_welcome,node_user toneBlue
class node_onboarding,node_dynamicform,node_shopconfig,node_companyconfig,node_formstepper,node_review,node_phone,node_location,node_postal toneAmber
class node_dashboardlayout,node_sidebar,node_topbar,node_dashboardpage,node_dashboardconfig,node_dashboardheader,node_dashboardstats,node_quickactions,node_recentactivity,node_statcard toneMint
class node_formtypes,node_dashboardtypes,node_button,node_card,node_input,node_select toneRose
```

## Components

### Entry and selection

- [Page flow](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/App.tsx): `servicehub-frontend/src/App.tsx`
- [Login screen](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/pages/LoginPage.tsx): `servicehub-frontend/src/pages/LoginPage.tsx`
- [Workspace choice](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/pages/WelcomePage.tsx): `servicehub-frontend/src/pages/WelcomePage.tsx`

### Workspace setup

- [Setup page](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/pages/onboarding/OnboardingPage.tsx): `servicehub-frontend/src/pages/onboarding/OnboardingPage.tsx`
- [Dynamic form](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/DynamicForm.tsx): `servicehub-frontend/src/components/forms/DynamicForm.tsx`
- [Shop form config](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/config/shopSetup.config.ts): `servicehub-frontend/src/config/shopSetup.config.ts`
- [Company form config](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/config/companySetup.config.ts): `servicehub-frontend/src/config/companySetup.config.ts`
- [Form stepper](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/FormStepper.tsx): `servicehub-frontend/src/components/forms/FormStepper.tsx`
- [Review summary](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/ReviewSummary.tsx): `servicehub-frontend/src/components/forms/ReviewSummary.tsx`
- [Phone input](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/PhoneInput.tsx): `servicehub-frontend/src/components/forms/PhoneInput.tsx`
- [Location fields](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/LocationFields.tsx): `servicehub-frontend/src/components/forms/LocationFields.tsx`
- [Postal input](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/forms/PostalCodeInput.tsx): `servicehub-frontend/src/components/forms/PostalCodeInput.tsx`

### Workspace dashboard

- [Dashboard layout](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/layouts/DashboardLayout.tsx): `servicehub-frontend/src/components/layouts/DashboardLayout.tsx`
- [Sidebar](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/layouts/Sidebar.tsx): `servicehub-frontend/src/components/layouts/Sidebar.tsx`
- [Topbar](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/layouts/Topbar.tsx): `servicehub-frontend/src/components/layouts/Topbar.tsx`
- [Dashboard page](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/DashboardPage.tsx): `servicehub-frontend/src/components/dashboard/DashboardPage.tsx`
- [Dashboard config](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/config/dashboard.config.ts): `servicehub-frontend/src/config/dashboard.config.ts`
- [Dashboard header](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/DashboardHeader.tsx): `servicehub-frontend/src/components/dashboard/DashboardHeader.tsx`
- [Dashboard stats](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/DashboardStats.tsx): `servicehub-frontend/src/components/dashboard/DashboardStats.tsx`
- [Quick actions](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/QuickActions.tsx): `servicehub-frontend/src/components/dashboard/QuickActions.tsx`
- [Recent activity](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/RecentActivity.tsx): `servicehub-frontend/src/components/dashboard/RecentActivity.tsx`
- [Stat card](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/dashboard/StatCard.tsx): `servicehub-frontend/src/components/dashboard/StatCard.tsx`

### Shared UI and types

- [Form types](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/types/form.types.ts): `servicehub-frontend/src/types/form.types.ts`
- [Dashboard types](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/types/dashboard.types.ts): `servicehub-frontend/src/types/dashboard.types.ts`
- [Button](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/ui/Button.tsx): `servicehub-frontend/src/components/ui/Button.tsx`
- [Card](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/ui/Card.tsx): `servicehub-frontend/src/components/ui/Card.tsx`
- [Input](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/ui/Input.tsx): `servicehub-frontend/src/components/ui/Input.tsx`
- [Select](https://github.com/anujkaushikit/servicehub/blob/main/servicehub-frontend/src/components/ui/Select.tsx): `servicehub-frontend/src/components/ui/Select.tsx`

### Other components

- **Business user**

## Connections

- Business user → Login screen: enters credentials (evidence: `servicehub-frontend/src/pages/LoginPage.tsx`)
- Login screen → Page flow: signals login (evidence: `servicehub-frontend/src/App.tsx`)
- Page flow → Workspace choice: renders (evidence: `servicehub-frontend/src/App.tsx`)
- Workspace choice → Page flow: selects workspace (evidence: `servicehub-frontend/src/App.tsx`)
- Page flow → Setup page: renders (evidence: `servicehub-frontend/src/App.tsx`)
- Setup page → Page flow: completes setup (evidence: `servicehub-frontend/src/App.tsx`)
- Page flow → Dashboard layout: wraps dashboard (evidence: `servicehub-frontend/src/App.tsx`)
- Page flow → Dashboard page: renders (evidence: `servicehub-frontend/src/App.tsx`)
- Setup page → Dynamic form: renders (evidence: `servicehub-frontend/src/pages/onboarding/OnboardingPage.tsx`)
- Setup page → Shop form config: selects config (evidence: `servicehub-frontend/src/pages/onboarding/OnboardingPage.tsx`)
- Setup page → Company form config: selects config (evidence: `servicehub-frontend/src/pages/onboarding/OnboardingPage.tsx`)
- Dynamic form → Form stepper: renders (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dynamic form → Review summary: renders (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dynamic form → Phone input: renders (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dynamic form → Location fields: renders (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dynamic form → Postal input: renders (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dynamic form → Button: uses controls (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dynamic form → Input: renders (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dynamic form → Select: renders (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dynamic form → Card: renders (evidence: `servicehub-frontend/src/components/forms/DynamicForm.tsx`)
- Dashboard layout → Sidebar: renders (evidence: `servicehub-frontend/src/components/layouts/DashboardLayout.tsx`)
- Dashboard layout → Topbar: renders (evidence: `servicehub-frontend/src/components/layouts/DashboardLayout.tsx`)
- Dashboard page → Dashboard config: reads config (evidence: `servicehub-frontend/src/components/dashboard/DashboardPage.tsx`)
- Dashboard page → Dashboard header: renders (evidence: `servicehub-frontend/src/components/dashboard/DashboardPage.tsx`)
- Dashboard page → Dashboard stats: renders (evidence: `servicehub-frontend/src/components/dashboard/DashboardPage.tsx`)
- Dashboard page → Quick actions: renders (evidence: `servicehub-frontend/src/components/dashboard/DashboardPage.tsx`)
- Dashboard page → Recent activity: renders (evidence: `servicehub-frontend/src/components/dashboard/DashboardPage.tsx`)
- Dashboard stats → Stat card: renders (evidence: `servicehub-frontend/src/components/dashboard/DashboardStats.tsx`)
- Quick actions → Card: renders (evidence: `servicehub-frontend/src/components/dashboard/QuickActions.tsx`)
- Recent activity → Card: renders (evidence: `servicehub-frontend/src/components/dashboard/RecentActivity.tsx`)
- Stat card → Card: renders (evidence: `servicehub-frontend/src/components/dashboard/StatCard.tsx`)
- Select → Form types: uses options (evidence: `servicehub-frontend/src/components/ui/Select.tsx`)
- Dashboard config → Dashboard types: uses types (evidence: `servicehub-frontend/src/config/dashboard.config.ts`)
- Shop form config → Form types: uses types (evidence: `servicehub-frontend/src/config/shopSetup.config.ts`)
- Company form config → Form types: uses types (evidence: `servicehub-frontend/src/config/companySetup.config.ts`)
