Onboarding Flow UI
Relevant source files
The following files were used as context for generating this wiki page:
The Onboarding Flow UI facilitates the initial configuration of a workspace. It captures product details, target audience information, and competitor data to generate a versioned monitoring_profile. This profile provides the context required for lead ranking and contribution drafting.
The system redirects users to the onboarding page immediately after workspace creation or if no monitoring profile exists. Users define their product's identity once, and the system uses this versioned data for all downstream automated tasks.
Sources: app/page.tsx:13-30, app/onboarding/page.tsx:28-40
User Entry and Redirection
Users enter the onboarding flow through two primary triggers. Authenticated users without an existing workspace create one on the landing page. The application calls createWorkspaceForCurrentUser and redirects the browser to /onboarding with the new workspaceId.
If an authenticated user already has a workspace, the Home component checks for a monitoring profile. If no profile exists, the system forces a redirection to the onboarding flow.
Sources: app/page.tsx:13-28, lib/db/actions.ts:13-33
Workspace Initialization Flow
The following diagram illustrates the transition from the landing page to the onboarding interface.
The diagram shows the logic path that ensures every workspace has a configured monitoring profile before accessing the opportunity queue.
Sources: app/page.tsx:13-33
Profile Configuration Form
The OnboardingForm component manages the state and submission of product metadata. It utilizes a FormState object to track user input across several categories, including product descriptions and competitor lists.
Captured Data Fields
The form requires the following information to build a comprehensive profile:
| Field | Description | Requirement |
|---|---|---|
| Product URL | The primary website for the product. | Required |
| Docs / README | URLs for technical documentation. | Optional |
| Description | A detailed explanation of product functionality. | Required |
| Target Customer | Description of the ideal user or organization. | Required |
| Competitors | A list of 3–5 competing products. | Required |
| Topics | Relevant industry keywords or problems. | Required |
Sources: app/onboarding/onboarding-form.tsx:21-32, test/profile-onboarding.test.ts:7-14
Product Material Retrieval
The system attempts to fetch technical context directly from the provided URLs. If retrieval fails or the site is inaccessible, users can toggle forceManualMaterial. This allows them to paste README content or positioning statements directly into the productMaterialManual field.
This sequence details how input data is processed and stored as a new versioned record.
Sources: app/onboarding/onboarding-form.tsx:135-180, lib/db/schema.ts:192-225
Versioning and Persistence
The application treats monitoring_profile records as append-only. Each time a user updates their onboarding information, the system increments the version number. This allows downstream ranking and drafting modules to pin their logic to a stable version, ensuring consistency even if the user updates product details during a scan.
The monitoringProfile table in the database uses a unique index on the combination of workspaceId and version.
Sources: lib/db/schema.ts:192-225, app/onboarding/onboarding-form.tsx:162-167
Persistence Data Model
The ER diagram shows the relationship between a workspace and its versioned profile history.
Sources: lib/db/schema.ts:98-124, 192-225
Validation Logic
The flow enforces strict validation before persisting a profile. It requires between 3 and 5 competitors and verified URL formats for the product site. The UI displays FieldErrors directly below the relevant input fields when the API returns a 400 status.
Sources: app/onboarding/onboarding-form.tsx:370-388, test/profile-onboarding.test.ts:28-60
Conclusion
The Onboarding Flow UI serves as the foundation for the Vantage platform's intelligence. By converting abstract product descriptions into structured, versioned profiles, it enables accurate automated lead scoring and evidence-backed drafting. The flow ensures that even when automated scraping fails, users provide the necessary manual context to maintain high-quality system output.
Sources: app/onboarding/page.tsx:42-43, app/onboarding/onboarding-form.tsx:238-245