Facet.Dashboard
6.4.4
dotnet add package Facet.Dashboard --version 6.4.4
NuGet\Install-Package Facet.Dashboard -Version 6.4.4
<PackageReference Include="Facet.Dashboard" Version="6.4.4" />
<PackageVersion Include="Facet.Dashboard" Version="6.4.4" />
<PackageReference Include="Facet.Dashboard" />
paket add Facet.Dashboard --version 6.4.4
#r "nuget: Facet.Dashboard, 6.4.4"
#:package Facet.Dashboard@6.4.4
#addin nuget:?package=Facet.Dashboard&version=6.4.4
#tool nuget:?package=Facet.Dashboard&version=6.4.4
Facet.Dashboard
A Swagger-like dashboard for visualizing all Facet source types and their generated facets in your application.
Demo
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
Search
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) andUserSummaryDto(includes only Id, Name)
Requirements
- .NET 8.0 or later
- ASP.NET Core application
Related Packages
- Facet - Core source generator
- Facet.Extensions - Mapping extension methods
- Facet.Extensions.EFCore - Entity Framework Core support
| Product | Versions 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. |
-
net10.0
- Facet.Attributes (>= 6.4.4)
-
net8.0
- Facet.Attributes (>= 6.4.4)
-
net9.0
- Facet.Attributes (>= 6.4.4)
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 |
|---|---|---|
| 6.4.4 | 38 | 4/28/2026 |
| 6.4.4-preview.pr357.31 | 0 | 4/30/2026 |
| 6.4.3 | 64 | 4/27/2026 |
| 6.4.3-preview.pr355.30 | 38 | 4/28/2026 |
| 6.4.2 | 85 | 4/26/2026 |
| 6.4.1 | 84 | 4/25/2026 |
| 6.4.0 | 103 | 4/21/2026 |
| 6.3.4 | 91 | 4/17/2026 |
| 6.3.4-preview.pr350.26 | 51 | 4/25/2026 |
| 6.3.4-preview.pr350.25 | 42 | 4/24/2026 |
| 6.3.4-preview.pr350.24 | 40 | 4/24/2026 |
| 6.3.4-preview.pr350.23 | 47 | 4/23/2026 |
| 6.3.4-preview.pr350.22 | 45 | 4/22/2026 |
| 6.3.4-preview.pr345.21 | 42 | 4/21/2026 |
| 6.3.4-preview.pr345.20 | 40 | 4/21/2026 |
| 6.3.4-preview.pr345.19 | 54 | 4/21/2026 |
| 6.3.4-preview.pr345.18 | 42 | 4/20/2026 |
| 6.3.4-preview.pr345.13 | 48 | 4/19/2026 |
| 6.3.4-preview.pr345.10 | 41 | 4/19/2026 |
| 6.3.3-preview.pr344.8 | 47 | 4/17/2026 |