@echo off
setlocal
cd /d "%~dp0"
echo.
echo ========================================
echo   Starting Nexora Esports Website
echo ========================================
echo.

if not exist ".venv\Scripts\activate.bat" (
  echo Virtual environment not found. Running setup first...
  call setup.bat
)

call ".venv\Scripts\activate.bat"
python -c "from app import init_db; init_db()"

echo.
echo Website URL: http://127.0.0.1:5000
echo Mobile/LAN:  http://YOUR-LAPTOP-IP:5000
echo Admin URL:   http://127.0.0.1:5000/admin
echo.
echo Tip: Find your laptop IP with: ipconfig
echo.
python app.py
pause
