Skip to content

Vector Store Module

Pluggable vector database abstraction for embedding storage and similarity search. Ships with providers for in-memory (Map-backed with cosine similarity), PostgreSQL with pgvector, Qdrant (HTTP API), and Pinecone (SDK). Includes a composable filter expression compiler that translates logical predicates into backend-native query formats. Uses the self-registering provider pattern so custom backends can be added without modifying core code.

Namemodule-vector-store
Version0.1.0
Categorycomposable-modules
LicenseApache-2.0
Personaengineering
Tagsvector-store, embeddings, similarity-search, typescript, infrastructure
Sourcetemplates/module-vector-store

Render it

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

# CLI
npx @nanohype/sdk render module-vector-store --out ./my-app

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

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

Prerequisites

ToolVersionWhy
node>=22Node.js runtime for the vector store 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 Pluggable vector store for embedding storage and similarity search
Short project description for package.json and README
VectorProvider string — defaults to memory
Default vector backend (memory, pgvector, qdrant, pinecone, or a custom provider name)

What it produces

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

.env.example
.gitignore
biome.json
package.json
README.md
src/vector-store/__tests__/filters.test.ts
src/vector-store/__tests__/helpers.test.ts
src/vector-store/__tests__/memory.test.ts
src/vector-store/__tests__/registry.test.ts
src/vector-store/__tests__/similarity.test.ts
src/vector-store/bootstrap.ts
src/vector-store/filters/compiler.ts
src/vector-store/filters/types.ts
src/vector-store/helpers.ts
src/vector-store/index.ts
src/vector-store/providers/index.ts
src/vector-store/providers/memory.ts
src/vector-store/providers/mock.ts
src/vector-store/providers/pgvector.ts
src/vector-store/providers/pinecone.ts
src/vector-store/providers/qdrant.ts
src/vector-store/providers/registry.ts
src/vector-store/providers/types.ts
src/vector-store/resilience/__tests__/circuit-breaker.test.ts
src/vector-store/resilience/circuit-breaker.ts
src/vector-store/similarity.ts
src/vector-store/types.ts
tsconfig.build.json
tsconfig.json
vitest.config.ts

Composes with

Composites that use it

  • AI Platform — Full AI platform with HTTP service, LLM gateway, vector store, data pipeline, auth, billing, and monitoring.
  • Platform Tenant — One-shot scaffolder for a k8s-native nanohype Platform tenant: the k8s-app-tenant chart (which vendors tenant-chart-base and ships per-env values, an ArgoCD ApplicationSet entry, and the Platform + BudgetPolicy CRs) plus the optional AI building blocks as local packages — the LLM gateway and the vector store.