01fe01ffe7
CI / scan (pull_request) Successful in 2m45s
CI / commits (pull_request) Successful in 2m44s
CI / check (pull_request) Successful in 2m59s
CI / a11y (pull_request) Successful in 2m15s
Docs site / build (pull_request) Successful in 2m23s
CI / perf (pull_request) Successful in 5m9s
Proposes the integration contract between portal-bff and apf-ai-service:
- BFF dials the AI service over native gRPC HTTP/2 (h2c in dev, h2 +
TLS in prod) via @grpc/grpc-js + ts-proto stubs.
- Browser-facing chat surface is text/event-stream — each ChatEvent
oneof case translates to one SSE frame; cancellation flows
browser-close → call.cancel() → upstream LLM stop.
- Proto files vendored from apf-ai-service/contract/proto into the BFF
with on-demand codegen; both proto + generated stubs committed for
hermetic builds and reviewable diffs.
- POC ships unsigned Principal { subject, roles[], attributes{} } in
the proto body, mirroring apf-ai-service's ADR-0010. Subject is the
Entra oid hashed with the same HashUserIdService salt as the audit
module so apf_portal and apf-ai-service audit trails join cleanly.
- Production hardening choice (signed envelope vs mTLS) deferred until
the first production deployment is in scope; recorded as an open
item to be amended jointly in both repos.
Documentation index
This is the entry point to all project documentation. It is maintained automatically: any addition, rename, or removal of a .md file under docs/ must be reflected here in the same change.
Conventions
- Documentation is written in English.
- One topic per file. Group related files into a folder when there are three or more.
- Cross-reference with relative links so they keep working in GitHub, IDEs, and exported sites.
- For architectural decisions, do not add them here — they belong in decisions/ as MADR 4.0.0 ADRs.
Sections
Daily development
- development.md — repo layout, prerequisites, initial setup, daily commands, observability dev-loop (Jaeger UI, log ↔ trace correlation), dependency updates (Renovate), conventional commit cycle. Day-to-day reference for working on the project.
Architecture
- architecture.md — cross-cutting Mermaid diagrams: C4 system context, C4 containers, Nx module boundaries, CI/CD pipeline. Single-decision diagrams (auth sequence, ERD, etc.) live inline in their ADR.
Onboarding & environment
Setup guides for new contributors:
- setup/01-wsl-terminal-setup.md — modern WSL terminal (Zsh + Powerlevel10k + CLI tools)
- setup/02-dev-web-stack.md — Node via nvm, pnpm via corepack, Docker
- setup/03-angular-nx-monorepo.md — Angular + Nx monorepo bootstrap
Operations & runbooks
Empty — to be populated when we deploy.
Security, performance, accessibility
Empty — placeholders to be filled with rationale docs alongside their corresponding ADRs.