X Enterprises
Profile

XRDProfileSimilar

Similar Restaurants

XRDProfileSimilar

Bottom-of-profile section that surfaces up to 4 other restaurants likely to interest the visitor. Used at the bottom of every restaurant profile page (restaurants/[slug].vue).

Ranking logic

Each candidate restaurant gets a score:

  • +10 for each shared cuisine type (e.g., shared "Italian" + "Pizza" = +20)
  • +5 if same neighborhood/area
  • +2 if same price range (e.g., both "$$")

The current restaurant is always excluded. Candidates with score > 0 are sorted descending, and the top 4 are shown.

Usage

<XRDProfileSimilar :restaurant="restaurant ?? null" />

The component fetches the full restaurant list via useDomain().getRestaurants({ limit: 50 }) and computes relatedness client-side. No additional props or config needed.

Display

When related restaurants are found, the section renders:

  • Section header: "Similar Restaurants" with explanatory subtitle
  • 4-card grid (responsive: 1 col mobile, 2 col tablet, 4 col desktop)
  • Each card is a standard XRDProfileCard (with Open Now badge, distance, vibe badges)

When no related restaurants match, the section is hidden entirely (no empty state needed — there's nothing to show).


AI Context

component: XRDProfileSimilar
package: "@xenterprises/nuxt-x-restaurants"
use-when: >
  Adding "you might also like" recommendations at the bottom of restaurant
  profile pages. Pulls from the full restaurant list and ranks by shared
  cuisine (10pt each), neighborhood (5pt), and price (2pt). Shows top 4.
  No backend dependency — uses the same getRestaurants() call as the
  listing page. Hidden if no related restaurants are found.
Copyright © 2026