$ErrorActionPreference = "Stop" $Root = Split-Path -Parent $MyInvocation.MyCommand.Path $LogDir = Join-Path $Root "logs" New-Item -ItemType Directory -Force -Path $LogDir | Out-Null $BackendOut = Join-Path $LogDir "backend.out.log" $BackendErr = Join-Path $LogDir "backend.err.log" $FrontendOut = Join-Path $LogDir "frontend.out.log" $FrontendErr = Join-Path $LogDir "frontend.err.log" $Backend = Start-Process ` -FilePath "python" ` -ArgumentList "scripts/run_api.py" ` -WorkingDirectory (Join-Path $Root "backend") ` -RedirectStandardOutput $BackendOut ` -RedirectStandardError $BackendErr ` -PassThru $Frontend = Start-Process ` -FilePath "npm.cmd" ` -ArgumentList "run", "dev", "--", "--host", "127.0.0.1", "--port", "5173" ` -WorkingDirectory (Join-Path $Root "frontend") ` -RedirectStandardOutput $FrontendOut ` -RedirectStandardError $FrontendErr ` -PassThru Write-Host "Backend PID: $($Backend.Id)" Write-Host "Frontend PID: $($Frontend.Id)" Write-Host "Frontend URL: http://127.0.0.1:5173/" Write-Host "Backend URL: http://127.0.0.1:8000/" Write-Host "Logs: $LogDir"