← back to Dear Bubbe Nextjs
scripts/verify-expandable-chat.sh
122 lines
#!/bin/bash
echo "======================================"
echo "EXPANDABLE CHAT VERIFICATION"
echo "======================================"
echo ""
# Check if service is running
echo "1. Checking PM2 Service Status..."
pm2_status=$(pm2 list | grep bubbe | grep online)
if [[ ! -z "$pm2_status" ]]; then
echo " ✅ Bubbe service is ONLINE"
else
echo " ❌ Bubbe service is NOT running"
exit 1
fi
echo ""
# Check if app is accessible
echo "2. Checking HTTP Response..."
http_status=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3011)
if [[ "$http_status" == "200" ]]; then
echo " ✅ App is responding (HTTP 200)"
else
echo " ❌ App returned HTTP $http_status"
exit 1
fi
echo ""
# Check for expandable chat component
echo "3. Checking Expandable Chat Component..."
if curl -s http://localhost:3011 | grep -q "expandable-chat-fab"; then
echo " ✅ Expandable chat FAB button found"
else
echo " ❌ Expandable chat FAB not found"
exit 1
fi
echo ""
# Check for required components
echo "4. Checking Required Components..."
components=("ExpandableChat" "VoiceManager" "TextInput" "InputModeSelector")
missing=0
for component in "${components[@]}"; do
if [ -f "/root/Projects/dear-bubbe-nextjs/components/${component}.tsx" ]; then
echo " ✅ $component component exists"
else
echo " ❌ $component component missing"
((missing++))
fi
done
echo ""
# Check API endpoints
echo "5. Checking API Endpoints..."
endpoints=("chat" "bubbe-voice")
for endpoint in "${endpoints[@]}"; do
status=$(curl -s -o /dev/null -w "%{http_code}" -X POST http://localhost:3011/api/$endpoint \
-H "Content-Type: application/json" \
-d '{"message":"test"}')
if [[ "$status" == "200" ]] || [[ "$status" == "401" ]] || [[ "$status" == "400" ]]; then
echo " ✅ /api/$endpoint is responding"
else
echo " ⚠️ /api/$endpoint returned HTTP $status"
fi
done
echo ""
# Check external access
echo "6. Checking External Access..."
external_status=$(curl -s -o /dev/null -w "%{http_code}" http://45.61.58.125:3011)
if [[ "$external_status" == "200" ]]; then
echo " ✅ App is accessible externally"
echo " 🌐 Access URL: http://45.61.58.125:3011"
else
echo " ❌ External access failed (HTTP $external_status)"
fi
echo ""
echo "======================================"
echo "EXPANDABLE CHAT FEATURES"
echo "======================================"
echo ""
echo "✨ IMPLEMENTED FEATURES:"
echo " • Floating Action Button (FAB) - Bottom-right corner"
echo " • Mobile-first responsive design"
echo " • 3 Chat Modes:"
echo " - 🎤 Talk Only (Voice conversation)"
echo " - ⌨️ Text Only (Type messages)"
echo " - 💬 Both (Voice and text)"
echo " • Smooth animations with Framer Motion"
echo " • Full-screen on mobile, modal on desktop"
echo " • Mode selector shown first when opening"
echo " • Google Sign-In integration"
echo " • Bubbe's personality preserved"
echo ""
echo "📱 MOBILE EXPERIENCE:"
echo " • Full-screen chat interface"
echo " • Slide-up animation"
echo " • Touch-optimized controls"
echo " • Safe area handling for notched devices"
echo ""
echo "💻 DESKTOP EXPERIENCE:"
echo " • Modal window (420x600px)"
echo " • Backdrop overlay"
echo " • Positioned bottom-right"
echo " • Click backdrop to close"
echo ""
if [[ $missing -eq 0 ]]; then
echo "======================================"
echo "✅ ALL CHECKS PASSED!"
echo "======================================"
echo ""
echo "🎉 The expandable chat interface is ready!"
echo "🌐 Visit: http://45.61.58.125:3011"
echo "👵 Click the chat button to start talking to Bubbe!"
else
echo "======================================"
echo "⚠️ Some issues detected"
echo "======================================"
fi