Skip to content

Add a Meilisearch provider layer #75

Description

@TitusKirch

Before you start

  • I searched existing issues and didn't find a duplicate

What problem are you trying to solve?

duxt will expose normalized, build-time search records through #16. A site that already runs Meilisearch needs an official way to consume those records without recreating duxt's source, version, locale, and generated-section logic.

The built-in search decision in #33 must remain independent: Meilisearch is an opt-in provider for consumers that choose to operate or buy the service.

Proposed solution

Provide a Meilisearch provider layer that consumes duxt:search:records after #16 lands.

It should let a consumer synchronize the complete current record set to a Meilisearch index during its build, with stable record identity and removal of records no longer present in a later build. Searchable content and filterable provenance must preserve the common contract: URL, title, normalized plaintext, source, version, and locale.

The provider layer owns its credentials, service configuration, synchronization policy, and browser search integration. duxt itself gains no Meilisearch SDK, runtime hook, or service dependency.

Alternatives considered

Additional context

Decided (refinement pass, 2026-09-11):

  • The official provider ships as the independently published companion Nuxt layer @kirchdev/duxt-meilisearch, in its own repository. It consumes the public hook but is not a workspace package or optional export of @kirchdev/duxt.
  • Add a Meilisearch provider layer #75 remains blocked by Decide the extension surface: hooks, plugins, or neither #16. Implementation begins only once duxt:search:records has landed; GitHub records this as a native “blocked by Decide the extension surface: hooks, plugins, or neither #16” dependency.
  • @kirchdev/duxt remains free of the Meilisearch SDK, credentials, runtime hooks, and service configuration. Those are exclusively the companion layer’s responsibility.
  • Only an explicitly enabled production sync may modify Meilisearch. Local development, previews and pull-request builds must never alter a production index. The write key is a server-side build secret.
  • Synchronization is atomic. The provider builds the complete current record set in a staging index, waits for all indexing tasks, then atomically swaps it with the configured production index. It cleans up the old staging index only after a successful swap.
  • Browser integration is opt-in and uses a least-privilege public configuration. The provider exposes only the Meilisearch host, index name and an index-scoped search key to the browser; its private build key remains server-side. Browser results retain duxt’s URL, title, normalized content and provenance model.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions