AudioForge / scripts /quick_demo.ps1
OnyxlMunkey's picture
c618549
# ============================================
# AudioForge - Quick Demo Launch
# ============================================
# Fast startup for live demonstrations
# Colors
$ESC = [char]27
$GREEN = "$ESC[32m"
$CYAN = "$ESC[36m"
$MAGENTA = "$ESC[35m"
$YELLOW = "$ESC[33m"
$RESET = "$ESC[0m"
$BOLD = "$ESC[1m"
Clear-Host
Write-Host ""
Write-Host "${CYAN}${BOLD}╔═══════════════════════════════════════════════════════════════╗${RESET}"
Write-Host "${CYAN}${BOLD}β•‘ β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘ ${MAGENTA}🎡 AUDIOFORGE 🎡${CYAN} β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘ β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘ ${RESET}Open-Source Text-to-Music Generation Platform${CYAN} β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘ β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘ ${GREEN}πŸš€ QUICK DEMO LAUNCHER πŸš€${CYAN} β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘ β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•${RESET}"
Write-Host ""
Write-Host "${CYAN}[1/5]${RESET} Checking Docker..." -NoNewline
try {
docker ps | Out-Null
Write-Host " ${GREEN}βœ“${RESET}"
} catch {
Write-Host " ${RED}βœ—${RESET}"
Write-Host "${RED}Error: Docker is not running. Please start Docker Desktop.${RESET}"
exit 1
}
Write-Host "${CYAN}[2/5]${RESET} Stopping any existing AudioForge containers..." -NoNewline
docker-compose -f docker-compose.dev.yml down 2>$null | Out-Null
Write-Host " ${GREEN}βœ“${RESET}"
Write-Host "${CYAN}[3/5]${RESET} Starting database services..." -NoNewline
docker-compose -f docker-compose.dev.yml up -d postgres redis 2>&1 | Out-Null
Start-Sleep -Seconds 10
Write-Host " ${GREEN}βœ“${RESET}"
Write-Host "${CYAN}[4/5]${RESET} Starting backend API..." -NoNewline
docker-compose -f docker-compose.dev.yml up -d backend 2>&1 | Out-Null
Start-Sleep -Seconds 15
Write-Host " ${GREEN}βœ“${RESET}"
Write-Host "${CYAN}[5/5]${RESET} Starting frontend..." -NoNewline
docker-compose -f docker-compose.dev.yml up -d frontend 2>&1 | Out-Null
Start-Sleep -Seconds 10
Write-Host " ${GREEN}βœ“${RESET}"
Write-Host ""
Write-Host "${GREEN}${BOLD}═══════════════════════════════════════════════════════════════${RESET}"
Write-Host "${GREEN}${BOLD} πŸŽ‰ DEMO IS READY! πŸŽ‰${RESET}"
Write-Host "${GREEN}${BOLD}═══════════════════════════════════════════════════════════════${RESET}"
Write-Host ""
Write-Host "${BOLD}${CYAN}πŸ“± Access Points:${RESET}"
Write-Host " ${BOLD}Frontend:${RESET} ${GREEN}http://localhost:3000${RESET}"
Write-Host " ${BOLD}Backend API:${RESET} ${GREEN}http://localhost:8001${RESET}"
Write-Host " ${BOLD}API Docs:${RESET} ${GREEN}http://localhost:8001/docs${RESET}"
Write-Host ""
Write-Host "${BOLD}${YELLOW}🎯 Demo Script:${RESET}"
Write-Host " 1. Open ${CYAN}http://localhost:3000${RESET}"
Write-Host " 2. Enter prompt: ${GREEN}'Upbeat electronic dance music with heavy bass'${RESET}"
Write-Host " 3. Click ${CYAN}'Generate Music'${RESET}"
Write-Host " 4. Show ${CYAN}API documentation${RESET} at http://localhost:8001/docs"
Write-Host ""
Write-Host "${BOLD}${MAGENTA}πŸ“Š Container Status:${RESET}"
docker-compose -f docker-compose.dev.yml ps
Write-Host ""
Write-Host "${YELLOW}πŸ’‘ Useful Commands:${RESET}"
Write-Host " View logs: ${CYAN}docker-compose -f docker-compose.dev.yml logs -f${RESET}"
Write-Host " Stop demo: ${CYAN}docker-compose -f docker-compose.dev.yml down${RESET}"
Write-Host " Restart: ${CYAN}docker-compose -f docker-compose.dev.yml restart${RESET}"
Write-Host ""