X Enterprises

Configuration

app.config.ts and runtimeConfig reference for @xenterprises/nuxt-x-restaurants.

Configuration

All per-site behaviour is configured under the xRestaurants key in app.config.ts. API credentials and the public site URL come from runtime config / environment variables.

Your overrides must live in app/app.config.ts (Nuxt 4 srcDir). An app.config.ts at the project root is ignored by the config merge and silently yields only the layer defaults below.

app.config.ts

export default defineAppConfig({
  xRestaurants: {
    // Brand
    name: "My Restaurant Directory",
    domain: "mysite.com",          // used by useDomain() to build /public/domains/:domain URLs
    logo: "/logos/my-logo.webp",

    // Top-level nav
    navbar: {
      links: [
        { label: "Explore", to: "/restaurants" },
        { label: "Articles", to: "/articles" },
      ],
    },

    // Homepage section copy and assets — every section also takes
    // `enabled: false` to hide it (hero, featured, popular, newRestaurants,
    // localGuide, latestStories, showcase, faq).
    homePage: {
      hero: {
        title: "Find the Best Dining",
        description: "Explore top-rated restaurants...",
        backgroundImage: "https://...",
        searchButtonLabel: "Search",
        cuisinePlaceholder: "Cuisine",
        locationPlaceholder: "Neighborhood",
      },
      featured: {
        title: "Featured Places",
        description: "Hand-picked selections.",
        viewAllLink: "/restaurants",
        viewAllLabel: "View All",
        viewButtonLabel: "View",
      },
      latestStories: {
        title: "Latest Food Stories",
        description: "Get inspired by chef interviews, seasonal guides...",
        readMoreLabel: "Read Article",
      },
      popular: {
        title: "Popular This Week",
        viewDetailsLabel: "View Details",
      },
      localGuide: {
        title: "Your Guide to Local Dining",
        paragraphs: [],
      },
      faq: {
        title: "Frequently Asked Questions",
        items: [{ label: "How do I search?", content: "Use the filters..." }],
      },
    },

    // When enabled (or when the domain is not found by the API), /
    // renders XRDComingSoon on the bare layout.
    comingSoon: {
      enabled: false,
      title: "",
      description: "",
      backgroundImage: "",
      launchDate: "",
    },

    // Menu card visual config (read by XRDMenuCard / XRDProfileMenuItem / useMenuCard())
    menuCard: {
      showImage: true,
      showDescription: true,
      showTags: true,
      showSpiceLevel: false,
      showCalories: false,
      showPrepTime: false,
      variant: "default",          // 'default' | 'compact' | 'horizontal'
      imageAspect: "video",         // 'square' | 'video' | 'wide'
      dietaryTags: [
        { id: "vegetarian", label: "Vegetarian", icon: "i-heroicons-leaf", color: "green" },
      ],
    },

    // Filter groups + sidebar behaviour (read by useFilters() / useRestaurantFilters())
    filters: {
      enabled: true,                // false hides the /restaurants filters aside
      title: "Filters",
      groups: [],                   // FilterGroup[] — see schema below
      showClearAll: true,
      mobileBreakpoint: "lg",       // 'sm' | 'md' | 'lg' | 'xl'
      // Optional: directory aside sections — subset, order, labels,
      // default-open. Omit for the full default set.
      // sections: [
      //   { id: "cuisine", label: "Cuisine", defaultOpen: true },
      //   { id: "price" },   // location | cuisine | price | amenities | dietary | vibe
      // ],
    },

    // Analytics tracking (useAnalytics())
    analytics: {
      enabled: true,                // false disables all analytics tracking
    },
  },
});

Schema Reference

Brand & nav

KeyTypeDefaultDescription
namestring'Restaurant Destinations'Directory name used in metadata, headings, footer, navbar.
domainstring'testingrestaurants.com'Domain used by useDomain() to build /public/domains/:domain API URLs. Always override per site.
logostring'/logos/Restaurant Destinations.webp'Logo image path displayed in XRDNavbar (and as fallback in XRDComingSoon).
navbar.links{ label: string, to: string }[]4 default linksNavigation links rendered by XRDNavbar (defaults: Explore Restaurants, Popular Restaurants, Features, Articles).
navbar.signInLabelstringOptional sign-in button label (declared in the type augmentation).

Homepage

Every homepage section accepts enabled: false to hide it — homePage.<section>.enabled where <section> is one of hero, featured, popular, newRestaurants, localGuide, latestStories, showcase, faq (all render by default).

