Julien Gautier 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
docs(adr-0024): ai service relay — gRPC dial + SSE bridge + POC principal
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.
2026-05-19 19:52:42 +02:00

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:

Operations & runbooks

Empty — to be populated when we deploy.

Security, performance, accessibility

Empty — placeholders to be filled with rationale docs alongside their corresponding ADRs.

S
Description
No description provided
Readme 42 MiB
Languages
TypeScript 85.3%
JavaScript 5.4%
SCSS 4.3%
HTML 3.9%
Shell 0.8%
Other 0.3%