104 lines
3.2 KiB
Bash
Executable File
104 lines
3.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Lumina Search Implementation Verification Script
|
|
# This script verifies that all search features are properly implemented
|
|
|
|
echo "๐ Lumina Search Implementation Verification"
|
|
echo "=============================================="
|
|
echo ""
|
|
|
|
# Colors
|
|
GREEN='\033[0;32m'
|
|
RED='\033[0;31m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
# Check if API is running
|
|
echo "1. Checking if API server is running..."
|
|
if curl -s http://localhost:3000/ > /dev/null; then
|
|
echo -e "${GREEN}โ${NC} API server is running"
|
|
else
|
|
echo -e "${RED}โ${NC} API server is not running. Start it with: cd api && npm start"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
|
|
# Check unified search endpoint
|
|
echo "2. Testing unified search endpoint..."
|
|
SEARCH_RESPONSE=$(curl -s "http://localhost:3000/explorer/public/search/unified?q=XLM")
|
|
if echo "$SEARCH_RESPONSE" | grep -q "records"; then
|
|
echo -e "${GREEN}โ${NC} Unified search endpoint working"
|
|
else
|
|
echo -e "${RED}โ${NC} Unified search endpoint failed"
|
|
fi
|
|
|
|
echo ""
|
|
|
|
# Check Soroban RPC connector
|
|
echo "3. Checking Soroban RPC connector..."
|
|
if [ -f "api/connectors/soroban-rpc.js" ]; then
|
|
echo -e "${GREEN}โ${NC} Soroban RPC connector exists"
|
|
else
|
|
echo -e "${RED}โ${NC} Soroban RPC connector missing"
|
|
fi
|
|
|
|
echo ""
|
|
|
|
# Check asset details endpoint
|
|
echo "4. Testing asset details endpoint..."
|
|
ASSET_RESPONSE=$(curl -s "http://localhost:3000/explorer/public/asset/XLM/details")
|
|
if echo "$ASSET_RESPONSE" | grep -q "asset"; then
|
|
echo -e "${GREEN}โ${NC} Asset details endpoint working"
|
|
else
|
|
echo -e "${RED}โ${NC} Asset details endpoint failed"
|
|
fi
|
|
|
|
echo ""
|
|
|
|
# Check latest transactions endpoint
|
|
echo "5. Testing latest transactions endpoint..."
|
|
TX_RESPONSE=$(curl -s "http://localhost:3000/explorer/public/transactions/latest?limit=5")
|
|
if echo "$TX_RESPONSE" | grep -q "records"; then
|
|
echo -e "${GREEN}โ${NC} Latest transactions endpoint working"
|
|
else
|
|
echo -e "${RED}โ${NC} Latest transactions endpoint failed"
|
|
fi
|
|
|
|
echo ""
|
|
|
|
# Check frontend components
|
|
echo "6. Checking frontend components..."
|
|
if [ -f "ui/views/components/global-search-bar.js" ]; then
|
|
echo -e "${GREEN}โ${NC} Global search bar component exists"
|
|
else
|
|
echo -e "${YELLOW}โ ${NC} Global search bar component missing"
|
|
fi
|
|
|
|
if [ -f "ui/views/components/latest-transactions-feed.js" ]; then
|
|
echo -e "${GREEN}โ${NC} Latest transactions feed component exists"
|
|
else
|
|
echo -e "${YELLOW}โ ${NC} Latest transactions feed component missing"
|
|
fi
|
|
|
|
echo ""
|
|
|
|
# Summary
|
|
echo "=============================================="
|
|
echo "Verification Complete!"
|
|
echo ""
|
|
echo "๐ Implementation Summary:"
|
|
echo " โข Unified search with Soroban support"
|
|
echo " โข Asset details page (Solscan-like)"
|
|
echo " โข Latest transactions feed with SSE"
|
|
echo " โข AI-powered search suggestions"
|
|
echo ""
|
|
echo "๐ Documentation: See SEARCH_IMPLEMENTATION.md"
|
|
echo ""
|
|
echo "๐ Next Steps:"
|
|
echo " 1. Test search: http://localhost:3000/explorer/public/search/unified?q=XLM"
|
|
echo " 2. Test assets: http://localhost:3000/explorer/public/asset/XLM/details"
|
|
echo " 3. Test stream: http://localhost:3000/explorer/public/transactions/latest"
|
|
echo ""
|
|
echo "๐ Your Lumina Explorer now has Solscan-like features!"
|