| 1 | # Local Development |
| 2 | |
| 3 | ## Prerequisites |
| 4 | |
| 5 | - Java 17 |
| 6 | - Maven |
| 7 | - Python 3.12+ |
| 8 | - Node.js 20+ |
| 9 | - Docker Desktop |
| 10 | - k3d |
| 11 | - kubectl |
| 12 | - Helm |
| 13 | |
| 14 | ## Validate the Foundation |
| 15 | |
| 16 | ```powershell |
| 17 | mvn clean verify |
| 18 | |
| 19 | python -m py_compile ai/research-engine/app/main.py |
| 20 | python -m py_compile ai/valuation-engine/app/main.py |
| 21 | python -m py_compile ai/ranking-engine/app/main.py |
| 22 | python -m py_compile ai/portfolio-optimizer/app/main.py |
| 23 | |
| 24 | helm lint infrastructure/helm/ai-investment-platform |
| 25 | ``` |
| 26 | |
| 27 | ## Run DEV Platform |
| 28 | |
| 29 | ```powershell |
| 30 | .\platform.ps1 up DEV |
| 31 | .\platform.ps1 status DEV |
| 32 | .\platform.ps1 down DEV |
| 33 | ``` |
| 34 | |
| 35 | The DEV command creates a local k3d cluster named `ai-investment-dev` and installs the Helm chart into the `ai-investment` namespace. |
| 36 | |
| 37 | ## Spring Boot Local Ports |
| 38 | |
| 39 | When services are run directly from an IDE or Maven without overriding `SERVER_PORT`, their local defaults are: |
| 40 | |
| 41 | | Service | Port | |
| 42 | | --- | ---: | |
| 43 | | api-gateway | 8080 | |
| 44 | | auth-service | 8081 | |
| 45 | | portfolio-service | 8082 | |
| 46 | | broker-service | 8083 | |
| 47 | | company-service | 8084 | |
| 48 | | research-service | 8085 | |
| 49 | | recommendation-service | 8086 | |
| 50 | | risk-service | 8087 | |
| 51 | | notification-service | 8088 | |
| 52 | |
| 53 | Container and Helm deployments can override these through `SERVER_PORT`. |
| 54 | |
| 55 | ## Local LLM Option |
| 56 | |
| 57 | DEV configuration supports Ollama via: |
| 58 | |
| 59 | ```text |
| 60 | AIP_LLM_PROVIDER=ollama |
| 61 | AIP_OLLAMA_BASE_URL=http://ollama:11434 |
| 62 | ``` |
| 63 | |
| 64 | No model is pulled or called in the foundation iteration. |