.NET 9 + BLAZOR WASM + DDD

The Architecture of Compliance

Not just a CRUD app. PCIShield is an enterprise-grade Governance ERP designed with Clean Architecture, Event Sourcing, and Real-Time Analytics.

Blazor Admin WASM

  • Orchestrator Pattern
  • MudBlazor Components
  • SignalR Clients

.NET MAUI Hybrid

  • Shared DTO Kernel
  • ReactiveUI
  • Offline Caching
API
GATEWAY
FastEndpoints

Application Core DDD

  • CQRS (MediatR)
  • Domain Aggregates
  • Use-Case Handlers

Infrastructure Services

  • EF Core Repositories
  • RabbitMQ Bus
  • Redis Cache
FRONTEND ARCHITECTURE

The "Smart Orchestrator" Pattern

We decouple the UI from logic. The Razor view is "dumb." A dedicated C# Orchestrator class manages state, API calls, and SignalR events.

  • Centralized State: One source of truth for the View.
  • Reactive Updates: Uses System.Reactive for debounced search.
  • Real-Time: Auto-updates when RabbitMQ processes events.
MerchantMasterOrchestrator.cs C#
01
public class MerchantMasterOrchestrator : IOrchestrator
02
{
03
  // State Container
04
  public MerchantDto PrimaryEntity { get; private set; }
05

06
  // SignalR Integration
07
  public async Task InitializeAsync(Guid id)
08
  {
09
    PrimaryEntity = await _api.GetMerchantAsync(id);
10
    await _hub.JoinGroupAsync($"Merchant-{id}");
11
    _hub.OnUpdate += HandleRealTimeUpdate;
12
  }
13
}
MerchantAdvancedGraphSpec.cs Ardalis.Specification
01
public class MerchantGraphSpec : Specification<Merchant>
02
{
03
  public MerchantGraphSpec(Guid id)
04
  {
05
    Query.Where(m => m.Id == id);
06

07
    // Prevents Cartesian Explosion
08
    Query.AsSplitQuery();
09
    Query.Include(m => m.Assessments)
10
        .ThenInclude(a => a.Evidence);
11
    Query.AsNoTracking();
12
  }
13
}
DATA PERFORMANCE

Surgical Data Access

We don't just write LINQ. We use the Specification Pattern to encapsulate query logic.

For complex dashboards, we use Split Queries to prevent "Cartesian Explosion" when loading deep graphs (Merchants -> Assessments -> Evidence).

  • Projection: Calculates KPIs inside the DB (SQL) not memory.
  • CQRS: Separate Read/Write repositories.
  • FastEndpoints: REPR pattern replaces "Fat Controllers."
ANALYTICS ENGINE

Not Just a CRUD ERP

PCIShield includes a dedicated BI layer. The dashboard isn't just a view; it's an orchestration of specialized analyzers.

1. Ingest Parallel Tasks fetch raw DTOs via HTTP Services.
2. Analyze RiskAnalyzer & PredictionEngine calculate scores.
3. Visualize MudCharts render trends & heatmaps.
POLYGLOT PERSISTENCE

The Right Tool for the Job

We don't force everything into SQL. The architecture uses specialized stores.

🐘
SQL / EF Core
Strict relational data. Merchants, Assessments, User Rights.
🍃
MongoDB
Audit logs, dynamic JSON forms, and GridFS for PDF Evidence.
Redis
Distributed caching for BI dashboards and SignalR backplane.
🐇
RabbitMQ
Decoupled messaging. Triggers "Risk Re-calc" when Evidence is uploaded.