Facet.Dashboard 5.8.2

dotnet add package Facet.Dashboard --version 5.8.2
                    
NuGet\Install-Package Facet.Dashboard -Version 5.8.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Facet.Dashboard" Version="5.8.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Facet.Dashboard" Version="5.8.2" />
                    
Directory.Packages.props
<PackageReference Include="Facet.Dashboard" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Facet.Dashboard --version 5.8.2
                    
#r "nuget: Facet.Dashboard, 5.8.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Facet.Dashboard@5.8.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Facet.Dashboard&version=5.8.2
                    
Install as a Cake Addin
#tool nuget:?package=Facet.Dashboard&version=5.8.2
                    
Install as a Cake Tool

Facet.Dashboard

A Swagger-like dashboard for visualizing all Facet source types and their generated facets in your application.

Demo

Logout

Features

  • Visual Overview: See all source types and their generated facets at a glance
  • Property Inspection: View source type properties and facet members with type information
  • Feature Indicators: Quickly see which features are enabled (Constructor, Projection, ToSource)
  • Search & Filter: Easily find specific types in large projects
  • Dark Mode: Automatic dark mode support based on system preferences
  • JSON API: Optional JSON endpoint for programmatic access
  • Authentication Support: Optional authentication configuration

Installation

dotnet add package Facet.Dashboard

Quick Start

1. Add the Dashboard to Your Application

using Facet.Dashboard;

var builder = WebApplication.CreateBuilder(args);

// Add Facet Dashboard services
builder.Services.AddFacetDashboard();

var app = builder.Build();

// Map the dashboard endpoint
app.MapFacetDashboard();

app.Run();

2. Navigate to the Dashboard

Open your browser and navigate to:

https://localhost:5001/facets

Configuration

Basic Configuration

builder.Services.AddFacetDashboard(options =>
{
    options.RoutePrefix = "/facets";         // Default: "/facets"
    options.Title = "My API Facets";         // Default: "Facet Dashboard"
    options.AccentColor = "#3b82f6";         // Default: "#6366f1" (Indigo)
    options.DefaultDarkMode = true;          // Default: false (uses system preference)
    options.IncludeSystemAssemblies = false; // Default: false
});

Authentication

builder.Services.AddFacetDashboard(options =>
{
    options.RequireAuthentication = true;
    options.AuthenticationPolicy = "AdminOnly";  // Optional: specific policy
});

Additional Assemblies

By default, the dashboard scans the entry assembly and its references. You can add additional assemblies:

builder.Services.AddFacetDashboard(options =>
{
    options.AdditionalAssemblies.Add(typeof(MyDtoClass).Assembly);
});

Disable JSON API

builder.Services.AddFacetDashboard(options =>
{
    options.EnableJsonApi = false;  // Default: true
});

Theme Customization

builder.Services.AddFacetDashboard(options =>
{
    options.AccentColor = "#3b82f6";      // Custom accent color (blue)
    options.DefaultDarkMode = true;       // Enable dark mode by default
});

Note: If DefaultDarkMode is false (default), the dashboard will respect the user's system preference for dark/light mode.

System Assemblies

builder.Services.AddFacetDashboard(options =>
{
    options.IncludeSystemAssemblies = true;  // Scan Microsoft.* and System.* assemblies
});

Note: By default, system assemblies are excluded from scanning to improve performance and reduce noise. Only enable this if you have custom facets in system assemblies.

Available Endpoints

Endpoint Description
GET /facets HTML dashboard page
GET /facets/api/facets JSON API (if enabled)

JSON API Response

The JSON API returns all facet mappings in a structured format:

[
  {
    "sourceTypeName": "MyApp.Models.User",
    "sourceTypeSimpleName": "User",
    "sourceTypeNamespace": "MyApp.Models",
    "sourceMembers": [
      {
        "name": "Id",
        "typeName": "int",
        "isProperty": true,
        "isNullable": false,
        "isRequired": false,
        "isInitOnly": false,
        "isReadOnly": false,
        "isCollection": false,
        "attributes": ["JsonProperty"]
      }
    ],
    "facets": [
      {
        "facetTypeName": "MyApp.DTOs.UserDto",
        "facetTypeSimpleName": "UserDto",
        "facetTypeNamespace": "MyApp.DTOs",
        "typeKind": "record",
        "hasConstructor": true,
        "hasProjection": true,
        "hasToSource": false,
        "nullableProperties": "Infer",
        "copyAttributes": true,
        "configurationTypeName": null,
        "excludedProperties": ["Password"],
        "includedProperties": null,
        "nestedFacets": [],
        "members": [
          {
            "name": "Id",
            "typeName": "int",
            "isProperty": true,
            "isNullable": false,
            "isRequired": false,
            "isInitOnly": true,
            "isReadOnly": false,
            "isNestedFacet": false,
            "isCollection": false,
            "mappedFromProperty": null,
            "attributes": []
          }
        ]
      }
    ]
  }
]

Dashboard Features

Source Type Cards

Each source type is displayed as an expandable card showing:

  • Type name and namespace
  • Number of facets and properties
  • Click to expand and see details

Source Properties Table

Shows all public properties of the source type with:

  • Property name
  • Type (with friendly names like string, int?, List<T>)
  • Modifiers (Nullable, Required, Init, Collection, Nested Facet)

Facet Cards

Each generated facet shows:

  • Facet name and type kind (class, record, struct)
  • Feature indicators (Constructor, Projection, ToSource)
  • Excluded/Included properties
  • Member count

Use the search bar to filter source types and facets by name.

Example

Given these types in your application:

public class User
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Email { get; set; }
    public string Password { get; set; }
    public List<Order> Orders { get; set; }
}

[Facet(typeof(User), nameof(User.Password))]
public partial record UserDto;

[Facet(typeof(User), Include = new[] { nameof(User.Id), nameof(User.Name) })]
public partial record UserSummaryDto;

The dashboard will show:

  • User source type with 5 properties
  • Two facets: UserDto (excludes Password) and UserSummaryDto (includes only Id, Name)

Requirements

  • .NET 8.0 or later
  • ASP.NET Core application
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.8.2 31 3/5/2026
5.8.1 35 3/4/2026
5.8.0 37 3/4/2026
5.7.0 93 2/24/2026
5.6.5 88 2/22/2026
5.6.4 89 2/20/2026
5.6.3 88 2/19/2026
5.6.2 102 2/15/2026
5.6.1 99 2/13/2026
5.6.0 95 2/12/2026
5.5.3 88 2/12/2026
5.5.2 106 1/29/2026
5.5.1 100 1/28/2026
5.5.0 90 1/27/2026
5.4.4 96 1/27/2026
5.4.3 100 1/23/2026
5.4.2 100 1/22/2026
5.4.1 195 1/13/2026
5.4.0 92 1/12/2026
5.3.3 97 1/12/2026
Loading failed