Skip to main content

Coveo

The @archibald/coveo package implements Archibald's universal search and recommendation contract against the Coveo platform. It connects the SearchClient from @archibald/search to Coveo's Search API, maps Coveo results to the standardized Archibald Product and Pagination interfaces, and tracks search events (views, clicks, conversions) through Coveo Relay (@coveo/relay). It works across Web (SSR/browser) and Mobile (React Native/Expo).

For the general search architecture — client, adapters, providers, hooks — see the Search guide.

Installation

pnpm add @archibald/coveo

The package peer-depends on the core Archibald packages of your project (@archibald/search, @archibald/client, @archibald/server, @archibald/core, …), which an Archibald project already ships.

Usage

Client side

Configure the SearchClient with the Coveo adapter:

import { CoveoSearchAdapter } from '@archibald/coveo';

const searchClient = new SearchClient({
adapter: CoveoSearchAdapter
// ...
});

Server side

Register the SearchModule with the Coveo provider:

import { CoveoSearchProvider } from '@archibald/coveo';

new SearchModule({
provider: new CoveoSearchProvider({
config: {
organizationId: '...',
apiKey: '...'
}
})
});

Key concepts

  • AI-powered search: ranking and relevance come from Coveo's machine-learning models.
  • Recommendations: specialized support for personalized product carousels based on Coveo Merchandising Hub configurations.
  • Event relay: event tracking via Coveo Relay is mandatory for personalized features — emit search events through the hooks provided by @archibald/search.

Further documentation