ADR-BW-015: Separate logical architecture from environment configuration
Document configured dependencies and environment differences explicitly instead of inferring production infrastructure from local orchestration.
| Field | Value |
|---|---|
| Status | Proposed |
| Date | 2026-11-07 |
| Owners | Platform Engineering TeamTeamPlatform Engineering TeamPlatform team providing BookWorm's thinnest viable platform—orchestration, messaging fabric, scheduling, notifications, ...Open docs |
| Affected Resources | BookWormDomainv1.0.0BookWormCore e-commerce domain for the BookWorm online bookstore, coordinating catalog discovery, customer baskets, order fulfil...Ownerarchitecture-enabling-teamDiagramRepositoryOpen docs |
| Related ADRs | ADR-BW-003: Reuse Aspire and shared technical service defaultsDecision Recordv1.0.0ADR-BW-003: Reuse Aspire and shared technical service defaultsShare orchestration and technical host configuration without moving business rules into the platform foundation.Ownerplatform-engineering-teamOpen docs, ADR-BW-005: Use Kafka for configured asynchronous integrationDecision Recordv1.0.0ADR-BW-005: Use Kafka for configured asynchronous integrationRetain the shared Wolverine Kafka integration for asynchronous cross-capability messages where a broker is configured.Ownerplatform-engineering-teamOpen docs, ADR-BW-013: Use shared structured logging and OpenTelemetryDecision Recordv1.0.0ADR-BW-013: Use shared structured logging and OpenTelemetryProduce correlated logs, traces, metrics, and configured health signals while keeping business completion separate from ...Ownerplatform-engineering-teamOpen docs |
Context & Problem Statement
BookWorm runs locally under Aspire orchestration using emulators (Mailpit, Azurite, local Kafka/Cosmos/Redis) and deploys to Azure Container Apps using managed services (Confluent Cloud, SendGrid, Azure Managed Redis, Cosmos DB, Entra ID). Hardcoding environment assumptions into logical architecture docs or treating local emulators as production-equivalent creates operational blind spots.
Decision Drivers
- Operational accuracy: Distinguish local emulator behavior from managed production SLAs and security.
- Portability: Keep business contracts identical across environments.
- Release safety: Make environment-specific parameters explicit and verifiable before promotion.
Options Considered
| Option | Pros | Cons |
|---|---|---|
| Separate logical architecture from explicit environment config | Simple local dev; production-grade managed services; stable diagrams | Environment overrides must be maintained and verified |
| Treat local Aspire setup as production | Single config to document | Local emulators lack production durability, RBAC, and scaling |
| Identical settings in all environments | Fewer config knobs | Hides critical security, sampling, and scaling differences |
| Embed live hosting details into logical ADRs | Concrete hosting specs | Routine infra changes invalidate logical architecture decisions |
Decision & Consequences
Chosen Option: Keep logical service and contract architecture separate from explicit environment configuration. Local environments use lightweight emulators, while staging and production environments use managed Azure services, Entra ID RBAC, and environment-tuned observability.
- Positive: Logical architecture stays stable while environment-specific differences remain transparent and auditable.
- Negative: Promotion pipelines must validate environment parameters, RBAC, and health endpoints per target.
Compliance Criteria
- Service contracts and business logic must not branch on hardcoded environment names where configuration parameters suffice.
- Development-only endpoints (such as unauthenticated health/scalar helpers) must be gated out of production.
- Secrets and connection strings must be injected via user secrets locally and Key Vault / Managed Identity in Azure—never committed.