@echo off
:: Start offer dev environment (activate venv first)
::   Backend : http://127.0.0.1:8000
::   Frontend: http://localhost:5173

set "ROOT=%~dp0"
set "BACKEND=%ROOT%offer_backend"
set "FRONTEND=%ROOT%offer_frontend"
set "VENV_ACTIVATE=%BACKEND%\.venv\Scripts\activate.bat"

echo [*] Starting backend (Django :8000) ...
start "offer-backend" /D "%BACKEND%" cmd /k call "%VENV_ACTIVATE%" ^&^& python manage.py runserver 0.0.0.0:8000

echo [*] Starting frontend (Vite :5173) ...
start "offer-frontend" /D "%FRONTEND%" cmd /k npm run dev

echo.
echo === Started ===
echo Backend : http://127.0.0.1:8000
echo Frontend: http://localhost:5173
echo.
pause
