Darak / start.bat
Antigravity AI
Update full system to Hugging Face
771f178
Raw
History Blame Contribute Delete
2.17 kB
@echo off
title Darak AI Platform
echo ======================================
echo Starting Darak AI Platform...
echo ======================================
cd /d "%~dp0"
:: Check Python
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python not found. Install from https://python.org
pause
exit /b 1
)
:: 1. Create Virtual Environment
if not exist "venv\" (
echo [*] Creating Python Virtual Environment...
python -m venv venv
)
echo [*] Activating Virtual Environment...
call venv\Scripts\activate.bat
echo [*] Upgrading pip...
python -m pip install --upgrade pip setuptools wheel --quiet
:: 2. Install Backend Dependencies
echo [*] Installing Backend Dependencies...
pip install -r backend\requirements.txt --quiet
:: 3. Start Backend API on port 8000
echo [*] Starting AI Backend on port 8000...
cd backend
start "Darak Backend API" cmd /c "uvicorn main:app --reload --host 0.0.0.0 --port 8000"
cd ..
:: 4. Start Frontend Dev Server on port 8765
echo [*] Starting Frontend Server on port 8765...
cd front
start "Darak Frontend Server" cmd /c "python -m http.server 8765"
cd ..
:: 5. Start Aggregator Service on port 9000 (optional)
if exist "aggregator_service\node_modules" (
echo [*] Starting Aggregator Service on port 9000...
cd aggregator_service
set PORT=9000
start "Darak Aggregator" cmd /c "node src/server.js"
cd ..
) else (
echo [!] Aggregator node_modules not found. Run: cd aggregator_service ^&^& npm install
)
echo ======================================
echo Darak AI Platform is LIVE!
echo.
echo Frontend: http://localhost:8765
echo Backend API: http://localhost:8000
echo API Docs: http://localhost:8000/docs
echo Aggregator: http://localhost:9000
echo ======================================
echo.
echo Opening browser...
timeout /t 2 /nobreak >nul
start http://localhost:8765
echo Press any key to stop all servers...
pause >nul
echo Stopping all servers...
taskkill /fi "WindowTitle eq Darak Backend (8765)*" /f >nul 2>&1
taskkill /fi "WindowTitle eq Darak Frontend (3333)*" /f >nul 2>&1
taskkill /fi "WindowTitle eq Darak Aggregator (9000)*" /f >nul 2>&1
echo Done.