Make the SPAs reach the BFF same-origin via the Angular dev-server's
proxy, so the dockerised dev mode (ADR-0030) works when the SPA is
accessed from a remote browser (e.g. http://<vm-ip>:4200/) — and CORS
is bypassed in dev altogether.
- New proxy.conf.js per SPA: /api -> ${BFF_TARGET:-http://localhost:3000}
(JS form so the env var can swap the target at startup without a
rebuild).
- project.json serve.options.proxyConfig wired in for both apps.
- environment.ts (shell + admin) bffApiBaseUrl: 'http://localhost:3000/api'
-> '/api'. Production siblings can still set an absolute origin if
the SPA and BFF live on different hosts; tracing.ts resolves either
form against window.location.origin.
- tracing.ts: new URL(env, window.location.origin) — relative bases no
longer throw, absolute bases keep their own origin.
- dev.compose.yml: BFF_TARGET=http://portal-bff:3000 on portal-shell
and portal-admin so the proxy hits the BFF container by Compose DNS.
Native nx serve leaves it unset and falls back to localhost.
OTel exporter URL and cross-SPA links remain absolute — same remote-
browser issue, but not blocking the 'Backend unreachable' path this
PR targets. Out of scope here, follow-up if needed.
Stacked on top of feat/dockerised-dev-mode.
Add an 'apps' Compose profile that runs the three Nx dev servers
(portal-bff, portal-shell, portal-admin) from a shared Dockerfile.dev,
so the whole stack boots with 'dev.sh up apps' and no native Node/pnpm.
- Dockerfile.dev: node:24-bookworm + corepack (pnpm from packageManager
at runtime), NX_DAEMON=false. No build-time COPY/install.
- dev-entrypoint.sh: BFF runs prisma generate + migrate deploy then
serves; SPA services go straight to nx serve.
- dev.compose.yml: one-shot apps-deps installs into a shared
node_modules volume once (apps gate on its completion, no install
race); repo bind-mounted, node_modules + .nx in named volumes; BFF
reuses its own .env (required:false) with host URLs overridden to
Compose service names.
- dev.sh: apps added to ALL_PROFILES + usage.
- Docs: which-mode-when table (setup doc), apps section (infra README),
CLAUDE.md roll-up. ADR-0030 flipped to accepted.
Dev-only; production images stay with the ADR-0028 Container Registry
work. Additive + profile-gated — native and devcontainer flows
unchanged. Full-boot validation pending on a Docker host (see PR body).