Facet.Dashboard
6.6.8
dotnet add package Facet.Dashboard --version 6.6.8
NuGet\Install-Package Facet.Dashboard -Version 6.6.8
<PackageReference Include="Facet.Dashboard" Version="6.6.8" />
<PackageVersion Include="Facet.Dashboard" Version="6.6.8" />
<PackageReference Include="Facet.Dashboard" />
paket add Facet.Dashboard --version 6.6.8
#r "nuget: Facet.Dashboard, 6.6.8"
#:package Facet.Dashboard@6.6.8
#addin nuget:?package=Facet.Dashboard&version=6.6.8
#tool nuget:?package=Facet.Dashboard&version=6.6.8
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.6.8)
-
net8.0
- Facet.Attributes (>= 6.6.8)
-
net9.0
- Facet.Attributes (>= 6.6.8)
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.6.8 | 128 | 5/27/2026 |
| 6.6.8-preview.pr389.94 | 0 | 6/10/2026 |
| 6.6.8-preview.pr389.93 | 0 | 6/10/2026 |
| 6.6.8-preview.pr389.92 | 34 | 6/9/2026 |
| 6.6.7 | 100 | 5/26/2026 |
| 6.6.7-preview.pr386.87 | 58 | 5/27/2026 |
| 6.6.6 | 85 | 5/25/2026 |
| 6.6.6-preview.pr385.86 | 46 | 5/26/2026 |
| 6.6.6-preview.pr385.85 | 46 | 5/26/2026 |
| 6.6.6-preview.pr385.84 | 48 | 5/26/2026 |
| 6.6.5 | 97 | 5/23/2026 |
| 6.6.5-preview.pr384.83 | 49 | 5/25/2026 |
| 6.6.5-preview.pr384.82 | 56 | 5/25/2026 |
| 6.6.4 | 98 | 5/23/2026 |
| 6.6.4-preview.pr383.80 | 52 | 5/23/2026 |
| 6.6.3 | 98 | 5/22/2026 |
| 6.6.3-preview.pr382.79 | 53 | 5/22/2026 |
| 6.6.3-preview.pr382.78 | 49 | 5/22/2026 |
| 6.6.3-preview.pr382.77 | 47 | 5/22/2026 |
| 6.6.2-preview.pr380.76 | 49 | 5/21/2026 |