Skip to content

What is samesake

samesake is a TypeScript-first commerce intelligence engine. It turns raw catalog records into enriched, searchable data, resolves duplicate offers into product groups, and runs grounded search over the retrieval capabilities your application provides.

The product is deliberately split into three primitives:

PrimitiveResponsibility
enrichTyped extraction, confidence gates, derived indexing surfaces, and evaluation.
resolveCandidate generation, scoring, threshold decisions, and clustering.
searchQuery understanding, hybrid retrieval, honest cutoffs, ranking, and facets.
@samesake/core
├── @samesake/enrich ── EnrichStore + CandidateProvider
├── @samesake/query ── Retriever + VocabProvider + facets
├── @samesake/presets ── overridable domain bundles
└── @samesake/embed ── dual-form embedder wrapper
@samesake/postgres ── one reference backend and Tier-2 bundle

The pure packages own contracts and algorithms. A backend owns I/O: retrieval, durable row state, candidate blocking, vocabulary, and the facet implementation. Postgres is one backend with exact SQL facets; another application can provide the same ports over a different store.

  1. Pure core — call enrich, resolve scoring, or query helpers with injected model and port closures.
  2. Capability factory — use createEnricher or createSearch with your ports.
  3. Batteries bundle — use a backend package such as @samesake/postgres when its storage and retrieval choices fit your application.

Start with the canonical API or choose a path: search without the reference backend and enrichment without the reference backend.