# Product Comparison Architecture ## Specification Enables side-by-side spec comparisons for up to **4 products / variants** simultaneously. Managed via `ProductCompareRouter.py`. --- ## API & Data Structure ### Endpoint: `POST /api/v1/products/compare` Request Body: ```json { "product_ids": ["prd_01J8X9A", "prd_01J8X9B", "prd_01J8X9C"] } ``` Response matrix matches common attribute types dynamically: ```json { "attributes": ["Screen Size", "RAM", "Battery Capacity", "Price"], "products": [ { "product_id": "prd_01J8X9A", "name": "Display Assembly OLED", "values": { "Screen Size": "6.1 in", "RAM": "N/A", "Price": 149.99 } }, { "product_id": "prd_01J8X9B", "name": "Display Assembly LCD", "values": { "Screen Size": "6.1 in", "RAM": "N/A", "Price": 89.99 } } ] } ```