Skip to main content

Platform Traceability Matrix

Version: 1.1 Status: Approved Owner: Platform Architecture Team Last Updated: 2026-04-19 References: system.md §1–10, AGENT.md §1–17 Machine-readable: traceability_matrix.csv | traceability_matrix.json

Change log

  • v1.1 (2026-04-19) — Identity rebaselined (Keycloak base/default + pluggable IdP provider abstraction for tenant external OIDC/SAML SSO). Compliance Layer requirements added. Firebase-specific requirement and ADR retargeted.

Platform Requirements Traceability

IDRequirementSourceEpicFeatureUser StoryTest LevelTest ReferenceObservability SignalStatus
PLT-REQ-001TypeScript strict mode enforced across all servicesAGENT.md §1.1unittsconfig.json strict checklogDraft
PLT-REQ-002No shared databases between microservicesAGENT.md §5.2contractcross-service-db.contract.testlogDraft
PLT-REQ-003All REST APIs follow OpenAPI 3.1 with /v1/ versioningAGENT.md §6.1contractopenapi-validation.contract.testlogDraft
PLT-REQ-004UUID primary keys on all database tablesAGENT.md §7.1integrationdb-schema.integration.testlogDraft
PLT-REQ-005All services expose /health/live and /health/readyAGENT.md §12.1integrationhealth-endpoints.integration.testmetricDraft
PLT-REQ-006Prometheus metrics exposed on /metrics for all servicesAGENT.md §12.1integrationmetrics-endpoint.integration.testmetricDraft
PLT-REQ-007OpenTelemetry tracing in all servicesAGENT.md §12.1integrationotel-tracing.integration.testtraceDraft
PLT-REQ-008NATS consumers must be durable with explicit acksAGENT.md §9.1integrationnats-durable.integration.testmetric, logDraft
PLT-REQ-009Dead-letter queues for all NATS consumersAGENT.md §9.1integrationnats-dlq.integration.testmetric, logDraft
PLT-REQ-010No fire-and-forget NATS publishingAGENT.md §9.2unitnats-client.unit.testlogDraft
PLT-REQ-011Keycloak is the base/default IdP for platform users; auth-service issues the platform JWTsystem.md §2 + ADR-0002AUTH-EPIC-001Keycloak baselineintegrationauth-keycloak.integration.testlog, traceDraft
PLT-REQ-011aauth-service exposes an IdentityProvider port with pluggable providers (Keycloak default, Tenant-OIDC, Tenant-SAML, Firebase-legacy); downstream services are IdP-agnosticADR-0002AUTH-EPIC-002IdP provider abstractionunit+integrationidentity-provider-port.unit.test, idp-dispatch.integration.testlog, traceDraft
PLT-REQ-011bTenant organisations can federate their own external IdP (OIDC or SAML 2.0) for SSO, brokered via Keycloak IdP mappersADR-0002AUTH-EPIC-003Tenant external SSOe2etenant-external-sso.e2e.testlog, traceDraft
PLT-REQ-011cSCIM 2.0 inbound provisioning endpoint for enterprise tenant IdPsADR-0002AUTH-EPIC-004SCIMintegrationscim.integration.testlogDraft
PLT-REQ-011dFirebase retained only as a legacy provider for existing customers; no new tenant onboardingADR-0002AUTH-EPIC-005Firebase retirementintegrationauth-firebase-legacy.integration.testlogDraft
PLT-REQ-012API Key authentication for programmatic accesssystem.md §2integrationauth-apikey.integration.testlog, traceDraft
PLT-REQ-013HMAC signatures for all webhook payloadsAGENT.md §11.1unithmac-signing.unit.testlogDraft
PLT-REQ-014Secrets stored in Vault or K8s Secrets — never plaintextAGENT.md §11.1Manual auditlogDraft
PLT-REQ-015RBAC with admin, customer, operator rolessystem.md §2integrationrbac.integration.testlog, traceDraft
PLT-REQ-016All sms_messages partitioned by month in PostgresAGENT.md §7.1integrationdb-partitioning.integration.testmetricDraft
PLT-REQ-017Redis used for rate limiting, idempotency, and caching onlyAGENT.md §8integrationredis-usage.integration.testmetricDraft
PLT-REQ-018SMPP 3.4 with enquire_link heartbeat and operator failoversystem.md §2integrationsmpp-connector.integration.testmetric, logDraft
PLT-REQ-019Domain layer contains zero framework importsAGENT.md §4.2unitdomain-isolation.unit.testDraft
PLT-REQ-020Conventional commits enforced in CIAGENT.md §16commitlint CI steplogDraft
PLT-REQ-021All APIs input-validated with ZodAGENT.md §6.1unitzod-validation.unit.testlogDraft
PLT-REQ-022HTTPS everywhere — no plaintext HTTP in productionAGENT.md §11.1Manual + Cloudflare configlogDraft
PLT-REQ-023Pino structured logging in all servicesAGENT.md §12.1integrationlogging.integration.testlogDraft
PLT-REQ-024console.log forbidden in productionAGENT.md §12.2unitno-console.lint.ruleDraft
PLT-REQ-025Monorepo pnpm workspace structure as defined in system.md §1system.md §1CI workspace validationlogDraft
PLT-REQ-026Every outbound SMS is evaluated by the Compliance Layer (gRPC EvaluateCompliance) before routing; pipeline is fail-closedADR-0003COMP-EPIC-001Compliance evaluationintegration+e2ecompliance-evaluate.integration.test, compliance-fail-closed.e2e.testmetric, log, traceDraft
PLT-REQ-027Compliance verdicts: ALLOW / FLAG / HOLD / BLOCK; non-ALLOW messages never reach a carrierADR-0003COMP-EPIC-001Verdict enforcementintegrationcompliance-verdict.integration.testlog, traceDraft
PLT-REQ-028Hold queue with manual review (release/reject) in admin-dashboard; async tenant notifications via notification-serviceADR-0003COMP-EPIC-002Hold queuee2ecompliance-hold-queue.e2e.testlogDraft
PLT-REQ-029Tenant compliance scoring (0–100) and risk tiering drives automated enforcement thresholdsADR-0003COMP-EPIC-003Tenant scoringintegrationcompliance-score.integration.testmetric, logDraft
PLT-REQ-030Compliance audit log is immutable, append-only, retained ≥ 13 months (regulatory evidence)ADR-0003COMP-EPIC-004Audit retentionintegrationcompliance-audit-retention.integration.testlogDraft
PLT-REQ-031Compliance AI classification runs on a local LLM with external LLM fallback governed by data residencyADR-0003COMP-EPIC-005AI classificationintegrationcompliance-ai.integration.testmetric, logDraft

