Files
supermarket/experiments/README.md
Mc Smog dd4c64c601 refactor: reorganize scripts - move debug code to experiments/
- Move debug/test scripts from src/scripts/ to experiments/
- Remove test-detail-endpoint from package.json
- Delete temp-product-page.html
- Move E2E_GUIDE.md to docs/
- Add experiments/README.md with documentation
- Keep only production scripts in src/scripts/
- Clean up tsconfig.json exclude list (experiments are now outside src/)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 01:55:20 +05:00

43 lines
1.6 KiB
Markdown

# 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.