Gateway Service: Runs on port 8081 (not 8000 or 8001)
Frontend: Runs on port 8080 (nginx)
Correct API Base URL: http://localhost:8081
The FastAPI gateway has multiple routers with different prefix configurations:
/api prefix:/pipeline/*
/pipeline/run (POST)/pipeline/stream (GET)/pipeline/projects (GET)/pipeline/logs (GET)/pipeline/approve (POST)/pipeline/iterate (POST)/pipeline/reject (POST)/pipeline/refine-agent (POST)/pipeline/analyze-context (POST)/github/*
/github/validate-token (POST)/github/organizations (POST)/github/repos (POST)/github/create-and-push (POST)/github/push-code (POST)/github/pull-repo (POST)/health/*
/health/ (GET)/health/ready (GET)/health/live (GET)/approvals/*
/approvals/request (POST)/approvals/pending (GET)/approvals/{approval_id}/decide (POST)/api prefix:/api/sandbox/*
/api/sandbox/sessions (GET, POST)/api/sandbox/sessions/{session_id} (GET, DELETE)/api/sandbox/sessions/{session_id}/execute (POST)/api/sandbox/health (GET)/api/sandbox/stats (GET)/api/sandbox/validate/pipeline (POST)/api/deploy/*
/api/deploy/projects (GET)/api/deploy/project (POST)/api/deploy/project/{project_name} (GET, DELETE)/api/deploy/project/{project_name}/load (POST)/api/artifacts/*
/api/artifacts/generate (POST)/api/artifacts/{project_id}/download (GET)/api/artifacts/project/{project_name}/download (GET)/api/rework/*
/api/rework/project/{project_name}/security (POST)/api/rework/project/{project_name}/bugfix (POST)/api/rework/agent/rework (POST)/api/brd/*
/api/brd/generate (POST)/api/brd/enhance (POST)/api/models/*
/api/models/select (POST)/api/models/catalog (GET)/api/models/openai/live (GET)/api/models/google/live (GET)/api/admin/*
/api/admin/system/status (GET)/api/admin/services/restart (POST)/api/admin/docker/restart/{service} (POST)/api/agents/*
/api/agents/ (GET)/api/agents/{agent_id} (GET)/api/agents/{agent_id}/execute (POST)/api/context/*
/api/context/optimize (POST)/api/context/analyze-relevance (POST)/api/checkpoints/*
/api/checkpoints/ (GET)/api/checkpoints/{checkpoint_id} (GET, DELETE)Memory: /api/memory/* (prefix added in main.py)
/api/cot/* (Chain of Thought)
/api/cot/stream (POST)/api/cot/analyze (POST)/api/agent-learning/*
/api/agent-learning/lessons (GET)/api/agent-learning/stats (GET)// Wrong - adds /api to base URL
const API_BASE = 'http://localhost:8081/api'
fetch(`${API_BASE}/pipeline/projects`) // → /api/pipeline/projects (404!)
// Wrong - incorrect port
const API_BASE = 'http://localhost:8000'
const API_BASE = 'http://localhost:8001'
// Correct - gateway base URL without /api
const API_BASE = 'http://localhost:8081'
// For pipeline endpoints (no /api prefix)
fetch(`${API_BASE}/pipeline/projects`) // → /pipeline/projects ✓
// For sandbox endpoints (has /api prefix)
fetch(`${API_BASE}/api/sandbox/health`) // → /api/sandbox/health ✓
src/config.js - Main config file
window.location.hostname:80018081src/services/pipelineApi.js
http://localhost:8001http://localhost:8081src/services/sandboxApi.js
http://localhost:8001http://localhost:8081src/services/memoryApi.js
http://localhost:8001http://localhost:8081src/services/cotApi.js
http://localhost:8001http://localhost:8081src/services/proactiveApi.js
http://localhost:8001http://localhost:8081src/services/previewApi.js
http://localhost:8001http://localhost:8081src/store/adminStore.js
http://localhost:8001http://localhost:8081src/components/AdminControlPanel.vue
http://localhost:8000/api/admin/*http://localhost:8081/api/admin/*src/components/sandbox/IDECopilot.vue
http://localhost:8000http://localhost:8081src/config/constants.js
http://localhost:8000http://localhost:8081src/composables/usePipelineExecution.js
http://localhost:8000http://localhost:8081Production: Set VUE_APP_API_URL environment variable:
VUE_APP_API_URL=https://api.yourdomain.com
Development: Default to http://localhost:8081
# Test correct endpoints
curl http://localhost:8081/health
curl http://localhost:8081/pipeline/projects
curl http://localhost:8081/api/sandbox/health
curl http://localhost:8081/api/deploy/projects
# These should return 404
curl http://localhost:8081/api/pipeline/projects # 404
curl http://localhost:8081/sandbox/health # 404
curl http://localhost:8081/api/github/repos # 404
| Service | Port | Purpose |
|---|---|---|
| Frontend (nginx) | 8080 | Vue.js application |
| Gateway (FastAPI) | 8081 | Main API Gateway |
| Agent Service | 8001 | Agent execution service |
| Workflow Service | 8002 | Workflow orchestration |
| PostgreSQL | 5434 | Database |
| Redis | 6381 | Cache |
| RabbitMQ | 5672, 15672 | Message queue |
| Qdrant | 6333-6334 | Vector database |
| Qdrant Builder | 6335-6336 | Builder vector database |
| MinIO | 9000-9001 | Object storage |
When updating frontend to use correct gateway:
localhost:8000 → localhost:8081localhost:8001 → localhost:8081/api from base URLs for pipeline/github/health endpoints/api prefix when calling sandbox/deploy/artifacts/admin endpointsLast Updated: February 4, 2026
Version: 2.1 (Post-Endpoint Validation)