Architecture Decision Records

IDDecisionRationaleSourceStatus
PLT-ADR-001NestJS as default backend framework (NestJS allowed)Performance, plugin ecosystem, TypeScript-firstAGENT.md §1.2Approved
PLT-ADR-002NATS JetStream as primary async bus (not Kafka)Lower operational overhead, built-in JetStream persistencesystem.md §4Approved
PLT-ADR-003PostgreSQL only — no MongoDB, no MySQLRelational integrity required for billing, auditabilityAGENT.md §7.2Approved
PLT-ADR-004Superseded by PLT-ADR-009. Originally: Firebase Authentication (not Auth0, not custom)Early-stage decision; no multi-IdP need at the timesystem.md §2Superseded
PLT-ADR-009Keycloak as base / default IdP with pluggable IdentityProvider port in auth-service — tenant external OIDC/SAML SSO brokered via Keycloak IdP mappers. Firebase retained only as a legacy provider.Multi-provider is required to land enterprise tenants with corporate SSO (Azure AD, Okta, Google, ADFS); Keycloak avoids vendor lock-in and is deployable in regulated regions01-enterprise-architecture §3.1, auth-service SERVICE_OVERVIEW §5Approved
PLT-ADR-010Compliance Layer as first-class architectural tier implemented by compliance-engine — synchronous gRPC evaluation in the orchestrator's NATS consumer, fail-closed, non-ALLOW verdicts never reach a carrierRegulatory exposure, tenant abuse potential, and need for immutable evidence demand a dedicated compliance tier, not ad-hoc checks in orchestration01-enterprise-architecture §3.2 and §4, compliance-engine SERVICE_OVERVIEWApproved
PLT-ADR-005gRPC for Routing Engine sync calls (latency-sensitive)REST overhead unacceptable for <50ms routing decisionssystem.md §2Approved
PLT-ADR-006SMPP Connector as StatefulSet (not Deployment)SMPP sessions require stable pod identityinfra baselineApproved
PLT-ADR-007Domain-Driven Design across all microservicesEnforces clean architecture, testabilityAGENT.md §4Approved
PLT-ADR-008OpenTelemetry for all tracing (not Jaeger SDK directly)Vendor-neutral; OTel Collector routes to any backendAGENT.md §12Approved