#!/bin/bash
#
# Voice Demo Bots - Railway Deployment Status
#
# ⚠️  IMPORTANT: Voice Agent and Screenshare Bot run on RAILWAY in production.
#
# This script is DEPRECATED for starting local bots. The bots are deployed on Railway at:
#   - Railway Project: slide-system-production
#   - URL: https://slide-system-production-5813.up.railway.app
#
# The Railway deployment automatically handles:
#   ✅ Voice Agent (LiveKit worker) - always running
#   ✅ Screenshare Bot - started per session via API
#   ✅ Slide System API/Frontend
#   ✅ Database migrations
#
# For local development testing of the FRONTEND ONLY:
#   1. Frontend connects to Railway backend: https://slide-system-production-5813.up.railway.app
#   2. Railway backend automatically creates LiveKit sessions
#   3. Railway agents (voice + screenshare) handle the sessions
#
# To check Railway deployment status:
#   railway status
#   railway logs --tail 100
#
# To test voice demo locally:
#   1. Start frontend: pnpm nx dev voice-demo-ui
#   2. Open http://localhost:3006
#   3. Frontend will connect to Railway backend automatically
#
# For LOCAL bot testing (advanced - usually not needed):
#   See: /Users/lars/mycode/buzztrail/epic-voice-slide-show-livekit/apps/voice-agent-livekit/README.md
#   See: /Users/lars/mycode/buzztrail/extension/apps/slide-system/bots/screenshare-bot/scripts/test_livekit.sh
#

set -e

# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

echo -e "${BLUE}=========================================${NC}"
echo -e "${BLUE}  Voice Demo - Railway Deployment${NC}"
echo -e "${BLUE}=========================================${NC}"
echo ""
echo -e "${GREEN}ℹ️  Bots run on Railway, NOT locally${NC}"
echo ""
echo "Railway Deployment:"
echo "  Project: slide-system-production"
echo "  URL: https://slide-system-production-5813.up.railway.app"
echo ""
echo "What's deployed:"
echo "  ${GREEN}✅${NC} Voice Agent (LiveKit worker)"
echo "  ${GREEN}✅${NC} Screenshare Bot (per-session)"
echo "  ${GREEN}✅${NC} Slide System API/Frontend"
echo "  ${GREEN}✅${NC} Database & Migrations"
echo ""
echo -e "${YELLOW}For local frontend development:${NC}"
echo "  1. Start frontend: pnpm nx dev voice-demo-ui"
echo "  2. Open: http://localhost:3006"
echo "  3. Frontend connects to Railway backend automatically"
echo ""
echo -e "${BLUE}Check Railway Status:${NC}"
echo "  railway status"
echo "  railway logs --tail 100"
echo ""
echo -e "${BLUE}For LOCAL bot testing (advanced):${NC}"
echo "  Voice Agent: /Users/lars/mycode/buzztrail/epic-voice-slide-show-livekit/apps/voice-agent-livekit/"
echo "  Test Script: apps/slide-system/bots/screenshare-bot/scripts/test_livekit.sh"
echo ""
