Files
backend_fiesta/services
Suriyakumarvijayanayagam 72907dae74 Scan-to-order: label from the customer's camera to "buy it here"
POST /v1/mob/scan/lookup   label + customer → catalogue match, sizes, and
                           every registered store that sells it with live
                           stock, in-stock first / nearest first, one
                           recommended
POST /v1/mob/scan/confirm  chosen store + size + qty → re-read the ledger;
                           ok, or the next-nearest store with enough of the
                           same product
GET  /v1/mob/scan/stores   registered stores nearest first

Recognition is pgvector cosine search over every brand_* table (each
with its own index, merged) plus a word match that settles near-ties
and works alone when no model is configured. The embedder is chosen by
EMBEDDING_PROVIDER (OpenAI-compatible or Gemini) and must be the model
that indexed the catalogue: verified 2026-09-15 as all-MiniLM-L6-v2 over
search_query, served by the cluster's Ollama as `all-minilm`; the first
search refuses a width mismatch by name.

Customer, stores and catalogue are read concurrently under a 5 s cap; a
slow model degrades to a text answer. Vectors and ranked hits are cached
in Redis and in-process; live stock never is. Availability uses the same
rules as the customer catalogue (approve, publishedat, ledger balance,
outlet price else retail). No stock reservation: confirm re-reads.

scratch/cataloguedims reports the catalogue's embedding width and fill.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 17:04:34 +05:30
..
2026-09-03 11:21:12 +05:30
2026-09-03 11:21:12 +05:30
2026-08-31 15:51:36 +05:30
2026-08-31 15:51:36 +05:30
2026-08-29 16:45:47 +05:30
2026-08-31 12:33:10 +05:30
2026-08-31 14:59:48 +05:30
2026-05-25 11:52:26 +05:30
2026-05-25 11:52:26 +05:30
2026-09-01 13:53:22 +05:30
2026-09-01 13:17:52 +05:30
2026-07-30 17:25:09 +05:30
2026-09-01 12:01:43 +05:30
2026-09-01 12:01:43 +05:30
2026-09-09 15:44:27 +05:30
2026-09-07 17:53:35 +05:30
2026-09-03 16:23:29 +05:30
2026-09-03 16:23:29 +05:30
2026-09-01 12:01:43 +05:30
2026-09-01 12:01:43 +05:30
2026-09-08 19:21:23 +05:30
2026-09-08 19:21:23 +05:30
2026-09-09 15:44:27 +05:30