Cross-Platform PC Builder & Hardware Compatibility Engine API (Android, iOS, Windows, macOS, Linux, Web)

# Cross-Platform PC Builder & Hardware Compatibility Engine API A complete, production-ready guide for mobile application developers (Android, iOS, Flutter, React Native, Windows, macOS, Linux) to implement Pixahunt's **Interactive PC Builder & Smart Hardware Compatibility Engine**. --- ### Canonical Web Routes - **Primary Canonical Web Route:** `https://pixahunt.com/gadget/pc-builder` - **Legacy Redirect:** `https://pixahunt.com/gadget/pc-builder` (HTTP 301 Permanent Redirect) --- ### Core Architecture & Compatibility Matrix Pixahunt's PC Builder Engine features dynamic cross-component compatibility checking: 1. **CPU & Motherboard Socket Matching:** LGA1700, AM5, AM4, LGA1200, LGA1851 2. **Memory Standard Compatibility:** DDR4 vs DDR5 RAM matching against motherboard specifications 3. **Power Headroom & Electrical Load:** Automatic summation of CPU TDP, GPU TDP, and ancillary load with +30% safety headroom 4. **Bi-Directional Contextual Recommendation:** Selecting a CPU dynamically marks matching motherboards as "Recommended / Compatible", and vice versa. --- ### Base API Configuration - **Base Endpoint:** `https://pixahunt.com/api/apps/v1/pc-builder` - **Standard Alias:** `https://pixahunt.com/api/apps/v1/gadget/pc-builder` - **Authentication Header:** ```http X-App-Key: {MASTER_APP_API_KEY} Accept: application/json Content-Type: application/json ``` --- ### 1. Fetch Customizable Component Slots Returns all 12 configurable hardware slots with icons, category IDs, and requirements. - **Endpoint:** `GET /slots` - **Response:** ```json { "status": "success", "data": [ {"key": "processor", "title": "Processor (CPU)", "category_id": 7, "required": true}, {"key": "cpu_cooler", "title": "CPU Cooler", "category_id": 13, "required": false}, {"key": "motherboard", "title": "Motherboard", "category_id": 9, "required": true}, {"key": "ram_1", "title": "Memory 1 (RAM)", "category_id": 10, "required": true}, {"key": "ram_2", "title": "Memory 2 (RAM Dual Channel)", "category_id": 10, "required": false}, {"key": "storage_1", "title": "Storage 1 (Primary SSD)", "category_id": 11, "required": true}, {"key": "storage_2", "title": "Storage 2 (Secondary Drive)", "category_id": 11, "required": false}, {"key": "graphics_card", "title": "Graphics Card (GPU)", "category_id": 8, "required": false}, {"key": "power_supply", "title": "Power Supply (PSU)", "category_id": 12, "required": true}, {"key": "casing", "title": "Casing", "category_id": 14, "required": true}, {"key": "casing_fan", "title": "Casing Fans", "category_id": 15, "required": false}, {"key": "monitor", "title": "Monitor", "category_id": 16, "required": false} ] } ``` --- ### 2. Fetch Components Filtered by Compatibility Dynamically inspects the current build in state and returns components with compatibility tags (`is_compatible: true/false`, `is_recommended: true/false`, `compatibility_note: string`). - **Endpoint:** `GET /components?slot=motherboard&build={encoded_build_json}` - **Response:** ```json { "status": "success", "slot": "motherboard", "count": 48, "data": [ { "id": 890, "name": "MSI MAG B650 TOMAHAWK WIFI", "brand": "MSI", "price": 28500, "price_formatted": "৳ 28,500", "socket": "AM5", "ram_type": "DDR5", "is_compatible": true, "is_recommended": true, "compatibility_note": "Matches AMD Ryzen AM5 socket and DDR5 memory standard", "image": "https://pixahunt.b-cdn.net/products/msi-b650.png" } ] } ``` --- ### 3. Real-Time Server-Side Validation Evaluates all selected hardware components, totals prices, calculates electrical peak wattage, and returns warning flags. - **Endpoint:** `POST /validate` - **Payload:** ```json { "components": { "processor": { "name": "AMD Ryzen 7 7800X3D", "socket": "AM5", "tdp": 120, "price": 46500 }, "motherboard": { "name": "MSI MAG B650 TOMAHAWK WIFI", "socket": "AM5", "ram_type": "DDR5", "price": 28500 }, "graphics_card": { "name": "NVIDIA GeForce RTX 4070 Super", "tdp": 220, "price": 78000 } } } ``` - **Response:** ```json { "status": "success", "validation": { "is_compatible": true, "total_price_bdt": 153000, "total_price_formatted": "৳ 1,53,000", "estimated_wattage": 425, "recommended_psu_wattage": 650, "warnings": [] } } ``` --- ### 4. Save Build to Unified Dataset Stores custom build directly into `gadget_saas_user_pc` (`build_type: pc_builder`). - **Endpoint:** `POST /save` - **Payload:** ```json { "build_title": "Ultimate 1440p Gaming Rig", "components": { ... } } ``` - **Response:** ```json { "status": "success", "uuid": "4c9d921e-128a-49a3-a00e-3fa8b1220491", "share_url": "https://pixahunt.com/gadget/pc-builder?build=4c9d921e-128a-49a3-a00e-3fa8b1220491", "message": "PC build saved successfully!" } ``` --- ### 5. Consult Hardware Support Engineer (AI Technician) - **Endpoint:** `POST /consult` - **Requires Auth:** Bearer Token - **Payload:** ```json { "message": "এই বিল্ডে কি কোনো Bottleneck আছে বা 650W PSU কি যথেষ্ট?", "components": { ... } } ``` - **Response:** ```json { "status": "success", "reply": "আপনার Ryzen 7 7800X3D এবং RTX 4070 Super কনফিগারেশনটি অত্যন্ত ব্যালান্সড...", "engineer": { "name": "আরিফুল ইসলাম", "title": "সিনিয়র হার্ডওয়্যার স্পেশালিস্ট, পিক্সাহান্ট ল্যাব", "shift_name": "মর্নিং শিফট (সকাল ৬:০০ - দুপুর ২:০০)" }, "share_url": "https://pixahunt.com/gadget/pc-builder?build=4c9d921e-128a-49a3-a00e-3fa8b1220491" } ``` --- ### 6. Load Saved Build by UUID - **Endpoint:** `GET /build/{uuid}` - **Response:** Returns the full configuration JSON, component list, power specifications, and pricing.