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.

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.
| Concern | Choice |
|---|---|
| Data | One PostgreSQL database, with one schema and one DbContext per module |
| Messaging | Wolverine with a PostgreSQL transactional outbox |
| Writes and reads | EF Core for commands, Dapper for queries |
| Multi-tenancy | Tenant isolation through query filters |
| API | Versioned under /api/v1, documented with OpenAPI and Scalar, rate-limited per tenant and per IP |
| Frontend | Angular 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.
