@echo off echo =============================================== echo GSPro Remote - Starting Development Servers echo =============================================== echo. REM Check if Python is installed python --version >nul 2>&1 if %errorlevel% neq 0 ( echo ERROR: Python is not installed or not in PATH echo Please install Python 3.11+ from https://www.python.org/ pause exit /b 1 ) REM Check if Node.js is installed node --version >nul 2>&1 if %errorlevel% neq 0 ( echo ERROR: Node.js is not installed or not in PATH echo Please install Node.js 20+ from https://nodejs.org/ pause exit /b 1 ) REM Get the directory where this script is located set SCRIPT_DIR=%~dp0 set PROJECT_ROOT=%SCRIPT_DIR% set BACKEND_DIR=%PROJECT_ROOT%backend set FRONTEND_DIR=%PROJECT_ROOT%frontend echo Project Root: %PROJECT_ROOT% echo. REM Check if backend virtual environment exists if not exist "%BACKEND_DIR%\.venv" ( echo Creating Python virtual environment... cd /d "%BACKEND_DIR%" python -m venv .venv ) REM Install backend dependencies echo Checking backend dependencies... cd /d "%BACKEND_DIR%" call .venv\Scripts\activate.bat pip show fastapi >nul 2>&1 if %errorlevel% neq 0 ( echo Installing backend dependencies... pip install -e . ) REM Check if frontend node_modules exists if not exist "%FRONTEND_DIR%\node_modules" ( echo Installing frontend dependencies... cd /d "%FRONTEND_DIR%" npm install ) echo. echo =============================================== echo Starting Backend Server on port 5005... echo =============================================== cd /d "%BACKEND_DIR%" start "GSPro Remote Backend" cmd /k ".venv\Scripts\activate.bat && python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 5005" REM Wait a moment for backend to start timeout /t 3 /nobreak >nul echo. echo =============================================== echo Starting Frontend Server on port 5173... echo =============================================== cd /d "%FRONTEND_DIR%" start "GSPro Remote Frontend" cmd /k "npm run dev -- --host" REM Wait for servers to initialize timeout /t 3 /nobreak >nul echo. echo =============================================== echo Servers are starting up... echo =============================================== echo. echo Access the application at: echo Local: http://localhost:5173 echo Network: http://YOUR-IP:5173 echo Backend API: http://localhost:5005 echo API Docs: http://localhost:5005/api/docs echo. echo To find your IP address, run: ipconfig echo. echo Both servers are running in separate windows. echo Close those windows to stop the servers. echo. pause