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:
| Primitive | Responsibility |
|---|---|
enrich | Typed extraction, confidence gates, derived indexing surfaces, and evaluation. |
resolve | Candidate generation, scoring, threshold decisions, and clustering. |
search | Query understanding, hybrid retrieval, honest cutoffs, ranking, and facets. |
The package graph
Section titled “The package graph”@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 bundleThe 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.
Composition tiers
Section titled “Composition tiers”- Pure core — call
enrich,resolvescoring, or query helpers with injected model and port closures. - Capability factory — use
createEnricherorcreateSearchwith your ports. - Batteries bundle — use a backend package such as
@samesake/postgreswhen 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.