#!/bin/bash
# Cleanup script to remove local development setup

echo "🧹 Cleaning up local development environment..."

# Remove node_modules (this is the biggest folder)
if [ -d "node_modules" ]; then
    echo "Removing node_modules..."
    rm -rf node_modules
fi

# Remove Next.js build cache
if [ -d ".next" ]; then
    echo "Removing .next build cache..."
    rm -rf .next
fi

# Remove package-lock.json (can be regenerated)
if [ -f "package-lock.json" ]; then
    echo "Removing package-lock.json..."
    rm package-lock.json
fi

# Optional: Remove Node.js itself (uncomment if you want to remove Node.js entirely)
# echo "To remove Node.js completely, run:"
# echo "sudo apt remove nodejs npm -y"
# echo "sudo apt autoremove -y"

echo "✅ Cleanup complete!"
echo "💡 To remove Node.js entirely, run: sudo apt remove nodejs npm -y"
echo "🌐 Note: The app was configured to run on port 9000 (same as Docker)"
