Skip to content
MS
All projects

Case study

FinGuard

Investment-limit compliance for regulated portfolios.

An entity uploads its portfolio at a cut-off date. FinGuard evaluates every asset class against versioned maximum-allocation limits, flags compliant, warning and breached positions, and proposes a deterministic rebalancing explained by a guarded AI narrative.

In developmentSource codeLive demo · Coming soon
FinGuard portfolio evaluation screen

Stack

  • .NET 10
  • Angular
  • PostgreSQL
  • Modular Monolith
  • DDD
  • RegTech
  • ASP.NET Core
  • EF Core
  • Dapper
  • Wolverine
  • .NET Aspire
  • Vertical Slice Architecture
  • Microsoft Agent Framework

The problem

Insurance companies must keep their investment portfolios within maximum-allocation limits set by the regulator. FinGuard turns that review into software: explicit rules, versioned limits and results that trace back to the rule that produced them.

What it does

  • An entity uploads a portfolio CSV at a cut-off date, and FinGuard validates the file before anything else runs.
  • Every asset class (cash, fixed income, shares and real estate, in USD at book value) is evaluated against versioned maximum-allocation limits.
  • Each class comes back compliant, warning or breached, with alerts when a position gets close to its limit.
  • A deterministic rebalancing proposal shows what would bring the portfolio back within its limits.
  • An optional AI paragraph explains that proposal in plain language, under strict guardrails.

Architecture

FinGuard is a .NET 10 modular monolith organised in vertical slices, with four modules: Tenancy, Portfolio, Compliance and Advisory.

ConcernChoice
DataOne PostgreSQL database, with one schema and one DbContext per module
MessagingWolverine with a PostgreSQL transactional outbox
Writes and readsEF Core for commands, Dapper for queries
Multi-tenancyTenant isolation through query filters
APIVersioned under /api/v1, documented with OpenAPI and Scalar, rate-limited per tenant and per IP
FrontendAngular single-page application
Local environment.NET Aspire

AI with guardrails

The compliance result never depends on a model. Limits are evaluated and the rebalancing proposal is computed deterministically; the optional narrative, built with Microsoft Agent Framework, only explains a result that already exists. The model never sees amounts and never decides whether a portfolio is compliant.

How it is built

  • Architecture decision records document the main choices.
  • Unit, integration and architecture tests run in CI on every pull request; architecture tests enforce module boundaries, and banned APIs fail the build.