FinXAI.Universe

A comprehensive .NET Blazor UI component library for Explainable AI (XAI) in financial risk auditing. FinXAI.Universe seamlessly bridges Python-based machine learning (FastAPI, Scikit-Learn, SHAP) with high-performance Blazor applications, providing interactive radar charts, real-time risk simulation, and built-in PDF/CSV reporting


Keywords
.NET, AI, Blazor, C#, ChartJS, Explainable-AI, Finance, HTML, JavaScript, MachineLearning, NET, Python, Python-Interop, Risk-Analysis, SHAP, UI-Components, XAI
License
Apache-2.0
Install
Install-Package FinXAI.Universe -Version 1.0.0

Documentation

Fin-XAI: Explainable AI for Financial Risk Auditing

.NET Python

Fin-XAI is a distributed framework that bridges the gap between high-performance enterprise .NET applications and advanced Python-based Machine Learning.

Machine Learning models in finance are often treated as "Black Boxes." This project provides a novel architecture combining a .NET 8 Blazor Razor Class Library (RCL) with the analytical depth of Python's SHAP (Shapley Additive exPlanations) to provide real-time, transparency-first decision auditing for financial portfolios.

Interface

Fin-XAI Home Page

image

Fin-XAI Dashboard

image

Architecture

The solution is divided into two primary environments:

  1. Inference Engine (Python / FastAPI): A lightweight API that keeps a Random Forest classifier (trained on the UCI German Credit Dataset) loaded in memory. It calculates dynamic SHAP values on the fly to explain why a specific financial decision or risk score was assigned.
  2. Client Dashboard (FinXAI.Universe NuGet / Blazor): A plug-and-play Razor Class Library containing the data models, HTTP services, and a fully interactive UI component (<FinXaiDashboard />). It uses JS Interop to handle client-side PDF/CSV exports without taxing the server.

Getting Started (Local Development)

To run the full simulator locally, you need both the Python engine and the .NET host running.

1. Start the Python Engine

Ensure Python 3.9+ is installed. Navigate to the FinXAI.Universe/PythonEngine directory.

# Install required ML and API libraries
pip install fastapi uvicorn pandas scikit-learn ucimlrepo shap

# Start the API server on port 7001
python Main.py

2. Run the Blazor Demo App

Open the solution in Visual Studio. Set FinXAI.Demo as the Startup Project and run the application (F5). Navigate to the /finxai route to interact with the dashboard.

Using the NuGet Package

This project is packaged as a reusable Blazor UI library. To add the Explainable AI dashboard to your own .NET 8 application:

1. Install the package:

dotnet add package FinXAI.Universe

2. Register the required HTTP Client in your Program.cs:

builder.Services.AddScoped(sp => new HttpClient());

3. Drop the component into any Razor page:

@using FinXAI.Universe.Components

<FinXaiDashboard ApiBaseUrl="[http://127.0.0.1:7001](http://127.0.0.1:7001)" />

Tech Stack

  • Frontend/UI: .NET 8, Blazor Server, Bootstrap 5, Chart.js (via ChartJs.Blazor)
  • Backend/API: Python, FastAPI, Uvicorn
  • Data Science: Scikit-Learn, SHAP, Pandas, UCI Machine Learning Repository

Author

Yash Saini