KeyTypeDefaultDescription
homePage.hero.titlestring'Find the Best Dining in Your Neighborhood'Hero section headline.
homePage.hero.descriptionstring'Explore top-rated restaurants, cozy cafes, and hidden gems…'Hero section subtext.
homePage.hero.backgroundImagestringUnsplash URLHero background image URL.
homePage.hero.searchButtonLabelstring'Search'Hero search button label.
homePage.hero.cuisinePlaceholderstring'Cuisine'Hero cuisine select placeholder.
homePage.hero.locationPlaceholderstring'Neighborhood'Hero location select placeholder.
homePage.featured.titlestring'Featured Places'Featured restaurants section title.
homePage.featured.descriptionstring'Hand-picked selections for your next dining adventure.'Featured section description.
homePage.featured.viewAllLinkstring'/restaurants'"View all" link target.
homePage.featured.viewAllLabelstring'View All'"View all" link label.
homePage.featured.viewButtonLabelstring'View'Per-card view button label.
homePage.latestStories.titlestring'Latest Food Stories'Latest Stories section title.
homePage.latestStories.descriptionstring'Get inspired by chef interviews…'Latest Stories section description.
homePage.latestStories.readMoreLabelstring'Read Article'Per-story CTA label.
homePage.popular.titlestring'Popular This Week'Popular This Week section title.
homePage.popular.viewDetailsLabelstring'View Details'Per-card "view details" label.
homePage.localGuide.titlestring'Your Guide to Local Dining'Local Dining Guide section title.
homePage.localGuide.paragraphsstring[][]Optional paragraphs override.
homePage.faq.titlestring'Frequently Asked Questions'FAQ section title.
homePage.faq.items{ label, content }[]3 default entriesFAQ section entries.

Coming soon

KeyTypeDefaultDescription
comingSoon.enabledbooleanfalseForce-render XRDComingSoon on /.
comingSoon.titlestring— (unset)Hero title on the coming-soon page.
comingSoon.descriptionstring— (unset)Hero description.
comingSoon.backgroundImagestring— (unset)Background image (falls back to the homepage hero background).
comingSoon.launchDatestring— (unset)Launch date — stored as a string, format free.
KeyTypeDefaultDescription
menuCard.showImagebooleantrueShow menu item image in XRDMenuCard.
menuCard.showDescriptionbooleantrueShow menu item description.
menuCard.showTagsbooleantrueShow dietary/tag badges on menu items.
menuCard.showSpiceLevelbooleanfalseShow spice level indicator.
menuCard.showCaloriesbooleanfalseShow calories count.
menuCard.showPrepTimebooleanfalseShow preparation time.
menuCard.variant'default' | 'compact' | 'horizontal''default'Menu card layout variant.
menuCard.imageAspect'square' | 'video' | 'wide''video'Menu card image aspect ratio (default variant only).
menuCard.dietaryTagsDietaryTag[]5 defaultsDietary tag definitions used by useMenuCard().

Filters

KeyTypeDefaultDescription
filters.enabledbooleantrueShow the filters aside on /restaurants. false hides it entirely.
filters.titlestring'Filters'Filters section title.
filters.sectionsFilterSection[]undefinedDirectory aside (XRDFilters) sections. When set, this array is the complete list — controls which sections render, their order, labels, and which start expanded. Omit for the full default set.
filters.groupsFilterGroup[][]Generic filter group definitions read by useFilters() (the opt-in XRDFiltersAsideFilters / XRDFiltersActiveFilters components — unrelated to the directory aside).
filters.showClearAllbooleantrueShow "Clear All" button in filter UI.
filters.mobileBreakpoint'sm' | 'md' | 'lg' | 'xl''lg'Breakpoint below which the filters collapse into a drawer.

FilterSection shape

interface FilterSection {
  id: "location" | "cuisine" | "price" | "amenities" | "dietary" | "vibe"
  label?: string        // override the section heading
  defaultOpen?: boolean // start the section expanded
}

Analytics

KeyTypeDefaultDescription
analytics.enabledbooleantrueMaster switch for useAnalytics() tracking. false disables all events (page views, clicks, search impressions).

FilterGroup shape

interface FilterGroup {
  id: string
  label: string
  type: "checkbox" | "range" | "select" | "search" | "radio"
  options?: { label: string, value: string | number, count?: number, disabled?: boolean, icon?: string }[]
  min?: number
  max?: number
  step?: number
  placeholder?: string
  collapsed?: boolean
  multiple?: boolean
  unit?: string
  defaultValue?: unknown
}

Runtime Config / Environment Variables

VariableRequiredDescription
NUXT_PUBLIC_API_ENDPOINTYesBase URL for the restaurant API used by useDomain() and useAnalytics(). Set to an empty string to hit mock routes in your own server/routes/public/** (see the quickstart).
NUXT_PUBLIC_SITE_URLNoPublic site URL — exposed as runtimeConfig.public.siteUrl (returned by useDomain()).
NUXT_PUBLIC_SITE_NAMENoSite name — exposed as runtimeConfig.public.siteName.
NUXT_SITE_URLNoSite URL for @nuxtjs/seo.
NUXT_SITE_NAMENoSite name for @nuxtjs/seo.
JSON-LD site identity (siteUrl, siteName, siteLogo used by useSchema() / useSiteMeta()) is read from the xSchema namespace provided by the @xenterprises/nuxt-x-schema layer — not from xRestaurants. Since v0.10.0 the layer extends nuxt-x-schema directly, so JSON-LD renders out of the box; set xSchema in app/app.config.ts for your site's values.

AI Context

package: "@xenterprises/nuxt-x-restaurants"
config-key: xRestaurants
use-when: >
  Customising the restaurant directory name, domain, logo, navbar links,
  homepage copy and assets, coming-soon mode, menu card layout/dietary
  tags, or filter panel behaviour. Set NUXT_PUBLIC_API_ENDPOINT to connect
  useDomain() and useAnalytics() to your restaurant API.
Copyright © 2026