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.
| Name | module-vector-store |
| Version | 0.1.0 |
| Category | composable-modules |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | vector-store, embeddings, similarity-search, typescript, infrastructure |
| Source | templates/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
| Tool | Version | Why |
|---|---|---|
node | >=22 | Node.js runtime for the vector store 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 toPluggable vector store for embedding storage and similarity search- Short project description for package.json and README
VectorProviderstring — defaults tomemory- 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.tsComposes with
- Pairs with
ts-service - Pairs with
rag-pipeline - Pairs with
agentic-loop - Nests inside
monorepo
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.