# Experiments Directory This directory contains archived debug and experimental scripts used during development. ## Structure ### `magnit-detail-endpoints/` Scripts used to discover and test Magnit API endpoints for product details: - `debug-detail-response.ts` - Debug API response structure and field parsing - `test-detail-endpoint.ts` - Test specific detail endpoints using MagnitApiScraper - `test-all-detail-endpoints.ts` - Test multiple endpoints for product details - `test-object-reviews-endpoint.ts` - Test user-reviews-and-object-info endpoint - `find-product-detail-api.ts` - Find correct API endpoints for product details - `find-product-detail-endpoint-v1.ts` - Find v1 API endpoints for product details **Purpose**: These scripts were used to reverse-engineer the Magnit product detail API during the enrichment feature development. ### `html-extraction/` Scripts for web scraping fallback exploration: - `extract-product-from-html.ts` - Extract product data from HTML for future Playwright-based web scraping **Purpose**: Experimental code for planned web scraping functionality (Phase 5). ## Usage These scripts are **not production code** and are kept for reference. They may: - Use DOM APIs (`document`, `window`) that require browser context - Have hard-coded test data - Be one-off experiments that are no longer maintained To run these scripts, you may need to adjust `tsconfig.json` to include DOM types: ```json { "compilerOptions": { "lib": ["ES2023", "dom"] } } ``` ## Status Archived - No longer actively maintained. Kept for historical reference and potential future use.