Step 1 Host Type Selection
Purpose (Product)
This step captures the landlord's hosting preference to personalize their experience and optimize the platform's features. The host type determines pricing strategies, booking rules, and feature availability. Short-term hosts focus on stays under 30 days, mid-term hosts target 28-180 day stays, and "both" accommodates mixed strategies.
UX Flow (What the user sees)
Landlord sees a welcome screen with their first name and three host type cards. Each card displays an image, title, subtitle, and description. Cards have hover effects with shadow elevation. When clicked, the selected card triggers an API call and automatically advances to the next step.
![[Desktop.png]]
System Flow (How it works)
sequenceDiagram
actor Landlord
participant Frontend as Web App (Next.js)
participant Backend as API (NestJS)
participant DB as Database
participant Auth as Firebase Auth
Landlord->>Frontend: Clicks host type card
Frontend->>Frontend: setSelectedHostType(hostType)
Frontend->>Backend: PATCH /api/users/{userId}
Note over Frontend,Backend: { hostType: 'SHORT_TERM'|'BOTH'|'MID_TERM' }
Backend->>DB: Update user.hostType
Backend-->>Frontend: 200 OK
Frontend->>Auth: updateUserData({ hostType })
Frontend->>Frontend: onNext() - advance to step 2Data Touched
Users table:
hostTypefield updatedValidation: Must be one of
SHORT_TERM,BOTH,MID_TERMError states: Network failures, invalid host type values
APIs Called
PATCH
/api/users/{userId}Payload:
{ hostType: string }Response: Updated user object
Error codes:
400(validation),401(unauthorized),500(server error)Idempotency: Yes — multiple calls with same hostType are safe
Retries: No automatic retries implemented
QA Checklist
Verify all three host type cards display correctly
Test hover effects on each card
Confirm API call is made on card selection
Verify user advances to step 2 after selection
Test error handling with network disconnected
Verify user context is updated after selection
Test with different user roles (should be blocked for non-landlords)