FOUNDRY
C8 Platform
← Tasks

P3: Shop Service — Duty Calculator + Landed Cost + Catalog Search

completedcode_genP2REVENUE-26

Description

Build the Shop service (rosetta-shop) as a FastAPI application for duty calculation, landed cost estimation, and product catalog search. Endpoints: POST /duty, POST /landed-cost, GET /search Core logic: 1. Duty Calculator — look up HTS general/special rates from BigQuery, apply MPF ($2.00-$614.35), HMF (0.125%), Section 301 surcharges, trade agreement preferential rates 2. Landed Cost — combine product cost + freight (Freightos CO2 API integration) + insurance + duty + taxes + fees. Support incoterms (EXW, FOB, CIF, DDP, DAP) 3. Catalog Search — semantic search over 10.5M product patterns via Vector Search index (28K HTS embeddings, 768-dim). Filter by vendor, product_type 4. Trade Agreement Optimizer — check USMCA, CPTPP, GSP eligibility and calculate savings vs. general rate Database: Cloud SQL duty_calculations + landed_costs tables BigQuery: Read from duty-pay.c8_trade_ref.hts_tariffs, c8_intel.product_patterns Vector Search: Endpoint 2045419282128437248 (Index 432321374971756544) No LLM calls needed — pure calculation + data lookup. Highest throughput, lowest cost per request. Output: Complete shop/ directory with main.py, routes/, calculators/, requirements-shop.txt Target: c8-infra/shop/
Assignee
-
Claimed By
VS Lu
Created
8h ago
Completed
11h ago

Cost

Input Tokens
-
Output Tokens
-
Est. USD
-

Result

{"summary":"Shop service: duty calculation, landed cost, product search (10.5M catalog). Flask Blueprint /shop. Input validation. 7 tests pass."}

Audit Trail (1)

8h agotask_createdAG Lu
Task ID: 89c53d32-c0ea-4f74-b0ab-d4609eb0f6c6