#!/bin/bash # VR180 Converter Startup Script echo "🚀 Starting VR180 Converter..." # Check if Python is installed if ! command -v python3 &> /dev/null; then echo "❌ Python 3 is not installed. Please install Python 3.9+ and try again." exit 1 fi # Check if Node.js is installed if ! command -v node &> /dev/null; then echo "❌ Node.js is not installed. Please install Node.js 16+ and try again." exit 1 fi # Check if FFmpeg is installed if ! command -v ffmpeg &> /dev/null; then echo "⚠️ FFmpeg is not installed. Video processing may not work properly." echo " Please install FFmpeg: https://ffmpeg.org/download.html" fi # Create necessary directories echo "📁 Creating directories..." mkdir -p backend/uploads backend/outputs # Install Python dependencies echo "🐍 Installing Python dependencies..." cd backend pip install -r requirements.txt if [ $? -ne 0 ]; then echo "❌ Failed to install Python dependencies" exit 1 fi cd .. # Install Node.js dependencies echo "📦 Installing Node.js dependencies..." cd frontend npm install if [ $? -ne 0 ]; then echo "❌ Failed to install Node.js dependencies" exit 1 fi cd .. # Build React app echo "🔨 Building React app..." cd frontend npm run build if [ $? -ne 0 ]; then echo "❌ Failed to build React app" exit 1 fi cd .. echo "✅ Setup complete!" echo "" echo "🎯 To start the application:" echo " Backend: cd backend && python app.py" echo " Frontend: cd frontend && npm start" echo "" echo "🌐 Access the application at:" echo " Frontend: http://localhost:3000" echo " Backend: http://localhost:5000" echo "" echo "📖 For more information, see docs/README.md"