↑↓ to navigate Enter to open "…" all these words ANDOR to combine

Onboarding guide

MMCA.Common + MMCA.ADC, Onboarding Guide

A teaching guide for an experienced .NET engineer who is new to this codebase. It walks every first-party type, explaining not just what each type is but how it works and why it was built that way, introducing each project-specific concept the first time it appears, and connecting the code to a 34-category architecture-evaluation rubric as it goes.

Ground rule for this guide: every statement is traceable to source actually read, cited as path/File.cs:line. Where the source can't settle a question, the text says so explicitly ("Not determinable from source: …") rather than guessing. The existing docs (Architecture/ArchitecturalAnalysis.md, ADRs/, per-project CLAUDE.md) are used as a map and cross-check, but source code is ground truth, where a doc and the code disagree, the code wins and the discrepancy is noted.

Building a new app rather than reading an existing one? This guide is a tour of code that already exists. The adoption path is the getting-started guide, which scaffolds the solution with dotnet new mmca-app; the phase-by-phase detail behind it is the build-by-hand walkthrough, whose worked companion is the runnable MMCA.Helpdesk seed.


How the guide is organized, two axes

The guide has two organizing axes that work together.

  1. Primary axis, functional grouping. Every type lives in exactly one functional group: the capability or cross-cutting concern it most exists to serve. The 28 group chapters (group-01-*.md … group-28-*.md) are sequenced roughly topologically, foundational, widely-depended-on concerns first (Result → domain blocks → querying → events → CQRS → …), then the ASP.NET/UI/Aspire edges, then the MMCA.ADC business modules that build on all of it, then the test infrastructure. The full assignment of every type to its group is 00-group-taxonomy.md.

  2. Secondary axis, dependency leveling within a group. Inside each chapter, the per-type sections run in ascending Level (a longest-path topological layering over first-party dependencies), so you meet a type only after the first-party types it depends on.

First-party type = any type declared in MMCA.Common or MMCA.ADC source. The .NET BCL and external NuGet packages are not first-party, they are "external Level 0", explained once in the primer, never per class.

Level(C) = 0                              if C references only external (BCL/NuGet) types
Level(C) = 1 + max(Level(D)) over all first-party D that C depends on

When a type must reference a first-party type whose home group appears later, that forward reference is allowed (functional cohesion can outrank strict progressive disclosure) and is cross-linked. Thirty-six dependency cycles exist (mutually-dependent types, e.g. an aggregate root and its child entity with bidirectional EF navigations); each is kept whole within a single group and called out where it occurs. They are listed in the dependency manifest. Three of them are name-collision artifacts rather than real dependencies: the identically-named pairs SelfHttpWarmupTask (MMCA.ADC.Engagement.Service/SelfHttpWarmupTask.cs:23 and MMCA.ADC.Identity.Service/SelfHttpWarmupTask.cs:23), Priority (MMCA.Common.Infrastructure.Tests/Persistence/Conversions/EnumerationValueConverterTests.cs:89 and MMCA.Common.Shared.Tests/ValueObjects/EnumerationTests.cs:122), and GateTestContext (MMCA.Common.Infrastructure.Tests/Persistence/AuditTrail/AuditTrailModelGateTests.cs:76 and MMCA.Common.Infrastructure.Tests/Scheduling/SchedulerModelGateTests.cs:71) are distinct types the globally-unique-name fallback described below cannot tell apart, so each resolves to the other.

How the inventory & leveling were computed

The type inventory and dependency graph are produced mechanically by a small Roslyn syntactic parser (Tools/invtool/), so the type list, namespaces, and file:line are exact and reproducible. Edges are resolved by namespace-aware name matching; ~96% bind by namespace visibility, the rest by a globally-unique-name fallback (943 edges), and 119 references are dropped as ambiguous. The functional grouping is then applied mechanically (Tools/invtool/classify.ps1 → 00-group-taxonomy.md), so every one of the 8,614 distinct type nodes maps to exactly one group with no silent drops. See the manifest's accuracy note for residual caveats.


Chapters

Front matter

File Contents
00-primer.md Cross-cutting concepts, the BCL/NuGet stack, build/language conventions, and the 34-category rubric, taught once
00-inventory.md Phase 0, every in-scope type (8,614 distinct), mechanically extracted, with file:line
00-dependency-manifest.md Phase 1a, per-type first-party deps + computed Level; the 54 cycles
00-group-taxonomy.md Phase 1b, the ordered groups + every type's group assignment (the primary axis)

Group chapters (primary axis)

