Mostlylucid.BotDetection.UI 8.15.0

dotnet add package Mostlylucid.BotDetection.UI --version 8.15.0
                    
NuGet\Install-Package Mostlylucid.BotDetection.UI -Version 8.15.0
                    
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="Mostlylucid.BotDetection.UI" Version="8.15.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mostlylucid.BotDetection.UI" Version="8.15.0" />
                    
Directory.Packages.props
<PackageReference Include="Mostlylucid.BotDetection.UI" />
                    
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 Mostlylucid.BotDetection.UI --version 8.15.0
                    
#r "nuget: Mostlylucid.BotDetection.UI, 8.15.0"
                    
#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 Mostlylucid.BotDetection.UI@8.15.0
                    
#: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=Mostlylucid.BotDetection.UI&version=8.15.0
                    
Install as a Cake Addin
#tool nuget:?package=Mostlylucid.BotDetection.UI&version=8.15.0
                    
Install as a Cake Tool

Mostlylucid.BotDetection.UI

Real-time bot-detection dashboard + embeddable widgets for ASP.NET Core. The dashboard for the StyloBot detection engine (Mostlylucid.BotDetection): Traffic / Visitors / Site / Policies / Configuration, live SignalR updates, behavioural radar charts, a world threat map, Leiden cluster visualisation, and a policy-stack editor.

NuGet GitHub


Install

dotnet add package Mostlylucid.BotDetection.UI

