Feature: Property
The property feature handles individual property detail pages and related data fetching.
Directory Structure
src/features/property/
api/
getPropertyDetails.ts # Property detail, similar houses, nearby highlightsAPI Functions
All functions in src/features/property/api/getPropertyDetails.ts use the REST API via the get() helper:
getPropertyDetails(id: string): Promise<House | null>
Fetches a single property by ID from GET /properties/:id. Returns null on error.
getSimilarHouses(id: string): Promise<House[]>
Fetches similar properties from GET /properties/similar/:id. Returns an empty array on error.
getPropertyNearbyHighlights(id: string): Promise<Highlight[]>
Fetches nearby points of interest from GET /properties/map-highlights/:id?radius=3&limit=5. Returns up to 5 highlights within a 3-unit radius.
UK Rental Routes
UK property pages are served from dedicated filesystem routes under src/app/en-gb/student-accommodation/:
/en-gb/student-accommodation # Search/browse page
/en-gb/student-accommodation/[city] # City-level listing
/en-gb/student-accommodation/[city]/property/[id] # Property detail pageThese routes are NOT rewritten through the [locale] system — they exist as standalone filesystem routes because they have different public-facing URLs (/en-gb/student-accommodation/...) than the internal route config keys (/rental/...).
The next.config.ts rewrite rules explicitly exclude student-accommodation from the generic /en-gb/:path* to /uk/:path* rewrite:
{
source: "/en-gb/:path((?!student-accommodation).*)",
destination: "/uk/:path*",
}Rental Feature
Related UI components live in src/features/rental/:
src/features/rental/
api/
get-rental-promo.ts # Fetch rental promo content from Contentstack
components/
rental-hero.tsx # Student accommodation hero section
rental-property-card.tsx # Property card for listings
city-properties-row.tsx # Row of properties for a cityRoute Config
"/rental": {
withHeader: false,
allowedRegions: ["uk"],
},
"/rental/[city]": {
withHeader: false,
allowedRegions: ["uk"],
},
"/rental/[city]/property/[id]": {
withHeader: false,
allowedRegions: ["uk"],
},
"/student-accommodation": {
mainSection: ({ dictionary }) => <RentalHero dictionary={dictionary || {}} />,
withHeader: true,
allowedRegions: ["uk"],
},All rental/property routes are UK-only and most hide the default hero header since they have custom layouts.