Search and Filters
How tenants search listings by title on the mobile app, and the current state of the filter screen.
Search is a single screen that queries the backend as the user types and shows results in a grid or list. The filter screen exists and is fully drawn, but its choices are not yet applied to any request.
Where it lives
| Screen | Route | File | Who sees it |
|---|---|---|---|
| Search | /search | app/search.tsx | Tenants, from the home search bar or the home filter button |
| Filter | /filter | app/filter.tsx | Tenants, from the tune icon on the search screen |
Supporting code: services/property/property-thunk.ts (searchProperties endpoint on the propertyApi slice), interface/property.types.ts (PropertySearchQuery), components/app/property-card.tsx, components/app/property-grid-card.tsx, utils/format-price.ts.
Before you start
- Signed in as a tenant (the entry points are on the tenant home screen).
- No KYC and no device permissions are required.
GET /api/v1/property/searchis public on the backend. It returns only properties that are listed and verified.
Flow
Search
- From the home screen, tap the search bar or the filter button. Both push
/search. - The input (placeholder
Search properties...) is focused automatically and the keyboard opens. Before anything is typed the screen shows theSearch for Propertiesprompt. - Typing is debounced by 350 ms. The text is trimmed; an empty or whitespace-only value sends nothing.
- Once the debounced text is non-empty the app fires
GET /api/v1/property/search?title=TEXT&page=1&limit=20. The response is stored in thepropertyApiRTK Query cache, keyed by the query arguments, so retyping a recent term is served from cache. - While the request runs the heading reads
Searching...with a spinner below it. When it finishes the heading readsN Properties Found(1 Property Foundfor a single result). - Results render as grid cards (two columns, the default) or list cards. The icon next to the heading toggles the view.
- Tapping a card pushes
/property/[id]withidset to the property_id. See Property details. - The
xicon inside the input clears the text and returns to the prompt. The back chevron leaves the screen.
Field rules:
| Field | Rule |
|---|---|
| Search text | Free text, trimmed, no minimum length; one character is enough to search |
| Page size | Fixed at 20; there is no pagination or infinite scroll, so only the first 20 matches are shown |
What the backend matches: the title parameter is applied as a case-insensitive substring match on the property title only. Results are sorted newest first because no sort is sent.
Search matches titles only
Enter a location, property name, or type to start exploring. but the request only sends title. Typing a city, state or property type finds a listing only if that word is in its title.Card content is mapped the same way as on the category screen: image from media.images[0].url (stock placeholder if missing), title (Untitled property if missing), community, state, rating, and price formatted like ₦1,500,000. The price period is night for short lets, year when a rent price exists, and omitted for a sale price on grid cards.
Controls that are not wired yet
Unfinished controls on the search screen
Price, Property Type, Beds, Baths, Year) and the Sort by button have no press handlers. They render but do nothing. Hearts on result cards are also not interactive on this screen.Filter
- On the search screen tap the tune icon to push
/filter. - The header shows a back chevron, the title
Filterand aResetlink. - Sections and their options:
| Section | Control | Options | Default |
|---|---|---|---|
| Price Range | Two-thumb slider, 0 to 1,000,000 in steps of 5,000, with a floating label and Min Price / Max Price boxes | Any range | ₦50,000 - ₦500,000 |
| Property Type | Single-select chips | House, Apartment, Villa, Land, Commercial, Shortlet, Office | House |
| Bedrooms | Single-select chips | Any, 1, 2, 3, 4 | Any |
| Bathrooms | Single-select chips | Any, 1, 2, 3, 4 | Any |
| Amenities | Multi-select chips | WiFi, Security, AI Voice, Wardrobe | WiFi selected |
Resetrestores the defaults above, except that it clears all amenities instead of re-selectingWiFi.Apply Filterscallsrouter.back()and returns to the search screen.
Filters are not applied
Apply Filters just goes back: nothing is passed to the search screen, no request is made, and the values are lost when the screen closes. The backend search endpoint already accepts type, minPrice, maxPrice, bedrooms, bathrooms, state, address and sort, and the app type PropertySearchQuery declares them, but the search screen only ever sends title, page and limit.States and edge cases
- Nothing typed:
Search for PropertieswithEnter a location, property name, or type to start exploring. - Typing: the results panel stays up between keystrokes so the prompt does not flash back.
- Loading: heading
Searching...and a large spinner. No skeleton cards. - No matches:
No Results FoundwithNothing matched that search. Try a different term or area. - Request failed or offline: a wifi-off icon,
Couldn't load resultsandCheck your connection and try again.There is no retry button; change the text to trigger a new request. - Sold or rented listings would show a status overlay on the card, but the search endpoint only returns listed properties, so this is not expected in search results.
- An expired access token is refreshed silently once; if that fails the user is sent to sign-in. See Sign up and sign in.
What happens next
- Search has no side effects on the backend. No search history or saved search is stored;
Saved Searcheson the profile screen is markedComing soon. - Opening a result continues in Property details.
- The
propertyApicache holding search results is cleared when the store resets on sign-out or session expiry.
Home and Discovery
The tenant tab bar, home screen, category browsing, the Recommended list, map display and the first-launch guided tour.
Property details
The listing screen a tenant opens from any card, with photo, reviews, sharing, wishlist, map and the buttons that start an inspection or a payment.
HomeLink Hub