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).
| Name | module-search-ts |
| Version | 0.1.0 |
| Category | composable-modules |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | search, full-text, algolia, typesense, meilisearch, hybrid, typescript |
| Source | templates/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
| Tool | Version | Why |
|---|---|---|
node | >=22 | Node.js runtime for the search module |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toFull-text search with pluggable backends- Short project description for package.json and README
SearchProviderstring — defaults totypesense- 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.tsComposes with
- Pairs with
ts-service - Pairs with
rag-pipeline - Pairs with
module-vector-store - Nests inside
monorepo