This system requires 7 services to run simultaneously:
- 5 Backend microservices (Detect, Segment, Advise, Generate, Commerce)
- 1 Gateway service
- 1 Frontend service
Create this file: artistry-backend/start-all-services.ps1
# Start All Artistry Backend Services
Write-Host "Starting Artistry Backend Services..." -ForegroundColor Green
# Detect Service
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd '$PSScriptRoot\detect'; .\venv\Scripts\Activate.ps1; uvicorn app.main:app --port 8001 --reload"
# Segment Service
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd '$PSScriptRoot\segment'; .\venv\Scripts\Activate.ps1; uvicorn app.main:app --port 8002 --reload"
# Advise Service
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd '$PSScriptRoot\advise'; .\venv\Scripts\Activate.ps1; uvicorn app.main:app --port 8003 --reload"
# Generate Service
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd '$PSScriptRoot\generate'; .\venv\Scripts\Activate.ps1; uvicorn app.main:app --port 8004 --reload"
# Commerce Service
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd '$PSScriptRoot\commerce'; .\venv\Scripts\Activate.ps1; uvicorn app.main:app --port 8005 --reload"
# Gateway Service
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd '$PSScriptRoot\gateway'; .\venv\Scripts\Activate.ps1; uvicorn app.main:app --port 8000 --reload"
Write-Host "`n✅ All backend services started!" -ForegroundColor Green
Write-Host "Wait 10-30 seconds for services to initialize..." -ForegroundColor Yellow
Write-Host "`nService URLs:" -ForegroundColor Cyan
Write-Host " Gateway: http://localhost:8000" -ForegroundColor White
Write-Host " Detect: http://localhost:8001" -ForegroundColor White
Write-Host " Segment: http://localhost:8002" -ForegroundColor White
Write-Host " Advise: http://localhost:8003" -ForegroundColor White
Write-Host " Generate: http://localhost:8004" -ForegroundColor White
Write-Host " Commerce: http://localhost:8005" -ForegroundColor WhiteRun it:
cd artistry-backend
.\start-all-services.ps1Open 6 separate PowerShell terminals and run these commands:
cd F:\Projects\Artistry\Artistry-Redesign\artistry-backend\detect
.\venv\Scripts\Activate.ps1
uvicorn app.main:app --port 8001 --reloadcd F:\Projects\Artistry\Artistry-Redesign\artistry-backend\segment
.\venv\Scripts\Activate.ps1
uvicorn app.main:app --port 8002 --reloadcd F:\Projects\Artistry\Artistry-Redesign\artistry-backend\advise
.\venv\Scripts\Activate.ps1
uvicorn app.main:app --port 8003 --reloadcd F:\Projects\Artistry\Artistry-Redesign\artistry-backend\generate
.\venv\Scripts\Activate.ps1
uvicorn app.main:app --port 8004 --reloadcd F:\Projects\Artistry\Artistry-Redesign\artistry-backend\commerce
.\venv\Scripts\Activate.ps1
uvicorn app.main:app --port 8005 --reloadcd F:\Projects\Artistry\Artistry-Redesign\artistry-backend\gateway
.\venv\Scripts\Activate.ps1
uvicorn app.main:app --port 8000 --reloadOpen a 7th terminal and run:
cd F:\Projects\Artistry\Artistry-Redesign\frontend
npm run devOpen PowerShell and run:
# Test all services
curl http://localhost:8000/health # Gateway
curl http://localhost:8001/health # Detect
curl http://localhost:8002/health # Segment
curl http://localhost:8003/health # Advise
curl http://localhost:8004/health # Generate
curl http://localhost:8005/health # CommerceAll should return: {"status":"ok","service":"..."}
Once all services are running:
- Enhanced Workflow (New!): http://localhost:5173/enhanced-workflow
- Full Workflow: http://localhost:5173/workflow
- Home Page: http://localhost:5173/
Solution: Restart the Vite dev server
# Stop the dev server (Ctrl+C)
# Then restart
npm run dev# Find process using port
netstat -ano | findstr :8000
# Kill process (replace PID with actual process ID)
taskkill /PID <PID> /F- Ensure all backend services are running (check terminals)
- Verify
.envfile in frontend folder exists - Check CORS settings in each service
Create test-services.ps1:
$services = @(
@{Name="Gateway"; Port=8000},
@{Name="Detect"; Port=8001},
@{Name="Segment"; Port=8002},
@{Name="Advise"; Port=8003},
@{Name="Generate"; Port=8004},
@{Name="Commerce"; Port=8005}
)
foreach ($service in $services) {
try {
$response = Invoke-WebRequest -Uri "http://localhost:$($service.Port)/health" -UseBasicParsing
Write-Host "✅ $($service.Name) (Port $($service.Port)): OK" -ForegroundColor Green
} catch {
Write-Host "❌ $($service.Name) (Port $($service.Port)): FAILED" -ForegroundColor Red
}
}Run it:
.\test-services.ps1- Detect: ~2-3 seconds
- Segment: ~3-5 seconds
- Advise: ~30-60 seconds (downloads LLaVA model on first run)
- Generate: ~20-30 seconds (downloads SD models on first run)
- Commerce: ~1-2 seconds
- Gateway: ~1 second
- Frontend: ~3-5 seconds
Total time to all services ready: ~1-2 minutes (first time: 5-10 minutes for model downloads)
Once all services show ✅ in health check:
Visit: http://localhost:5173/enhanced-workflow
Enjoy your AI-powered interior design platform! 🎨✨