The package depends on Mostlylucid.BotDetection (detection core) and Mostlylucid.BotDetection.OpenApi (the Routes tab's API catalog) — both resolve automatically.

Optional packs (install separately; the dashboard works without them):

  • Mostlylucid.BotDetection.PrometheusPack — adds the meter-health tile + metrics surface to the overview.

Quick start

var builder = WebApplication.CreateBuilder(args);

// Detection core + the real-time dashboard, correct middleware ordering.
builder.Services.AddBotDetection();                    // or AddStyloBot(dashboard => …)
builder.Services.AddStyloBotDashboard(builder.Configuration, options =>
{
    options.BasePath = "/stylobot";
    options.AllowUnauthenticatedAccess = true;          // dev only — gate this in production
});

// Optional: the Prometheus pack adds its meter-health tile.
builder.Services.AddPrometheusPack(opt => opt.Mode = PrometheusPackMode.Local);

var app = builder.Build();
app.UseRouting();
app.UseStyloBot();   // broadcast → detection → dashboard
app.Run();

The dashboard is served at {BasePath}/traffic (landing), /visitors, /site, /policies, /configuration.

API-backed Traffic pilot

Set UseApiTraffic = true to replace only the Traffic page with the simpler MVC/HTMX/Alpine implementation. It reads GET /api/v1/dashboard/traffic from the backend API. The API owns SQLite; the remote viewer owns no database. The other pages and optional packs keep their existing behavior. The pilot is a standalone page rather than an embeddable fragment.

Register the remote source before the dashboard so the pilot inherits its backend URL and server-side API key:

builder.Services.AddStyloBotDashboardRemote(new DashboardSourceOptions
{
    Pull = new()
    {
        Type = DashboardSourceType.Rest,
        Url = "https://your-backend.example/",
        ApiKey = builder.Configuration["DashboardSourceKey"]
    }
});
builder.Services.AddStyloBotDashboard(options =>
{
    options.BasePath = "/stylobot";
    options.UseApiTraffic = true;
    options.Auth.Mode = DashboardAuthMode.Login;
    options.Auth.Username = "admin";
    options.Auth.PasswordHash = builder.Configuration["DashboardPasswordHash"];
});

Use the existing dashboard login/policy configuration. For custom remote hosts, call app.UseStaticFiles(), app.UseRouting(), app.UseMiddleware<StyloBotDashboardMiddleware>(), then app.MapStyloBotDashboardPages(). UseStyloBot() maps the pilot automatically. stylobot-ui also maps it automatically; enable StyloBot:Dashboard:UseApiTraffic in configuration. Local or separately configured hosts can supply TrafficApiUrl and TrafficApiKey explicitly. TrafficApiTimeoutSeconds defaults to 10 and must be 1–120. Configuration changes require a restart.

The API requires the same X-SB-Api-Key authorization as the existing API. Query parameters are window (1h/6h/12h/24h/7d/30d/custom), optional ISO 8601 from/to for custom windows, repeated domain, includeInternal and limit (1–200). Windows are at most 30 days; all slices use the same window, domain and audience filters. Invalid queries return 400, storage failures return redacted 503 Problem Details with a trace reference, and successful empty windows return 200. Responses are not cached.

Apply refreshes the page through HTMX; browser history and ordinary GET navigation work without a separate client data store. A failed refresh preserves the last rendered snapshot and labels it stale. Initial failures display unavailable rather than zero counters. Automatic live refresh and migration of the remaining pages are subsequent steps.

For a local browser/outage harness:

dotnet run --project scripts/dashboard-harness/DashboardHarness.csproj -c Release
# Open http://127.0.0.1:5078/ops/traffic (3 seeded requests)
curl -X POST http://127.0.0.1:5078/harness/outage/true
# Apply: last successful data stays visible with a warning.
curl -X POST http://127.0.0.1:5078/harness/outage/false
# Apply: successful data replaces the stale view and clears the warning.

With Playwright CLI available, run playwright-cli open http://127.0.0.1:5078/ops/traffic, then playwright-cli run-code --filename scripts/dashboard-harness/browser-check.js to exercise filtering, Alpine, outage retention/recovery, network failure and history.

The harness binds to loopback, uses a temporary backend SQLite database and removes it on shutdown. Integration coverage lives in ApiTrafficReliabilityTests, TrafficApiClientTests and DashboardAssemblyBoundaryTests; the package consumer gate additionally proves an API-only publish has no UI assembly.

Persistence/options types retain their existing namespaces and are forwarded from the UI assembly. Reflection code that locates Razor views should use typeof(IDashboardPack).Assembly, not a persistence model's owning assembly. New backend-only integrations can reference Dashboard.Data; DTO-only consumers can reference Dashboard.Contracts without ASP.NET or the detection engine.

Remaining migration

  1. Give Visitors and Site their own bounded API snapshots and compare their results with the existing durable queries before enabling each page.
  2. Move Policies and Configuration reads and writes to explicit API contracts, preserving authorization and CSRF protection. Keep credentials on the server.
  3. Add one live refresh trigger with cancellation and coalescing; refresh HTML through HTMX rather than maintaining a second client data model. Preserve the last good view during outages.
  4. Measure request count, query latency and rendered parity, then enable each page by default. Remove legacy rendering/materialization only when its replacement passes the same fixtures, package and browser gates. Keep public type forwarding for compatible releases.

Embeddable widgets

The package ships Tag Helpers and View Components to embed detection results in your own views:

  • <sb-badge>, <sb-confidence>, <sb-gate>, <sb-honeypot>, <sb-human>, <sb-risk>, <sb-signal>, <sb-summary> Tag Helpers
  • View Components for visitor lists, endpoint stats, policy stacks and more

Runtime dependencies

The dashboard persists to SQLite (zero-dependency, FOSS) and requires no external services. At composition time AddStyloBotDashboard validates that its required pack assemblies are present and fails fast with an actionable message if one is missing.

Full documentation

License

AGPL-3.0-only. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET 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 (2)

Showing the top 2 NuGet packages that depend on Mostlylucid.BotDetection.UI:

Package Downloads
Mostlylucid.BotDetection.UI.PostgreSQL

PostgreSQL storage provider for Stylobot Dashboard with GIN-indexed signature search, TimescaleDB time-series optimizations, and pgvector ML-based similarity search using Dapper

Mostlylucid.BotDetection.PrometheusPack

Meter ingest + summary surface for the Stylobot FOSS dashboard. Ships IMeterStream + LocalMeterStream (MeterListener) + RemoteMeterStream (Prometheus text scrape) + the shared LFU MeterSummaryAtom storage, plus the dashboard's meter-health tile (IPackHealthSummaryProvider seam). Read-only data plane; signal-emission hook for blackboard adapters. No write surfaces. Optional add-on pack -- the dashboard UI does not depend on it.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.15.0 85 10/17/2026
8.14.2 89 10/17/2026
8.14.1 87 10/17/2026
8.14.0 160 9/12/2026
8.12.1 206 8/26/2026
8.12.0 152 8/26/2026
8.11.3 125 8/26/2026
8.11.2 136 8/26/2026
8.11.1 131 8/26/2026
8.10.0 197 8/16/2026
8.9.4 136 8/16/2026
8.9.3 175 8/14/2026
8.9.1 169 8/12/2026
8.9.0 137 8/12/2026
8.8.2 120 8/12/2026
8.8.1 148 8/10/2026
8.7.0 207 8/4/2026
8.6.0 205 8/1/2026
8.5.4 149 7/27/2026
8.5.1 134 7/26/2026
Loading failed