hemant2747/multi-agent-framework
0
1# Convenience launcher for the dashboard (Windows / PowerShell).2# Starts the FastAPI backend and the Next.js dev server in separate windows.3#4# Usage: ./run_dashboard.ps1 (real models via Ollama)5# ./run_dashboard.ps1 -Hash (offline hash embeddings, no Ollama)6 7param([switch]$Hash)8 9$root = $PSScriptRoot10 11# --- Backend ---12$envCmd = if ($Hash) { '$env:EMBED_BACKEND="hash"; ' } else { '' }13Start-Process powershell -ArgumentList @(14 "-NoExit", "-Command",15 "cd '$root'; $envCmd python -m uvicorn server.main:app --reload --port 8000"16)17 18# --- Frontend ---19$ui = Join-Path $root "ui"20if (-not (Test-Path (Join-Path $ui "node_modules"))) {21 Write-Host "Installing UI dependencies (first run)..." -ForegroundColor Yellow22 Start-Process powershell -ArgumentList @(23 "-NoExit", "-Command",24 "cd '$ui'; if (-not (Test-Path .env.local)) { Copy-Item .env.local.example .env.local }; npm install; npm run dev"25 )26} else {27 Start-Process powershell -ArgumentList @(28 "-NoExit", "-Command", "cd '$ui'; npm run dev"29 )30}31 32Write-Host "Backend -> http://localhost:8000" -ForegroundColor Green33Write-Host "Frontend -> http://localhost:3000" -ForegroundColor Green34 