Step 10 Final Details
Purpose (Product)
Capture the property title that will be displayed to potential guests across all booking channels.
Provide visual context by showing room cards with photos, allowing landlords to click back to edit room photos if needed.
The title is crucial for search ranking, guest expectations, and channel distribution optimization.
UX Flow (What the user sees)
![[Desktop 8.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
Landlord->>Frontend: View room cards with photos
Frontend->>Frontend: Load rooms and associated images from property data
alt Click room card to edit photos
Landlord->>Frontend: Click room card
Frontend->>Frontend: Add 'pr' query param with room ID
Frontend->>Frontend: Navigate back to photo upload step
end
Landlord->>Frontend: Enter property title
Frontend->>Frontend: Real-time validation (title required)
Landlord->>Frontend: Click "Next"
Frontend->>Frontend: Validate title is not empty
Frontend->>Backend: PATCH /api/properties/{propertyId} { propertyDetails: { title } }
Backend->>DB: Update properties.propertyDetails.title
Backend-->>Frontend: 200 OK
Frontend->>Backend: PATCH /api/users/{userId} { onboardingStep: user.onboardingStep + 1 }
Backend->>DB: Update users.onboardingStep
Backend-->>Frontend: 200 OK
Frontend->>Backend: GET /api/properties (refetch)
Backend-->>Frontend: 200 OK { properties: [...] }
Frontend->>Frontend: Advance to description stepData Touched
users
Read:
id,onboardingStepWrite:
onboardingStep(+1 on success)
properties.propertyDetails
Write:
title(string)
properties.propertyRooms
Read: Room data with associated images for display
Validation rules
Error states
Client validation error if title is empty
4xx/5xx from API calls prevent step advancement
APIs Called
PATCH
/api/properties/{propertyId}Payload:
{ propertyDetails: { title: string } }Response: Updated property
Errors: 400 (validation), 401/403 (authz), 404 (not found), 500
Idempotency: Safe for identical title values
PATCH
/api/users/{userId}Payload:
{ onboardingStep: number }(current + 1)Response: Updated user
Errors: 400, 401/403, 404, 500
GET
/api/propertiesPurpose: Refresh property cache after update
Integrations
Next.js Router: URL parameter management for room-specific navigation
Firebase Auth: User context management
No external services triggered directly in this step
State & Side Effects
Local state (Step7Title)
React Hook Form manages
titlefieldroomsstate loaded from property data with image associationsURL parameter handling for room navigation
Parent flow (CreateListingContainer)
Calls
step7Ref.submitForm()on NextOn success: refetches properties, increments onboarding step, advances step index
Navigation side effects
Room card clicks add
prquery parameter and navigate back to photo uploadURL state preserved for room-specific editing
Caching
Properties list refetched post-update
Edge Cases & Error Handling
Empty title: Validation error prevents submission
Room navigation: Query parameter added to maintain context when returning to photo upload
API failure: User remains on step; error banner (parent) or console log
Missing room images: Placeholder image shown for rooms without photos
Long titles: Input field accommodates various lengths with responsive font sizing
Security & Permissions
AuthN: Required (authenticated landlord)
AuthZ:
Landlord-only access enforced upstream
Property must belong to authenticated user
Input validation: Server validates title format and length limits
XSS prevention: Title input should be sanitized before storage
QA Checklist
Visual
Room cards display with correct cover images and photo counts
Title input field renders with proper styling and responsive font size
Horizontal scroll works for room cards overflow
Behavior
Clicking room cards navigates back to photo upload with correct room selected
Empty title shows validation error on Next
Valid title allows progression to description step
Data
Verify
properties.propertyDetails.titleis updated correctlyVerify
users.onboardingStepincrements onceRoom data loads correctly with associated images
Negative
Simulate API errors: user remains on step; no step increment/navigation
Test with very long titles to ensure proper handling