The @laioutr-app/nimstrata package integrates Nimstrata (Retail Connect / Google Retail API) into a Laioutr-powered Nuxt app for AI-powered product search, category browsing, recommendations, suggested search (autocomplete), and event tracking. It uses the Nimstrata API (search, predict, autocomplete, event) and depends on @laioutr-app/shopify to resolve collection and product IDs (e.g. category slug → Shopify collection ID, product slug → product ID for recommendations). The package registers with the Laioutr orchestr (queries, links, component resolvers, query template provider, actions) and exposes ProductSearchQuery, ProductsByCategorySlugQuery, NimstrataProductRecommendationsQuery, SuggestedSearchSearchQuery, SuggestedSearchEntriesLink, SuggestedSearchEntry resolver, and TrackEventAction.
Configuration includes projectId (required), baseURL (optional), catalogId (optional), and serving (optional search/byCategory/predict configs). The middleware injects nimstrataClient, shopifyStorefrontClient, and nimstrata context (visitorId, sessionId, userInfo). A visitor ID is stored in the nimstrata-visitor-id cookie for personalisation and event attribution. The module installs @laioutr-core/frontend-core, @nuxt/image, and @laioutr-app/shopify on prepare.
The module expects configuration under the key @laioutr-app/nimstrata in nuxt.config.ts (or via runtimeConfig). One option is required; the rest have defaults or are optional.
| Option | Type | Description |
|---|---|---|
baseURL | string | Nimstrata API base URL. Default: https://storefront.retailconnect.app/v1. |
projectId | string | Nimstrata project identifier. Used in API payloads (e.g. event, catalog path). |
catalogId | string | Catalog identifier. Default: default_catalog. Used in catalog path: projects/{projectId}/locations/global/catalogs/{catalogId}. |
serving | object | Optional override for search, byCategory, and predict configs. search / byCategory: servingConfigId, filterFields, availableSortings. predict: array of { servingConfigId, label, limit, eventType, eventDataInput } (e.g. home-page-view, detail-page-view). See Google Retail user events for event data. |
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@laioutr-app/nimstrata', '@laioutr-core/orchestr', '@laioutr-app/shopify'],
'@laioutr-app/nimstrata': {
baseURL: process.env.NIMSTRATA_BASE_URL ?? 'https://storefront.retailconnect.app/v1',
projectId: process.env.NIMSTRATA_PROJECT_ID!,
catalogId: process.env.NIMSTRATA_CATALOG_ID ?? 'default_catalog',
serving: {
// optional overrides
},
},
});
Use environment variables for projectId (and baseURL, catalogId) in production; do not commit secrets if the API requires auth beyond projectId.
baseURL, projectId, catalogId, and optional serving. The SDK exposes search, byCollection(collectionId, params), predict(servingConfigId, limit, userEvent), autocomplete(params), event(payload), and getPredictConfigs(). All API calls are POST to the base URL. The SDK is passed into the orchestr context as nimstrataClient.{ visitorId, sessionId, userInfo }.runtime/app/public as Nitro public assets (e.g. app logo at /app-nimstrata/nimstrata-logo.svg) with a 7-day cache.The package implements Laioutr’s canonical search, category, suggested-search, and tracking types plus a custom recommendations query. The following lists what is available; for exact types and payloads, refer to @laioutr-core/canonical-types and the package source.
query. Uses nimstrataClient.search with visitorId, filters, order, pagination. Returns entities (mapped to product-like shape via searchResultToEntity), total, sorting, availableFilters, availableSortings. Provides: ProductDefaultVariant, ProductInfo, ProductPrices.servingConfigId, eventType (home-page-view, search, category-page-view, detail-page-view), optional productSlug, productId, searchQuery, pageCategories. Resolves productId from slug via Shopify if needed. Uses nimstrataClient.predict(servingConfigId, limit, userEvent). Returns entities (mapped via predictResultToEntity with currency and attributionToken). Provides: ProductDefaultVariant, ProductInfo, ProductPrices, ProductAnalytics.query. If empty, sets passthrough to empty array and returns id. Otherwise uses nimstrataClient.autocomplete and maps results via mapAutosuggestToSuggestedSearch; stores entries in suggestedSearchEntriesPassthroughToken. Returns id (e.g. suggested-search:{query}).| Cookie | Purpose |
|---|---|
| nimstrata-visitor-id | Persistent visitor ID (UUID v4) for personalisation and event attribution. Set by ensureVisitorId when missing. Used in search, predict, autocomplete, and event calls. |
@laioutr-app/nimstrata (e.g. from env).All changelogs are managed in CHANGELOG.md in the package’s GitHub repository. This app does not currently have a public repository under the Laioutr organization; when it is published there, use that repo’s CHANGELOG.md for release notes.
Hygraph
Laioutr app package that connects a Nuxt storefront to Hygraph’s Content API, Orchestr, Studio media, and Nuxt Image—using a sample content model as a starting point only.
Pimcore
Developer documentation for the Laioutr Pimcore app. Connect your Laioutr-powered Nuxt app to Pimcore and fetch data through its native REST API.