Create a Listing
How the three-step listing wizard is entered, what the Details and Location steps collect, and how the form is held between steps.
The listing wizard is one form spread over three screens. The same screens serve both creating a new listing and editing an existing one; a Redux flag decides which.
Step order
The wizard runs Details, then Photos, then Location. The submit button lives on the Location step. This page covers the wizard shell plus the Details and Location screens. The Photos step and the submit itself are covered in Listing photos and publish.
Where it lives
| Screen route | File | Who sees it |
|---|---|---|
/property/create-edit-listing | app/property/create-edit-listing.tsx | Agents and landlords (step 1, Details) |
/property/create-edit-listing-photo-amenities | app/property/create-edit-listing-photo-amenities.tsx | Agents and landlords (step 2, Photos) |
/property/create-edit-listing-location | app/property/create-edit-listing-location.tsx | Agents and landlords (step 3, Location and submit) |
Supporting code:
| Concern | File |
|---|---|
| Form values for all three steps | services/listings/listing-form-slice.ts (Redux slice listingForm) |
| Create or edit mode, and which listing is being edited | services/listings/listing-ui-slice.ts (Redux slice listingUi) |
| Validation rules and step routes | lib/listing-validation.ts |
| Step indicator (Details, Photos, Location) | components/app/listing-step-indicator.tsx |
| Address search | components/app/places-autocomplete.tsx |
| Map type | hooks/use-map-type.ts |
All three screens are registered in app/property/_layout.tsx and slide up from the bottom.
Before you start
- Role: agent or landlord, signed in and inside the
(tabs)navigator. Agents must have finished agent onboarding, otherwise the tabs redirect them to/agent-onboarding. - KYC: the backend refuses
POST /api/v1/property/createwith a 403 and the message "Landlord must complete KYC verification before listing properties" when the account'sisKYCVerifiedis false. The app does not check this before opening the wizard, so an unverified landlord only finds out on submit. - Permissions: location permission is requested only if the user taps the locate button on the map. Photo library permission is requested on the Photos step.
- Network: address suggestions call Google Places directly from the device, so they need connectivity. Reverse geocoding uses the device's own geocoder through
expo-location.
Flow
Entering the wizard
There are three ways in.
| Entry point | What it dispatches | Mode |
|---|---|---|
The floating plus button on the dashboard home (app/(tabs)/index.tsx) | setListingFormMode("create") | Create |
Edit on Manage Property (app/property/manage-property.tsx) | setListingFormMode("edit") and setSelectedPropertyId(id) | Edit |
Edit Listing Details on the owner listing page (app/property/my-listing/[id].tsx) | setListingFormMode("edit") and setSelectedPropertyId(id) | Edit |
All three then push /property/create-edit-listing. The Listings tab itself has no create button.
The header reads Create Listing or Edit Listing on every step, with a back chevron that pops one screen.
How the form is seeded and kept
The whole form lives in the listingForm Redux slice. Nothing is written to AsyncStorage and nothing is saved to the server until the final submit.
- On the Details screen, in create mode, the form is reset to defaults when its
_sessionKeyis not"create". Defaults: category Apartment, listing type Rent, rent collected up front 1 year, currency NGN, bedrooms 1, bathrooms 1, available from today, pin at the default Lagos coordinates. - In edit mode the screen fires
GET /api/v1/property/:idand shows the full-screen loader "Loading your listing…" until it returns. The response is copied into the form once, and_sessionKeyis set to the property id. - Every keystroke dispatches
patchListingForm, so moving back and forward between steps keeps what was typed. - A successful submit dispatches
resetListingForm.
There is no Save draft button
The app has no draft action. An abandoned create session simply stays in memory: because the session key is still "create", tapping the plus button again reopens the wizard with the earlier values. The values are lost when the app is killed, when the user signs out (the store is wiped), or when an edit session replaces them. The backend does support server-side drafts (status: "draft" on create and POST /api/v1/property/:id/publish), but the mobile app never calls either.
The same rule applies to edits: leaving an edit half way and reopening the same listing shows the unsaved changes rather than the stored values, because the form is only re-seeded when the session key differs from the property id.
Step 1: Details
In edit mode only, the current cover photo is shown at the top with a Manage photos (n) button that jumps to the Photos step.
Under the Basic Details heading:
| Field | Shown when | Rule | Error text |
|---|---|---|---|
| Property Title | Always | Trimmed length 5 to 200. Input is capped at 200 characters | "Title needs at least 5 characters" / "Title cannot exceed 200 characters" |
| Category | Always | Bottom sheet titled Property Type: Apartment, House, Villa, Land, Commercial, Shortlet, Office | None |
| Listing Type | Every category except Shortlet | Toggle: Rent or Sale | None |
| Price | Always | Must be a number greater than 0 | "Set a price before publishing", or "Set a nightly price" for a short let |
| Rent collected up front | Rent listings that are not short lets | 1 year, 2 years or 3 years | None |
| Min nights / Max nights | Shortlet only | Whole numbers. Min at least 1. Max 1 to 365 and not below min. Blank means 1 and 30 | "At least 1 night" / "1 to 365 nights" / "Can't be less than min nights" |
| Bedrooms | Apartment, House, Villa, Shortlet | Whole number 0 to 50 | "Enter 0 to 50" |
| Bathrooms | The four above plus Commercial and Office | Whole number 0 to 50 | "Enter 0 to 50" |
| Area | Always | At least 100 | "Must be at least 100 sq ft" |
| Short Description | Always | Trimmed length 20 to 5000 | "Description needs at least 20 characters" / "Description cannot exceed 5000 characters" |
Label details:
- The price label changes with the form: Price per night (NGN) for a short let, Price per year (NGN) for rent, Price (NGN) for sale. The currency is always NGN; there is no currency picker.
- The area label is Plot size (sq ft) for Land and Floor area (sq ft) for everything else.
- Helper text under the title reads "At least 5 characters." and under the area "Must be at least 100 sq ft.". The description shows a live count, for example "At least 20 characters (7 so far)." and then "42 characters.".
- Under the short-let stay fields: "Guests can book between these lengths in one stay."
Tapping Continue to photos runs validateDetails:
- If anything fails, an alert titled Check your details lists every problem as a bullet, and from then on each failing field is outlined in red with its message underneath.
- If everything passes, the app pushes
/property/create-edit-listing-photo-amenities.
Below the button: "Next: add at least 4 photos, grouped by room."
Edit mode checks less
In edit mode only title, description and price are validated on this step. Area, room counts and stay length are skipped because an edit does not send them.
Step 3: Location
Reached from the Photos step through Continue to location.
The screen opens with the heading Property Location and the hint "Drag the pin to precisely mark the entrance or property center."
The map
- A Google map 208 points tall, centred on the form's coordinates. The base map type (roadmap, satellite, hybrid or terrain) comes from
GET /api/v1/settingsand falls back to satellite. - The pin can be placed four ways: tap the map, drag the marker, tap the locate button, or pick a suggestion in Street Address.
- The locate button asks for foreground location permission. If refused: alert Location permission needed, "Enable location access to pin your current position on the map." If the position cannot be read: alert Error, "Couldn't get your current location."
- Plus and minus buttons zoom in and out.
- A card labelled COORDINATES shows latitude and longitude to four decimals, with a badge that reads DEFAULT until the pin leaves the default Lagos position and PINNED afterwards.
Auto-filled address. Whenever the coordinates change, the device geocoder is asked for the address and the line "Filling in address details from the pin…" is shown. Street, community, LGA and state are overwritten with whatever resolves; fields that do not resolve are left as they were.
Fields
| Field | Rule | Notes |
|---|---|---|
| Street Address | Optional | Google Places autocomplete limited to Nigeria. Suggestions appear after 2 characters with a 350 ms debounce, up to 5 at a time. Choosing one fills the field and moves the pin |
| Unit / Suite | Optional | On create it is appended to the street as street, unit |
| State | Required | "State is required" |
| LGA | Required | "LGA is required" |
| Community | Optional | Placeholder "Ikate Lekki" |
| Nearest Landmark (optional) | Optional | Places autocomplete. Choosing one moves the pin only if the pin is still on the default position |
| Map pin | Required on create | "Pin the property on the map: search the street or landmark, tap the map, or use your current location" |
The button at the bottom reads Create Listing or Update Listing. In edit mode a second button, Return to Original, simply goes back one screen. What the submit button checks and sends is described in Listing photos and publish.
States and edge cases
- Edit pre-load. A full-screen loader with "Loading your listing…" covers the Details step while
GET /api/v1/property/:idis in flight. There is no error screen for a failed load; the form just stays on its current values. - Category switch. Changing the category hides or shows fields but does not clear their values. Hidden room counts are left out of the create request.
- Short-let price. The single price field is sent both as
pricing.rentPriceand asshortLet.nightlyPriceon create. - No suggestions. If the Places request fails or returns nothing, the dropdown stays closed and the typed text is kept as the street.
- Pin badge vs validation. The badge compares only against the default Lagos coordinates. Validation also treats
[0, 0]as not pinned. - Location in edit mode. The fields are editable and State and LGA are still required, but an update does not send any location field. See the callout on the next page.
What happens next
Nothing leaves the device on these two steps apart from the listing fetch in edit mode, the platform settings fetch, and the Google Places lookups. The listing is created or updated only when the submit button on the Location step succeeds.
Dashboard and Tabs
How the professional (tabs) navigator is assembled per role, what the Home dashboard shows, the screens that hide behind it, and the first-launch tour.
Listing Photos and Publish
The Photos step of the listing wizard (picking, cropping, grouping, geotag rules, amenities) and what the final submit sends and produces.
HomeLink Hub