#!/bin/bash
echo "=== SNEAKERS PAGE - ALL PRODUCT SLUGS ==="
curl -s http://localhost:3001/sneakers | grep -oP 'href="/sneakers/[^"]+"' | sort -u

echo "=== HOMEPAGE - ALL PRODUCT SLUGS ==="
curl -s http://localhost:3001/ | grep -oP 'href="/sneakers/[^"]+"' | sort -u

echo "=== PRODUCT COUNT FROM DB ==="
echo "SELECT COUNT(DISTINCT p.id) FROM products p JOIN product_offers po ON po.product_id = p.id AND po.in_stock = true WHERE p.image_url IS NOT NULL AND p.image_url != '';" | docker exec -i supabase-db psql -U postgres -d sneakerpicks -t

echo "=== SAMPLE REAL SLUGS FROM DB ==="
echo "SELECT slug FROM products p JOIN product_offers po ON po.product_id = p.id AND po.in_stock = true WHERE p.image_url IS NOT NULL GROUP BY p.slug ORDER BY COUNT(po.id) DESC LIMIT 5;" | docker exec -i supabase-db psql -U postgres -d sneakerpicks -t
