Project goal Build a responsive, interactive web dashboard titled “XYZ Cosmetics – FTZ Analysis & Optimization Studio” that lets logistics, finance, and compliance teams simulate the use of U.S. Foreign Trade Zones versus Bonded Warehouses and standard entry to reduce duty/tariff spend, MPF, demurrage, and compliance overhead for imported beauty and cosmetic goods. Use only synthetic data generated client‑side. No external APIs. Context (embed as static text in an About panel) • FTZs are considered outside the U.S. customs territory for tariff purposes; duties are deferred until merchandise enters U.S. commerce. Weekly entry, direct delivery, inverted tariff opportunities, and scrap/waste relief can create material savings. Goods moved between FTZs under bond avoid duty until entry. If components aren’t admitted as privileged foreign status, the applicable duty can be based on the classification of the finished goods ultimately entered into the U.S. strtrade.com • Choosing FTZ vs. Bonded Warehouse can hinge on whether tariff rates are expected to rise or fall. FTZ can lock duty rate at admission if privileged foreign status is used, which helps when rates increase; Bonded Warehouse can benefit if rates decline since duty is assessed at withdrawal geodis.com, bergenlogistics.com. • FTZs defer or reduce duty and can cut compliance costs and MPF via weekly entry; there are 260+ FTZs in the U.S., typically near ports of entry. Using an FTZ operator/3PL can accelerate adoption chiefexecutive.net, zhftaxlaw.com. Architecture • Single‑page app with left sidebar filters, top navbar controls, and tabbed views: Overview, Inventory & Flows, Duty & Fees, FTZ vs. Alternatives, Optimization Lab, Compliance & Risk, About/Methodology. • Tech stack: HTML/CSS/JS, Plotly/ECharts for charts, Tabulator/ag‑Grid for tables, a simple client‑side state store. Client‑side PDF via print, CSV/PNG exports. • Performance target: 5–10k rows total; optionally use web workers for optimization recomputes. Global filters (left sidebar) Date range: 2023‑01 to 2026‑12 (monthly). Product family: Skincare, Makeup, Fragrance, Haircare, Accessories, Gift Sets. HS chapters/codes (checkbox list): 3304 (beauty/makeup), 3305 (hair), 3307 (perfumes/other), 4202 (cosmetic bags), 3923 (plastic packaging), 7010 (glass containers), 3401 (soaps). Supplier country: France, Italy, Spain, South Korea, Japan, China, Vietnam, Thailand, Mexico, Canada, Germany, UK. Port/Entry point: LAX, JFK, EWR, MIA, SAV, LGB, HOU, ORD, SEA. Channel: DTC e‑commerce, Boutiques, Department Stores, Duty‑Free/Travel Retail. Scenario selector: Standard Entry, FTZ – Baseline, FTZ – Privileged Foreign, FTZ – Inverted Tariff, Bonded Warehouse, Mixed Network, Custom. Currency: USD default; FX toggle (USD, EUR, JPY, KRW) with static rates. Synthetic data generation (run on initialization; keep PRNG seed; add “Regenerate Data”) Create these tables (arrays of objects). Use realistic ranges for a high‑end beauty brand. A) SKUCatalog • Columns: skuId, skuName, family, hsCode, componentDutyPct, finishedDutyPct, unitCOGSUSD, retailPriceUSD, originCountry, shelfLifeDays, hazmatFlag (bool), weightKg, packagingType (glass/plastic/metal/other). • 500–1,200 SKUs; fragrances higher hazmat and packaging weight; luxury glass bottles for skincare/fragrance; accessories include cosmetic bags. B) ComponentsCatalog • Columns: componentId, componentName, hsCode, dutyPct, unitCostUSD, originCountry, leadTimeDays, isFragile (bool). • 300–600 components: pumps/atomizers (plastics/metal), glass bottles (7010), caps, labels, gift boxes, applicators, outer cartons. C) BOM • Columns: skuId, componentId, qtyPerSKU. • Each SKU includes 3–10 components; fragrances rely on glass bottles and atomizers; gift sets combine multiple SKUs. D) InboundShipments (monthly) • Columns: month, shipmentId, skuId or componentId, isFinishedGood (bool), qtyUnits, supplierCountry, port, incoterms (FOB/CIF), freightUSD, insuranceUSD, customsValueUSD, arrivalMode (Air/Ocean), handlingUSD, demurrageUSD. • Include seasonality spikes for Q4 and new launches; higher air for short shelf life or promos. E) InventoryStates (monthly, per location type) • Columns: month, locationType (FTZ, Bonded, DC, 3PL), locationName, skuId, onHandUnits, agingDaysAvg, shrinkPct, cycleCountScore. • If scenario uses FTZ/Bonded, allocate shares of inbound to those locations with dwell time distribution (e.g., 15–60 days). F) OutboundOrders (monthly) • Columns: month, orderId, skuId, channel, region (US/Canada), units, promoDiscountPct, returnRatePct. • Trend: steady growth in DTC, seasonal spikes during holidays, gift sets surge in Q4. G) FeeSchedule • Columns: mpfMinUSD, mpfMaxUSD, mpfRatePct (for ad valorem), harborMaintenancePct (HMF ocean), entryFeeUSD, weeklyEntryEligible (bool), ftzOperatorFeeUSDPerMonth, bondedStorageFeeUSDPerPalletPerMonth, drayageUSDPerMove, complianceOverheadUSDPerEntry. • Provide typical synthetic values and caps. H) FTZPolicyOptions • Flags and parameters per scenario: privilegedForeignEnabled (bool), invertedTariffEligible (bool), weeklyEntryEnabled (bool), directDeliveryEnabled (bool), scrapReliefPct, wasteRatePct, zoneTransferEnabled (bool), classificationAtFinishedIfNotPrivileged (bool). • Add “AnticipatedTariffChange” vector per HS code with monthly deltas (−5pp to +5pp) to simulate rising/falling duties. I) RiskEvents • Columns: month, type (quota, policyChange, portCongestion, carrierStrike), hsCode, expectedImpactDaysDelay, expectedCostUSD, probabilityPct. • Used for Monte Carlo stress tests in Optimization Lab. Core calculations Customs Value and Duty Basis customsValue = item customsValueUSD + freightUSD + insuranceUSD as applicable to valuation. Duty rate selection depends on scenario and status: • Standard Entry: duty = customsValue × dutyPct based on imported item’s HS (finished or component). • FTZ – Baseline: duty deferred until entry to U.S. commerce; allow weekly entry to aggregate MPF; no change in rate selection unless inverted tariff logic applies. • FTZ – Privileged Foreign (PF): lock duty rate and classification at admission; future rate changes won’t apply to admitted goods geodis.com, bergenlogistics.com. • FTZ – Inverted Tariff: if components (higher duty) are admitted non‑privileged and finished SKU has a lower finishedDutyPct than componentDutyPct, allow duty on finished goods classification at time of entry (simulate inverted tariff savings) strtrade.com. • Bonded Warehouse: duty assessed at withdrawal; if rates decline, benefit; if rates rise, pay higher rate at withdrawal geodis.com, bergenlogistics.com. MPF/HMF and Entry Processing • Compute MPF ad valorem subject to min/max per entry. • Weekly entry (FTZ) reduces number of entries to roughly one per week per port; apply MPF caps accordingly strtrade.com. • HMF applies to ocean shipments on customs value. • Entry fees and compliance overhead per entry; FTZ direct delivery can reduce some handling/clearance costs. Storage and Handling • FTZ operator monthly fee and per‑pallet storage; bonded storage fee per pallet per month; demurrage/wharfage reductions if direct delivery is enabled. • Dwell time from InventoryStates drives months‑in‑storage × storage rate. Scrap/Waste Relief • For FTZ scenarios, model no duty on foreign‑status components that become scrap/waste within the FTZ (apply wasteRatePct × customsValue × dutyPct × scrapReliefPct) strtrade.com. Inverted Tariff Decision Implement chooseDutyBasis(shipment, scenario, PF, invertedEligible, finishedDutyPct, componentDutyPct): • If PF enabled: duty basis locked at admission classification. • Else if invertedEligible and shipment is components assembled in FTZ into a finished SKU with lower finishedDutyPct, select finished duty basis. • Else: standard duty on the imported item’s HS. Rate volatility • Apply AnticipatedTariffChange by month per HS to simulate rising/falling rate paths. • For Bonded Warehouse, duty uses the rate at withdrawal month; for FTZ PF, use locked rate at admission; for FTZ non‑PF, use rate at entry to commerce. Total landed cost per SKU landedCostPerUnit = COGS + allocated freight/insurance/handling + duty + MPF/HMF + storage + compliance overhead − scrap relief. Margin impact Gross margin per unit = retailPrice − discounts − returns impact − landedCostPerUnit. Demand elasticity optional slider per channel to simulate price changes affecting units. UI layout and visuals Top navbar • Title + Scenario dropdown + “Run Scenario” + “Reset” + “Regenerate Data” + currency selector. Overview tab • KPI tiles: Total duty paid YTD, MPF/HMF fees YTD, Avg landed cost/unit, Gross margin %, Inventory dwell (days), Savings vs. Standard Entry, % volume using FTZ/Bonded. • Chart: Stacked bar – Duty and fees by HS code and port. • Chart: Line – Monthly duty/fees under chosen scenario vs. Standard Entry. • Treemap: Cost composition (duty, MPF, HMF, storage, handling, compliance). • Table: Top 25 SKUs by potential FTZ savings with columns: hsCode, dutyBasisChosen, invertedSavingsUSD, PFLocked (Y/N), dwellDays, storageCostUSD, landedCostDeltaUSD. Inventory & Flows tab • Sankey: Supplier country → Port → FTZ/Bonded/DC → Channel volumes. • Heatmap: Inventory dwell by location and month; filter by HS or family. • Table: Inbound shipments with valuation, admission status (PF/non‑PF), chosen duty basis, and expected entry week. Duty & Fees tab • Chart: Waterfall – Standard Entry cost → FTZ savings (weekly entry) → inverted tariff savings → scrap/waste relief → storage/operator cost → net savings. • Table: Entry aggregation simulation showing entries/week/port and MPF/HMF totals under scenarios. • Scatter: Shipment value vs. MPF/HMF paid, color by scenario. FTZ vs. Alternatives tab • Comparator panel: Standard Entry, FTZ – PF, FTZ – Inverted, Bonded Warehouse, Mixed Network. • Small multiples: total duty, MPF/HMF, storage/ops, landed cost, margin %. • Decision matrix table with key levers: anticipated tariff direction, dwell, product type (finished vs. component), fragility/hazmat, inverted opportunity flag. Optimization Lab tab • Controls: FTZ adoption rate slider (% of eligible volume). PF adoption rate slider (% of FTZ volume admitted as privileged foreign). Inverted tariff eligibility toggle and rule editor (which HS pairs qualify). Weekly entry on/off; entries per week cap; direct delivery on/off. Mixed Network routing shares: % to FTZ, % to Bonded, % to direct DC. Anticipated tariff change paths by HS (draw sliders −5 to +5 pp). Storage fees, operator fees, compliance overhead, demurrage sensitivity. Dwell days distribution overrides by product family. • Outputs: Optimization suggestion card: “Recommended mix: FTZ X%, Bonded Y%, Direct Z%” that maximizes net savings given constraints. Tornado chart: sensitivity of net savings to key levers (rates, dwell, PF, weekly entry). Monte Carlo: sample RiskEvents; show distribution of net savings and 5th/50th/95th percentiles. Table: SKU‑level playbook (admit PF? route to FTZ/Bonded? use inverted basis?). Compliance & Risk tab • Checklist table: recordkeeping, zone status reporting, reconciliations, weekly entry filings, FTZ Board production authority when classification shifts at 6‑digit or substantial transformation occurs strtrade.com. • Risk map: disruptions by port and event type; overlay policy change scenarios. • KPI: Audit readiness score, data quality (cycle count, shrink), and exception alerts (rate anomalies, misclassification risk). Interactivity and UX • All charts respond to global filters; brushing filters other components. • Right‑click “Trace to Flow” to see how a SKU’s shipment moved through FTZ/Bonded/DC and which duty basis applied. • Tooltips include the duty basis rationale (PF lock, inverted tariff, standard) with the exact formula and rates used. • “What changed?” diff after running a scenario lists top savings drivers: weekly entry MPF reduction, inverted tariff, storage deltas. Computational functions (pure, testable) • computeDuty(item, scenario, ratePath, isPF, isComponent, finishedDutyPct, componentDutyPct, admissionMonth, withdrawalMonth, entryMonth) → {basis, appliedRate, dutyUSD}. • computeEntryFees(manifest, scenario, weeklyEntryEnabled, feeSchedule) → {entries, mpfUSD, hmfUSD, entryFeesUSD, complianceUSD}. • computeStorage(location, dwellDays, pallets, fees, directDelivery) → storageUSD. • computeLandedCostPerUnit(sku) → value. • aggregateSavings(vsStandard) → totals by HS, port, family. Data privacy and legal • All data is fully synthetic. Display footer note: “Demonstration only. FTZ/Bonded mechanics summarized from public resources: strtrade.com, geodis.com, bergenlogistics.com, chiefexecutive.net, zhftaxlaw.com.” Accessibility and responsiveness • WCAG AA contrast, keyboard nav, ARIA labels. • Responsive layout for desktop/tablet; collapsible sidebar. Exports and validation • Export any table to CSV; export charts to PNG; “Download Report (PDF)” with Overview KPIs, comparator charts, and scenario settings. • “Validate Calculations” modal: sample 5 shipments and 3 SKUs; show step‑by‑step duty basis choice, rates by month, MPF/HMF calc, storage calc; reconcile to dashboard totals. • Deterministic seed entry to reproduce runs. Sample synthetic parameter guidance • Finished duty ranges: many cosmetics 0–6.5% for finished goods (use synthetic rates); components like bottles/pumps 2–8%; accessories up to 17% (e.g., certain 4202). • Air vs. ocean: fragrances more air; gift sets bulk ocean. • Dwell: 15–60 days typical; Q4 spikes. • Retail price ranges: $25–$180 per SKU; COGS 15–35% of retail for high‑end cosmetics. • MPF min/max: set realistic synthetic caps; weekly entry reduces count from dozens/hundreds to ~4 per month per port. • FTZ operator fee: flat monthly + per‑pallet; bonded storage higher per pallet but no operator fee. Acceptance criteria All tabs render with linked filters and metrics. Duty basis logic correctly reflects PF lock, inverted tariff eligibility, and weekly entry MPF aggregation. Comparator clearly quantifies FTZ vs. Bonded vs. Standard Entry net savings. Optimization Lab outputs a recommended network mix and shows sensitivity and Monte Carlo ranges. Exports and “Validate Calculations” work. App runs offline with no external data calls. - Follow Up Deployment
abf2872
verified