Skip to content
Reference Platforms

Platforms

Where Klyroo.Hotkey runs, what its project file declares, how Blazor and .NET MAUI apps connect to it, and how it behaves under trimming and NativeAOT.

On this page

What the csproj file declares

Property Klyroo.Hotkey
Target framework net11.0
IsAotCompatible true
IsTrimmable true
SupportedPlatform none declared (plain .NET 11 class library)
Dependencies Microsoft.Extensions.Http (11.0.0)

The project builds with TreatWarningsAsErrors = true, and passes both EnableAotAnalyzer=true and EnableTrimAnalyzer=true with zero warnings. AddKlyrooHotkey configures a hardened SocketsHttpHandler (AllowAutoRedirect = false, UseCookies = false, AutomaticDecompression = DecompressionMethods.All including .NET 11 Zstandard, ConnectTimeout = 10s, PooledConnectionLifetime = 2m, MaxResponseHeadersLength = 32 KB).

Server-side hosting model

Klyroo.Hotkey is a server-side library. It requires a Hotkey API key (Bearer token) and, for webhooks, a webhook signing secret. Run it in:

  • An ASP.NET Core backend or minimal API
  • The server project of a Blazor Web App (Static SSR, Interactive Server, WebAssembly or Auto)
  • A .NET background worker, queue consumer, or console service

Do not register AddKlyrooHotkey or embed API keys in a Blazor WebAssembly .Client project or inside a .NET MAUI client binary.

Connecting Blazor and .NET MAUI frontends

App model Where Klyroo.Hotkey runs What the frontend receives
Blazor Static SSR / Interactive Server Server project (Program.cs) Workflow status, authorized handoff link or short-lived embed URL for the signed-in user
Blazor WebAssembly / Auto Server project only (never .Client) Responses from your authenticated backend API endpoints
.NET MAUI Blazor Hybrid Your backend API Status and authorized links/embeds over HTTPS from your backend
Native .NET MAUI Your backend API Status and authorized links/embeds over HTTPS from your backend

Because Klyroo.Hotkey has no dependency on Razor, Blazor or MAUI, one backend API serves every Klyroo frontend.

NativeAOT and trimming

Klyroo.Hotkey declares IsAotCompatible = true and IsTrimmable = true. Every request and response contract is serialized through a compile-time System.Text.Json source-generated context (HotkeyJsonContext), with zero runtime reflection.

A server service or CLI worker using Klyroo.Hotkey can be published with NativeAOT or full trimming:

Shell
dotnet publish -c Release -p:PublishAot=true

When deploying in a NativeAOT or trimmed ASP.NET Core minimal API, also use a source-generated JsonSerializerContext for your own endpoint DTOs (such as the JSON response your /api/portal/handoff endpoint returns to clients).