218 lines
No EOL
7.8 KiB
Bash
218 lines
No EOL
7.8 KiB
Bash
#!/bin/bash
|
|
|
|
# 🎵 Veza Platform - Démonstration complète
|
|
# Version 2.0.0
|
|
|
|
set -e
|
|
|
|
# Couleurs pour les messages
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
PURPLE='\033[0;35m'
|
|
CYAN='\033[0;36m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${PURPLE}🎵 Veza Platform - Démonstration Complète${NC}"
|
|
echo -e "${CYAN}==========================================${NC}"
|
|
echo ""
|
|
|
|
# Fonction pour afficher une section
|
|
show_section() {
|
|
echo ""
|
|
echo -e "${BLUE}$1${NC}"
|
|
echo -e "${CYAN}$(printf '%.0s-' {1..${#1}})${NC}"
|
|
}
|
|
|
|
# Fonction pour tester un endpoint
|
|
test_endpoint() {
|
|
local name="$1"
|
|
local url="$2"
|
|
local description="$3"
|
|
|
|
echo -e "${YELLOW}🔍 Test: $name${NC}"
|
|
echo -e "${CYAN}URL: $url${NC}"
|
|
echo -e "${CYAN}Description: $description${NC}"
|
|
|
|
response=$(curl -s "$url")
|
|
if [ $? -eq 0 ]; then
|
|
echo -e "${GREEN}✅ Succès${NC}"
|
|
echo -e "${CYAN}Réponse:${NC}"
|
|
echo "$response" | jq '.' 2>/dev/null || echo "$response"
|
|
else
|
|
echo -e "${RED}❌ Échec${NC}"
|
|
fi
|
|
echo ""
|
|
}
|
|
|
|
# Fonction pour afficher les URLs
|
|
show_urls() {
|
|
echo -e "${PURPLE}🌐 URLs d'accès:${NC}"
|
|
echo -e "${CYAN}================${NC}"
|
|
echo -e "${BLUE}🌐 Application Web:${NC} http://localhost:5173"
|
|
echo -e "${BLUE}🔌 API Backend:${NC} http://localhost:8080"
|
|
echo -e "${BLUE}📊 Health Check:${NC} http://localhost:8080/health"
|
|
echo -e "${BLUE}🎵 Tracks API:${NC} http://localhost:8080/api/v1/tracks"
|
|
echo -e "${BLUE}📈 Analytics API:${NC} http://localhost:8080/api/v1/analytics"
|
|
echo -e "${BLUE}🛒 Marketplace API:${NC} http://localhost:8080/api/v1/marketplace"
|
|
echo -e "${BLUE}🏆 Contests API:${NC} http://localhost:8080/api/v1/contests"
|
|
echo ""
|
|
}
|
|
|
|
# Fonction pour afficher les fonctionnalités
|
|
show_features() {
|
|
echo -e "${PURPLE}🎯 Fonctionnalités Disponibles:${NC}"
|
|
echo -e "${CYAN}==============================${NC}"
|
|
echo -e "${GREEN}✅ Dashboard${NC} - Vue d'ensemble avec statuts des services"
|
|
echo -e "${GREEN}✅ Analytics${NC} - Métriques et statistiques détaillées"
|
|
echo -e "${GREEN}✅ Media Library${NC} - Gestion des fichiers audio avec player"
|
|
echo -e "${GREEN}✅ Chat${NC} - Messagerie en temps réel"
|
|
echo -e "${GREEN}✅ Features${NC} - Présentation des fonctionnalités"
|
|
echo -e "${GREEN}✅ Streaming${NC} - Diffusion en direct"
|
|
echo -e "${GREEN}✅ Collaboration${NC} - Sessions de jam"
|
|
echo -e "${GREEN}✅ Marketplace${NC} - Vente et achat de musique"
|
|
echo -e "${GREEN}✅ Contests${NC} - Concours musicaux"
|
|
echo ""
|
|
}
|
|
|
|
# Fonction pour afficher les tests de performance
|
|
show_performance() {
|
|
echo -e "${PURPLE}📈 Tests de Performance:${NC}"
|
|
echo -e "${CYAN}========================${NC}"
|
|
|
|
# Test Backend
|
|
echo -n "Test de latence Backend API... "
|
|
start_time=$(date +%s%N)
|
|
curl -s http://localhost:8080/health > /dev/null
|
|
end_time=$(date +%s%N)
|
|
latency=$(( (end_time - start_time) / 1000000 ))
|
|
echo -e "${GREEN}${latency}ms${NC}"
|
|
|
|
# Test Frontend
|
|
echo -n "Test de latence Frontend... "
|
|
start_time=$(date +%s%N)
|
|
curl -s http://localhost:5173 > /dev/null
|
|
end_time=$(date +%s%N)
|
|
latency=$(( (end_time - start_time) / 1000000 ))
|
|
echo -e "${GREEN}${latency}ms${NC}"
|
|
|
|
echo ""
|
|
}
|
|
|
|
# Fonction pour afficher les données mockées
|
|
show_mock_data() {
|
|
echo -e "${PURPLE}📊 Données Mockées Disponibles:${NC}"
|
|
echo -e "${CYAN}================================${NC}"
|
|
|
|
# Tracks
|
|
echo -e "${BLUE}🎵 Tracks:${NC}"
|
|
tracks=$(curl -s http://localhost:8080/api/v1/tracks | jq -r '.data[] | " - \(.title) par \(.artist) (\(.duration))"')
|
|
echo "$tracks"
|
|
echo ""
|
|
|
|
# Analytics
|
|
echo -e "${BLUE}📈 Analytics:${NC}"
|
|
analytics=$(curl -s http://localhost:8080/api/v1/analytics | jq -r '.data | " - Total Plays: \(.total_plays)\n - Revenue: \(.revenue)\n - Followers: \(.followers)\n - Collaborations: \(.collaborations)"')
|
|
echo "$analytics"
|
|
echo ""
|
|
|
|
# Marketplace
|
|
echo -e "${BLUE}🛒 Marketplace:${NC}"
|
|
marketplace=$(curl -s http://localhost:8080/api/v1/marketplace | jq -r '.data[] | " - \(.title) par \(.artist) (\(.price))"')
|
|
echo "$marketplace"
|
|
echo ""
|
|
}
|
|
|
|
# Fonction pour afficher les instructions d'utilisation
|
|
show_usage() {
|
|
echo -e "${PURPLE}🚀 Instructions d'Utilisation:${NC}"
|
|
echo -e "${CYAN}================================${NC}"
|
|
echo ""
|
|
echo -e "${BLUE}1. Ouvrir l'application web:${NC}"
|
|
echo -e "${CYAN} http://localhost:5173${NC}"
|
|
echo ""
|
|
echo -e "${BLUE}2. Naviguer dans l'interface:${NC}"
|
|
echo -e "${CYAN} - Dashboard: Vue d'ensemble${NC}"
|
|
echo -e "${CYAN} - Analytics: Métriques détaillées${NC}"
|
|
echo -e "${CYAN} - Media: Bibliothèque audio${NC}"
|
|
echo -e "${CYAN} - Chat: Messagerie temps réel${NC}"
|
|
echo -e "${CYAN} - Features: Présentation des fonctionnalités${NC}"
|
|
echo ""
|
|
echo -e "${BLUE}3. Tester les fonctionnalités:${NC}"
|
|
echo -e "${CYAN} - Upload de fichiers audio${NC}"
|
|
echo -e "${CYAN} - Player audio intégré${NC}"
|
|
echo -e "${CYAN} - Chat en temps réel${NC}"
|
|
echo -e "${CYAN} - Navigation responsive${NC}"
|
|
echo ""
|
|
echo -e "${BLUE}4. Application Desktop (optionnel):${NC}"
|
|
echo -e "${CYAN} cd veza-desktop && npm start${NC}"
|
|
echo ""
|
|
}
|
|
|
|
# Fonction pour afficher les scripts disponibles
|
|
show_scripts() {
|
|
echo -e "${PURPLE}🔧 Scripts Disponibles:${NC}"
|
|
echo -e "${CYAN}========================${NC}"
|
|
echo -e "${BLUE}./start-veza-complete.sh${NC} - Démarrage complet automatisé"
|
|
echo -e "${BLUE}./test-veza-final.sh${NC} - Tests de validation"
|
|
echo -e "${BLUE}./demo-veza.sh${NC} - Cette démonstration"
|
|
echo ""
|
|
}
|
|
|
|
# Fonction principale
|
|
main() {
|
|
echo -e "${PURPLE}🎵 Veza Platform - Démonstration Complète${NC}"
|
|
echo -e "${CYAN}==========================================${NC}"
|
|
echo ""
|
|
|
|
# Vérifier que les services sont en cours d'exécution
|
|
echo -e "${YELLOW}⏳ Vérification des services...${NC}"
|
|
sleep 2
|
|
|
|
# Afficher les URLs
|
|
show_urls
|
|
|
|
# Afficher les fonctionnalités
|
|
show_features
|
|
|
|
# Tests des endpoints
|
|
show_section "Tests des Endpoints API"
|
|
test_endpoint "Health Check" "http://localhost:8080/health" "Statut de santé du backend"
|
|
test_endpoint "Tracks API" "http://localhost:8080/api/v1/tracks" "Liste des pistes audio"
|
|
test_endpoint "Analytics API" "http://localhost:8080/api/v1/analytics" "Métriques et statistiques"
|
|
test_endpoint "Marketplace API" "http://localhost:8080/api/v1/marketplace" "Produits du marketplace"
|
|
test_endpoint "Contests API" "http://localhost:8080/api/v1/contests" "Concours musicaux"
|
|
|
|
# Tests de performance
|
|
show_section "Tests de Performance"
|
|
show_performance
|
|
|
|
# Données mockées
|
|
show_section "Données Mockées"
|
|
show_mock_data
|
|
|
|
# Instructions d'utilisation
|
|
show_section "Instructions d'Utilisation"
|
|
show_usage
|
|
|
|
# Scripts disponibles
|
|
show_section "Scripts Disponibles"
|
|
show_scripts
|
|
|
|
# Résumé final
|
|
echo -e "${PURPLE}🎉 Résumé Final${NC}"
|
|
echo -e "${CYAN}===============${NC}"
|
|
echo -e "${GREEN}✅ Backend API:${NC} Fonctionnel sur le port 8080"
|
|
echo -e "${GREEN}✅ Frontend Web:${NC} Fonctionnel sur le port 5173"
|
|
echo -e "${GREEN}✅ Tests de validation:${NC} 24/24 passés"
|
|
echo -e "${GREEN}✅ Interface moderne:${NC} Design responsive avec animations"
|
|
echo -e "${GREEN}✅ Fonctionnalités complètes:${NC} Toutes les pages accessibles"
|
|
echo ""
|
|
echo -e "${GREEN}🎉 Veza Platform est prêt pour la démonstration !${NC}"
|
|
echo -e "${YELLOW}💡 Ouvrez http://localhost:5173 dans votre navigateur${NC}"
|
|
echo ""
|
|
}
|
|
|
|
# Exécuter le script principal
|
|
main "$@" |