Skip to content

Module: Full-Text Search

Full-text search with pluggable backends. Ships with providers for Algolia (REST API), Typesense (HTTP API), and Meilisearch (HTTP API), plus an in-memory mock with basic TF-IDF text matching and facet counting. Includes a reciprocal rank fusion combiner for hybrid keyword + vector search. Factory-based registry, circuit breakers, OTel metrics, and native fetch throughout (no heavy SDKs).

Namemodule-search-ts
Version0.1.0
Categorycomposable-modules
LicenseApache-2.0
Personaengineering
Tagssearch, full-text, algolia, typesense, meilisearch, hybrid, typescript
Sourcetemplates/module-search-ts

Render it

Three front doors, one catalog. Pick whichever suits the caller.

# CLI
npx @nanohype/sdk render module-search-ts --out ./my-app

# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "module-search-ts", variables);

# MCP — from an agent
get_template({ name: "module-search-ts" })

Prerequisites

ToolVersionWhy
node>=22Node.js runtime for the search module

Variables

Required

ProjectName string
Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.

Optional

Description string — defaults to Full-text search with pluggable backends
Short project description for package.json and README
SearchProvider string — defaults to typesense
Default search provider (typesense, algolia, meilisearch, mock, or a custom name)

What it produces

26 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.

.env.example
.gitignore
biome.json
package.json
README.md
src/search/__tests__/combiner.test.ts
src/search/__tests__/mock.test.ts
src/search/__tests__/registry.test.ts
src/search/bootstrap.ts
src/search/config.ts
src/search/hybrid/combiner.ts
src/search/index.ts
src/search/logger.ts
src/search/metrics.ts
src/search/providers/algolia.ts
src/search/providers/index.ts
src/search/providers/meilisearch.ts
src/search/providers/mock.ts
src/search/providers/registry.ts
src/search/providers/types.ts
src/search/providers/typesense.ts
src/search/resilience/__tests__/circuit-breaker.test.ts
src/search/resilience/circuit-breaker.ts
src/search/types.ts
tsconfig.json
vitest.config.ts

Composes with