Skip to content

Integration

1. Sister Services

Direction: calls / called by / bidir.

SisterDirectionSurfaceContractAuthFailure Mode
@nx/identityHTTP JWKS (/jw-certs)JWKSVerifierTokenServicetoken rejected if JWKS fetch fails
@nx/sale / @nx/paymentKafka signal.activity-notificationTActivityNotificationMessageat-least-once; no retry on handler error
@nx/sale / @nx/paymentRedis pub/sub (WebSocketEmitter){ topic, data, destination }best-effort; dropped if no instance subscribed
@nx/corein-process repositoriesActivityNotificationRepository, PolicyDefinitionRepositoryDB error propagates, message not committed

Producers (@nx/sale, @nx/payment) do not host a WebSocket server. They publish through a lightweight WebSocketEmitter; Signal is the only service that owns a WebSocketServerHelper and subscribes to the bus.

2. External Systems

SystemDirectionSurfaceAuthFailure Mode
WebSocket clients (POS / Admin / Tauri)WSS /stream (ECDH + AES-256-GCM)JWT in handshakerejected without valid JWT + clientPublicKey
Redispub/sub (single or cluster)password (optional)offline queue (cluster) / retry (single)
Kafkaconsumer (SASL optional)SCRAM/PLAINbroker reconnect; missing brokers → fail-fast at boot

3. Critical Cross-Service Flows

3.1 Payment success → user notification

StepDetail
1Producer chooses recipientScope; org/merchant are resolved server-side via PolicyDefinitionRepository, users uses recipientIds
4The same row is also retrievable via GET /notifications; the WS push is a live hint, not the source of truth

3.2 Cross-instance / cross-service direct push

4. Contract Stability

SurfaceStabilityVersioning
WS /stream handshake (type, token, clientPublicKey)stablenone — single protocol
Kafka signal.activity-notification payloadbetaTActivityNotificationMessage shape; no version field yet
WS topic observation/signal/notification/createdbetapath-based
REST /notifications, /socket/websocket/clientsstableURL /v1/

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.