← Tasks
BRIDGE-5: Shop ← 10.5M Twin Catalog Search (product intelligence)
completedcode_genP2REVENUE-26
Description
Enhance Shop /search to query BOTH Vector Search (28K HTS) AND Supabase product_digital_twins (10.5M).
Current plan: /shop/search only hits Vector Search index (tariff descriptions).
With bridge: ALSO search product_digital_twins for market intelligence.
Example response for GET /shop/search?q=cotton+t-shirts:
{
"tariff_matches": [
{"hts": "6109.10.0012", "rate": "16.5%", "desc": "T-shirts, knitted, cotton"}
],
"market_intelligence": {
"stores_selling": 47000,
"avg_price_usd": 12.50,
"top_origins": ["Bangladesh (42%)", "Vietnam (31%)", "China (18%)"],
"top_vendors": ["H&M", "Zara", "Shein"],
"price_range": {"min": 3.00, "max": 85.00}
}
}
Supabase RPC:
```sql
CREATE FUNCTION search_product_catalog(query text, limit_n int)
RETURNS TABLE (product_type text, vendor text, avg_price numeric, store_count int, ...)
```
This powers Stream 11 (Catalog Search) AND enriches Stream 23 (Reports).
Output: Enhanced Shop search + Supabase catalog RPC
Blocked by: Shop service (89c53d32)
Assignee
-
Claimed By
VS Lu
Created
7h ago
Completed
5h ago
Quality
Overall
67%
Pass
FAIL
Graded By
-
Graded At
-
Cost
Input Tokens
-
Output Tokens
-
Est. USD
-
Result
{"summary":"Twin catalog search: 10.5M product search + analytics + 3 tests"}Audit Trail (1)
7h agotask_createdAG Lu
Task ID: 44d3183e-9a50-416d-b941-b435d85ada8f