@echo off
title BidPartner - AI Bid Assistant

echo.
echo  ============================================
echo   BidPartner - AI Bid Writing Tool
echo  ============================================
echo.

cd /d "%~dp0"

python --version >nul 2>&1
if %errorlevel% neq 0 (
    echo  [ERROR] Python not found. Please install Python 3.9+
    pause
    exit /b 1
)

if not exist "%~dp0.deps_installed" (
    echo  Installing dependencies...
    pip install -r requirements.txt
    if %errorlevel% neq 0 (
        echo  [ERROR] Failed to install dependencies.
        pause
        exit /b 1
    )
    echo.> "%~dp0.deps_installed"
    echo  Dependencies installed successfully.
)

echo  Starting server...
echo  Open browser: http://localhost:5000
echo  Press Ctrl+C to stop
echo.

start "" "http://localhost:5000"
python app.py

pause
