Search

Build product-specific search on portable query, ranking, transport, and framework contracts without coupling records to a provider.

Supported approaches

Weighted lexical search

available

Map product records into weighted fields, synonyms, filters, groups, and stable results.

Packages

@playstack/search

Frameworks and integrations

MiniSearch indexing

available

Use a maintained in-memory provider while preserving the portable engine and result contracts.

Frameworks and integrations

Next and Nest bindings

available

Expose the same validated protocol through App Router, Pages Router, or NestJS application routes.

Frameworks and integrations

framework

Next.js

Compose Playstack server contracts, React bindings, SSR handoff, and route adapters at the Next.js application edge.

framework

NestJS

Connect portable Playstack capabilities to dependency injection, guards, decorators, request context, workers, and lifecycle hooks.

framework

React

Headless domain bindings plus optional Chakra application and admin compositions, with server authority kept outside the client.

Package reference

@playstack/search

Keep the document model in the product

@playstack/search owns query execution, weighted lexical ranking, stable tie-breaking, transport validation, cancellation, and safe HTTP failures. The application maps its records, filters, groups, and result shape into those contracts.

ts
import { createLexicalSearchEngine } from '@playstack/search'

const search = createLexicalSearchEngine(documents, {
  document: (document) => ({
    id: document.id,
    fields: {
      title: document.title,
      body: document.body,
      tags: document.tags,
    },
    result: {
      title: document.title,
      href: document.href,
    },
  }),
  fields: { title: 10, tags: 6, body: 1 },
})

Chakra Docs can therefore retain its document and navigation vocabulary while reusing Playstack's generic search mechanics.

Choose an engine independently

The built-in lexical engine is dependency-free. @playstack/search-minisearch adds a MiniSearch-backed provider for larger in-memory indexes without changing the application protocol.

Expose one protocol across frameworks

@playstack/search-next supplies explicit App Router and Pages Router handlers. @playstack/nest-search supplies controller and injection helpers for NestJS. Authentication, authorization, cache policy, and route placement remain application decisions.

This lets a browser query the same product-defined search contract whether the server boundary lives in Next.js or NestJS.

Go

Playstack Pro tag
OriginsPricingBlogNewsletterChangelogStatusRoadmap
ContributorsCommunityIn Use ShowcaseCase StudiesPartnersSponsors
FAQsSupportContact

© 2026 Playstack. All rights reserved.

With OSS
Terms of ServicePrivacy PolicyCookie PolicyImprint

By

Commune Software