Reference Architecture¶
This document describes the standard architecture any serious candidate inherits when it is built. It is written for architects and engineers and reflects the existing microservice template, SaaS framework HLD, and agent microservice standard blueprint.
Standard Layers (Clean Architecture)¶
flowchart TB
UI[API / UI surface - contract-first]
App[Application layer - use cases, CQRS]
Dom[Domain layer - aggregates, domain events]
Inf[Infrastructure - persistence, messaging, providers]
UI --> App --> Dom
App --> Inf
Inf --> Dom
Hold "Alt" / "Option" to enable pan & zoom
- Domain at the center: aggregates, value objects, domain events, invariants.
- Application: commands/queries, policies, orchestration.
- Infrastructure: EF Core/persistence, messaging, external providers.
- API/UI: REST/gRPC/GraphQL contracts and Blazor micro-frontends.
Cross-Cutting Concerns (Built In By Default)¶
- Multi-tenancy & editioning - tenant context resolved per request; entitlements enforced.
- Security - OAuth2/OIDC via the Identity platform; secrets in the platform store; least privilege.
- Audit - significant actions emit audit events to the Audit platform.
- Observability - OpenTelemetry traces/metrics/logs; health checks.
- Configuration & flags - via the Config platform; no hard-coded config.
- Resilience - retries, timeouts, circuit breakers, idempotency.
Integration Patterns¶
- Event-first - outbox + integration events; consumers use inbox dedup. See event-driven mindset.
- Contract-first APIs - OpenAPI/AsyncAPI managed via the API & Integration context.
- No shared databases - cross-context access is via APIs/events only.
Technology Baseline¶
.NET microservices, EF Core, Blazor for UI, Pulumi for IaC, Docker, Kubernetes, OpenTelemetry, feature flags, and the ConnectSoft shared libraries - as defined in the factory technology stack.
How A Candidate Is Created¶
- Pick the delivery shape (see classification model).
- If it needs a runtime, scaffold from the microservice template (or library/UI template).
- Place it in its bounded-context service (module) or as a standalone service (justified).
- Wire identity, config, audit, notifications, and observability via shared libraries.
- Define contracts and events; register in the API/Integration and Event Schema registries.