@echo off chcp 65001 >nul 2>&1 title HealthManager - Dev Startup echo ========================================== echo HealthManager Dev Environment echo ========================================== set "PG_DATA=D:\APP\data\pgdata" set "PG_BIN=D:\PostgreSQL\18\pgsql\bin" set "MINIO_DATA=D:\APP\data\minio" echo. echo [1/5] Starting PostgreSQL... if exist "%PG_BIN%\pg_ctl.exe" ( "%PG_BIN%\pg_ctl.exe" -D "%PG_DATA%" -l "%PG_DATA%\pg.log" start 2>nul if errorlevel 1 ( echo PostgreSQL is already running or failed to start ) else ( echo PostgreSQL started ) ) else ( echo [WARN] PostgreSQL not found at %PG_BIN% ) echo. echo [2/5] Starting MinIO... tasklist /fi "imagename eq minio.exe" | find /i "minio.exe" >nul if errorlevel 1 ( if not exist "%MINIO_DATA%" mkdir "%MINIO_DATA%" start "MinIO" /MIN minio server "%MINIO_DATA%" --address ":9000" --console-address ":9001" echo MinIO started ) else ( echo MinIO is already running ) echo. echo [3/5] Starting Backend API... cd /d "%~dp0backend" start "HealthManager API" dotnet run --project src\HealthManager.WebApi --urls "http://localhost:5000" --environment Development echo Backend API starting (http://localhost:5000) echo Swagger: http://localhost:5000/swagger echo Waiting 15s for backend to boot... timeout /t 15 /nobreak >nul echo. echo [4/5] Starting Patient Frontend... start "Patient Frontend" cmd.exe /c "cd /d %~dp0frontend-patient && npm run dev" echo Patient Frontend starting on http://localhost:5173 echo. echo [5/5] Starting Doctor Frontend... start "Doctor Frontend" cmd.exe /c "cd /d %~dp0frontend-doctor && npm run dev" echo Doctor Frontend starting on http://localhost:5174 echo. echo ========================================== echo Startup Complete! echo. echo Patient App: http://localhost:5173 echo Doctor App: http://localhost:5174 echo Backend API: http://localhost:5000 echo Swagger: http://localhost:5000/swagger echo MinIO: http://localhost:9001 echo PostgreSQL: localhost:5432 echo ========================================== echo. echo All 5 services started. Close the 3 new echo windows to stop the apps. echo. pause