# Chapter Types Concern
1 Result & Error Handling 19 The Result/Error railway returned instead of throwing, incl. its own JSON round-trip converter, plus the Shared.Serialization CSV reader and writer (CsvWriter moved here from MMCA.Common.API in v1.327.0)
2 Domain Building Blocks 33 Entity/aggregate bases, value objects + invariants, domain markers, attributes, identifier aliases, [Pii] redaction, row-version concurrency marker
3 Querying: Specifications, Filtering & the Entity Query Service 46 Specification pattern (incl. cross-source), dynamic filter/sort/page (incl. IN-list value parsing), the generic query pipeline
4 Domain & Integration Events + Outbox Dual-Dispatch 100 Event contracts, dispatcher, transactional outbox/inbox (incl. the async OutboxFinalizer), message buses, OutboxSettings, outbound webhooks (subscriptions + signed delivery, ADR-142) and the process-manager primitive (ADR-143), all over the framework's own broker transports (ADR-118)
5 CQRS: Commands, Queries & the Decorator Pipeline 71 Handler abstraction + the logging/transaction/caching/feature-gate/idempotency decorators (incl. the cache-stampede lock)
6 Validation 23 FluentValidation contracts + failure mapping that gate commands
7 Persistence & EF Core 205 SQLServerDbContext over abstract ApplicationDbContext, interceptors (incl. the per-context deferred-dispatch queue), repositories, engine-aware entity config, data-source routing, the per-engine IDataSourceEngine strategy behind the DataSourceEngines registry (ADR-130), conventions (incl. the soft-delete unique-index convention), the IModelContributor optional-table contributors (ADR-148), factories, and the persistence/audit-trail/connection-string/data-source/tenancy settings classes (regrouped here from the module-system chapter on 2026-09-05)
8 Authentication & Authorization 282 JWT/JWKS dual-fetch, the shared AuthenticationServiceBase<TUser> login workflow (IAuthUser) with refresh-session issue, rotation and reuse detection in AuthSessionIssuer, current-user/claims, versioned password hashing with rehash on sign-in (ADR-133) + the shared PasswordComplexity rules, cookie sessions + the ISessionCookieStore family behind the same-origin proxy, role policies + the permission-based authorization mechanism (registry, [HasPermission]), the RoleValue base, the external-auth-broker contract (ADR-042/043), the JWT/JWKS settings (JwtSettings, JwksSettings, JwtSigningAlgorithm), passkeys as an opt-in sign-in (ADR-139) read-only view-as support grants (ADR-137), and the shared JWT algorithm list + key-material loader behind the key-strength floor (ADR-149)
9 Caching 16 The cache abstraction (incl. the shared-store read that skips the local tier for single-use auth records) + its invalidation-aware decorator integration, CacheSettings, plus the in-memory and Redis fixed-window counter stores behind ICounterStore
10 Notifications (Push + In-App Inbox + Email) 62 Push (SignalR), in-app inbox, email, recipient providers, the ADR-039 hub-channel live publisher, ADR-044 native OS-level push (shipped inert; the vendor senders live in chapter 28), ADC Notification module + its cross-service gRPC live-channel plumbing + extractable-host Kestrel config
11 Navigation Metadata & Populators 15 EF-decoupled cross-container/cross-source eager loading (ADR-002)
12 API Hosting, Middleware, Idempotency & DTO/Contract Mapping 162 Controller bases (incl. OAuth + service-info + API versioning, ADR-046), middleware (incl. soft-deleted-user revocation, ADR-047), startup, model binders, JSON converters, feature mgmt, idempotency, mapping, edge error localization (i18n), authenticated output caching (ADR-040), app-association/deep-link endpoints (ADR-043), runtime feature-flag overrides, the per-module MmcaServiceHost builder the remaining-window rate limiter with its shared Redis counter script, and the start-up JWT/JWKS key-strength validators (ADR-149)
13 gRPC & Inter-Service Contracts 20 Typed gRPC clients/servers, interceptors, the GrpcWireFormat UTC/decimal wire helpers, Result-over-the-wire (ADR-007)
14 Module System, Composition & Configuration 155 IModule + Kahn-ordered loader, DI composition roots, data-source attributes, options-binding plumbing (the per-subsystem settings classes live with their subsystems since 2026-09-05), the ApplicationNamespace keyspace resolver (ADR-135), plus the host-level infrastructure services: the provider-neutral file storage (ADR-045) and native-push (ADR-044) registrations and their inert defaults (the vendor implementations live in chapter 28), TenantContext, the upcasting/fault integration-event consumers and PeriodicBackgroundService, and the framework's own assembly scanning and decoration (ServiceCollectionDecoration, which replaced Scrutor in v1.324.0)
15 Common UI Framework 317 Reusable MudBlazor building blocks: data-grid list page base, theme, common pages/services, the Blazor Server UI-host hardening kit (circuit limits + UI rate limiting), i18n culture bootstrap + day/dark ThemeService, user-preference readers/writers, pseudo-localization gate, OAuth UI settings + token storage (Web/WASM), hub-channel subscriptions (ADR-039), the shared DetailPageBase, the email-confirmation page + UI service and the client-config endpoint (extracted from ADC in v1.211.0), the same-origin API proxy + session handoff in MMCA.Common.UI.Web (ADR-131), the installable-web-app service worker (ADR-136)
16 Aspire Orchestration & Service Defaults 89 AppHost wiring, ServiceDefaults, warmup, telemetry, security helpers, the shared HttpResilienceDefaults Polly source of truth, the shared HealthCheckTags liveness/readiness vocabulary, the shared MailDev ports
17 ADC Conference, Domain Model & Module Contracts 117 Event/Session/Speaker/Category/Question/Partner aggregates + domain events + invariants + Shared contracts (incl. ConferencePermissions, the current/next-event selector + live-validation contracts)
18 ADC Conference, Application & Use Cases 364 Conference CQRS handlers, validators (incl. the per-field session validation-rule family), DTOs, specs, Sessionize import, decision-support analytics, batch bookmark-count query, event-filtering-by-role handlers, calendar (.ics) export slice (ADR-042)
19 ADC Conference, Infrastructure & Persistence 28 Conference DbContext registration, EF configs, seeding, infra services
20 ADC Conference, API, gRPC Contracts & Service Host 72 REST controllers, .Contracts gRPC, the extractable service host (incl. its Kestrel config), the gRPC adapters (incl. cross-service live-validation), localized error resources
21 ADC Conference, UI 172 Conference Blazor pages + UI services (incl. the Partner management pages), the single canonical ADC Home page (bound to the Conference DTOs through the UI services), the AI-scoring poll recovery tracker, calendar/QR export UI, OfflineBanner, PresenterLayout on Common theme providers
22 ADC Engagement Module (Session Bookmarks) 363 The attendee-activity slice of the Engagement bounded context, four capability families: the session-bookmark aggregate, the QR badge check-in surface (organizer scanning, manual fallback, attendee self-service, attendance rollup), the points economy (append-only ledger + opt-in public leaderboard), and the feedback UI; plus use cases, persistence, API/contracts/service, the durable live-channel publish queue (ADR-039), the cross-service user-engagement export slice (gRPC); the live-layer UI services (SessionLiveUIService, LivePollUIService, SessionQuestionUIService, LiveEventService, SessionLookupService) and the live-poll EF configurations sit here too (regrouped from the live-layer chapter on 2026-09-05)
23 ADC Engagement Live Layer (Real-Time Polls & Session Q&A) 83 Event-wide live polls with voting + moderated per-session Q&A with upvoting, over the ADR-039 hub-channel transport and the cross-service gRPC live-channel adapter (HappeningNow / SessionLive / PresenterView)
24 ADC Identity Module (Users, Profiles, GDPR Export/Erasure) 143 The Identity bounded context end-to-end (incl. IdentityPermissions, user culture/theme preferences, the ADR-045 user-avatar photo slice end to end, the external-login email verifier + extractable-host Kestrel config; AuthenticationService now extends Common's shared base)
25 ADC Application Host, UI Shell & Cross-Module Composition 18 Blazor Web/WASM/WinUI shells, host pages/services, security (the circuit/rate-limit hardening kit now lives in the Common UI chapter), app composition, device-capability DI wiring, one-time preference migrator (the shared ADC Home page now lives in the Conference UI chapter)
26 Device Capability Abstraction Layer (Native Contracts, MAUI, Browser & Fallback Adapters) 123 Per-capability interface contracts (biometric, geolocation, speech, push registration, clipboard/share/haptics, external auth/links, connectivity/battery, deep links, sensitive-file save) + their MAUI-native, browser-JS-interop, and inert-fallback implementations, selected per host at DI composition time (ADR-042/043/044/045)
27 Common AI Integration 50 The optional, provider-agnostic MMCA.Common.AI package plus its Anthropic adapter: the provider settings + validator + factory contract, one composition entry point that builds the delegating-client pipeline, the bounding and usage-metering chat clients over IChatClient, the token-estimator contract, the usage meter, the IChatGuardrail verdict contract + its GuardrailChatClient decorator, the shipped content-policy guardrail, the chat tool policy, request redaction, the golden-replay evaluation base, and the hashed, versioned prompt contract (ADR-120); plus the opt-in MMCA.Common.Mcp server and its tool governance (ADR-138)
28 Common Cloud Provider Adapters (AWS, Azure, GCP) 121 The opt-in vendor adapter packages MMCA.Common.Azure, MMCA.Common.Aws and MMCA.Common.Gcp behind the cloud-neutral core (ADR-134): broker transports (Service Bus, SQS/SNS), native push (Notification Hubs, SNS, FCM), file storage (Blob, S3, GCS), secrets as configuration (Key Vault, Secrets Manager, Secret Manager), database IAM auth (RDS, Cloud SQL), the DataProtection key ring and telemetry exporters, one registration call per capability
29 Testing & Quality Infrastructure 5,345 All test projects + reusable Testing/Testing.E2E/Testing.UI/Testing.Architecture bases (incl. the handler + decorator-pipeline test bases, the shared production-host/graceful-shutdown bases, the observability-convention fitness base, and the Gallery auth stubs) + architecture-fitness tests + Gallery + the BenchmarkDotNet perf-smoke suite + the weekly MMCA.Common.LoadTests load tier, plus the shared Tests/Shared bases compiled into several test projects

DevOps & operations chapters

File Contents
devops-cicd.md CI/CD workflows (the lockstep package release, count in FACTS.md; the automated Claude review + MAUI audit workflows; ADC deploy/e2e/cost-guard/load-test/cutover)
devops-iac.md Bicep infrastructure-as-code, the UAMI/OIDC + shared-RG + database-per-service deployment model
devops-aspire.md Aspire AppHost + ServiceDefaults orchestration; how local run and service wiring work
devops-runbooks.md Operational scripts, SQL, and runbooks (disaster recovery, post-cutover downgrade)
devops-testing.md Solution composition (.slnx/.slnf), MTP/xUnit v3 runner, the test strategy & pyramid

Back matter

File Contents
99-coverage-audit.md Phase 4, coverage cross-check, exceptions log, grouping/ordering verification, rubric matrix, open questions

Legend, how to read a type section

Every type gets one section using this template:

{TypeName}

{Assembly} · {namespace} · {file:line} · Level {n} · {kind}

  • What it is: one or two plain-language sentences.
  • Depends on: first-party types (linked) and notable externals.
  • Concept introduced: taught from first principles the first time a pattern appears; otherwise cross-references where it was introduced. Relevant rubric categories are tagged inline as [Rubric §N, Name].
  • Walkthrough: members in teaching order (fields → constructor/factory → key methods), with line numbers and the mechanism.
  • Why it's built this way: design rationale; cites the relevant ADR when one applies.
  • Where it's used: a forward pointer to consumers.
  • Caveats / not-in-source: anything uncertain, stated explicitly.
  • Cross-links. A first-party type named in prose links to its section, e.g. Result. The target is computed from the type's group (see 00-group-taxonomy.md); within a chapter, links are same-page anchors.
  • Sibling families. Near-identical types (per-entity Add*/Remove*/Update* commands, *DTOMapper, *Validator families) may share one ### A, B, C section that teaches the shared shape once, with a per-member File:Line table so every type stays individually cited.
  • [Rubric §N, Name] tags. These connect the code to the 34-category rubric introduced in the primer. A tag explains the category and how this code embodies (or under-uses) it, it does not score it. Scoring lives in the separate ArchitectureEvaluation-*.md reports.

Suggested reading paths

  • Framework-first (recommended). Primer → group-01 → upward. You meet the MMCA.Common foundations before the MMCA.ADC features that build on them; this matches dependency order across and within groups.
  • "I need to touch the ADC Conference module." Primer → skim group-01/02/05 (Result, domain blocks, CQRS) → then Conference Domain → Application → UI.
  • Capability deep-dive. Jump straight to the group for the concern you care about, persistence, auth, events/outbox, notifications, navigation populators, etc. Each chapter opens with a "how this capability is implemented" overview before the per-type sections.
  • Rubric-driven (architecture review). Read the primer's rubric section, then follow the [Rubric §N] tags; the coverage audit maps every category to where it's first explained.
  • Operations / DevOps. Primer → the devops-* chapters.
  • "I want to build my own app on the framework." Not this guide: start at the getting-started guide, then come back here for the internals behind whichever pattern you land on.

The companion projects (context)

MMCA.Common , shared framework, published as 15 NuGet packages (DDD/Clean Arch/CQRS base classes)
   ├── consumed by MMCA.ADC   (Atlanta Developers Conference app, the focus of this guide)
   └── consumed by MMCA.Store  (e-commerce app, out of scope here)

This guide covers MMCA.Common (the framework) and MMCA.ADC (one consumer). MMCA.Store is out of scope. The dependency arrow is why the Common framework groups (1–16) come before the ADC business-module groups (17–25); the late-added Common Device Capability layer (26) and Common AI Integration (27), both framework concerns appended after the business modules, and the test infrastructure (28) come last.