Overview
The onboarding system guides new users through setup with a state machine tracking progress from extension installation through data collection and processing.GET /api/onboarding/state
Retrieve current onboarding state for authenticated user.Authentication
Requires Directus JWT token.Response
Current onboarding state:
EXTENSION_INSTALL, DATA_COLLECTION, PROCESSING, or COMPLETEUser ID from persona record
Example
cURL
Example Response
Example Response
PATCH /api/onboarding/state
Update onboarding state for authenticated user.Request Body
New state:
EXTENSION_INSTALL, DATA_COLLECTION, PROCESSING, or COMPLETEResponse
Returns updated persona record with new onboarding state.Example
cURL
POST /api/onboarding/zip-upload
Upload data export zip file for processing.Authentication
Requires Directus JWT token.Request Body
Multipart form data with single file field:ZIP file containing platform data export
Response
Whether upload was successful
BullMQ job ID for tracking processing
Server path where zip was stored
Example
cURL
Example Response
Example Response
Onboarding State Machine
State Descriptions
| State | Description | User Action |
|---|---|---|
EXTENSION_INSTALL | Initial state | Install browser extension |
DATA_COLLECTION | Extension ready | Export and upload data |
PROCESSING | Data being processed | Wait for completion |
COMPLETE | Onboarding finished | Access full platform |
Content Gate Integration
The Genie AI chat enforces onboarding completion:- Users in
EXTENSION_INSTALLorDATA_COLLECTIONreceive setup guidance - Full AI features unlock only in
COMPLETEstate - State checked on every chat request via
server/endpoints/api/genieChat.js
Related Endpoints
Genie Chat
AI chat with onboarding gate enforcement
User Profile
Update user persona and profile data
Implementation
Source:server/endpoints/api/onboarding.js
Onboarding state stored in user_personas.onboarding_state (Directus collection).