Lgd.Yarp.Studio
1.0.0
See the version list below for details.
dotnet add package Lgd.Yarp.Studio --version 1.0.0
NuGet\Install-Package Lgd.Yarp.Studio -Version 1.0.0
<PackageReference Include="Lgd.Yarp.Studio" Version="1.0.0" />
<PackageVersion Include="Lgd.Yarp.Studio" Version="1.0.0" />
<PackageReference Include="Lgd.Yarp.Studio" />
paket add Lgd.Yarp.Studio --version 1.0.0
#r "nuget: Lgd.Yarp.Studio, 1.0.0"
#:package Lgd.Yarp.Studio@1.0.0
#addin nuget:?package=Lgd.Yarp.Studio&version=1.0.0
#tool nuget:?package=Lgd.Yarp.Studio&version=1.0.0
YARP Studio
A modern, visual administrative dashboard and designer for YARP (Yet Another Reverse Proxy). YARP Studio allows developers and administrators to design, manage, and monitor reverse proxy configurations (routes, clusters, destinations) dynamically through a web interface, persisting changes to a lightweight embedded database with zero-downtime hot-reloads.
๐๏ธ Architecture Overview
YARP Studio is comprised of a backend engine library (Yarp.Studio.Core), an example host/gateway application (Playground.Gateway), and a frontend dashboard UI (yarp-studio-ui).
graph TD
User([Administrator]) <--> |Manages UI| UI[yarp-studio-ui React SPA]
subgraph Playground.Gateway [Your Gateway Host App]
UI <--> |HTTP API /yarp-designer/api| API[VisualDesignerApplicationExtensions Middleware]
API <--> |Reads/Writes Config| Provider[VisualProxyConfigProvider]
Provider <--> |Signals Hot-Reload| MemoryConfig[VisualMemoryConfig]
Provider <--> |Reads/Writes DB| LiteDB[(LiteDB: yarp-studio.db)]
MemoryConfig <--> |Injects Live Config| YARP[YARP Reverse Proxy Engine]
end
YARP <--> |Proxies Traffic| Downstream[Downstream Services]
Core Architecture Components
- Backend Engine (
Yarp.Studio.Core):VisualProxyConfigProvider: Custom implementation of YARP'sIProxyConfigProvider. Loads proxy state from LiteDB on startup and signals change tokens to swap configuration dynamically at runtime.VisualMemoryConfig: Represents the live in-memoryIProxyConfigbeing actively evaluated by YARP.UseYarpVisualDashboardMiddleware: Exposes configuration, validation, and status APIs, serving the React UI directly from embedded assets in production or forwarding requests to Vite in development.
- Frontend UI (
yarp-studio-ui):- Built with React 19, Vite, TypeScript, shadcn/ui, and Tailwind CSS.
- Accessible, high-fidelity dashboard for visual proxy engineering.
- Storage Engine (
LiteDB):- Uses a serverless, embedded NoSQL database (
yarp-studio.db) for lightweight, single-file persistence of proxy configurations across restarts.
- Uses a serverless, embedded NoSQL database (
โจ Features
- ๐ Live Topology Visualizer: A complete visual representation of your proxy routing pathways. Instantly trace traffic flow from public endpoints (routes) through authentication, CORS, and request/path transforms, to the target backend clusters. Hover over a route to inspect its active pipeline stages in real-time.
- ๐ฃ๏ธ Route Builder & Editor: Define routing matchers (paths, methods, host headers), configure policies (Authorization, CORS), add powerful path/header transforms, and map routes to backend clusters.
- ๐ฅ๏ธ Cluster & Destination Manager: Configure target destination server pools, load-balancing policies (RoundRobin, PowerOfTwoChoices, LeastRequests, Random, First), active/passive health checks, and manage destination addresses. Real-time active status reporting updates the visual dashboard when destinations go online/offline.
- ๐งช Routing Playground: Test and dry-run routes directly in the web UI. Enter simulated request parameters (HTTP Method, Path, Host Header) to run routing traces, verifying which route is matched, which transformations are executed, and which backend destinations receive the traffic.
- โก Hot-Reload Integration: Config saves run built-in YARP validation checks first. Once validated, configuration changes apply immediately to live traffic pipelines without requiring application restarts.
๐ Getting Started
1. Installation
Install the NuGet package to your ASP.NET Core gateway host project:
dotnet add package Yarp.Studio.Core
2. Configure Services & Middleware
Register YARP Studio in your Program.cs file:
using Yarp.Studio.Core.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Add YARP and integrate YARP Studio configuration provider
builder.Services.AddReverseProxy()
.AddYarpStudio();
var app = builder.Build();
app.UseHttpsRedirection();
// Map visual designer dashboard REST APIs and UI files
// By default, the UI is served at `/yarp-designer`
app.UseYarpVisualDashboard();
// Map active proxy routes
app.MapReverseProxy();
app.Run();
3. Run and Access Dashboard
Start your gateway application and navigate to:
http://localhost:<port>/yarp-designer
The application will automatically create the embedded yarp-studio.db database in your runtime directory and launch the dashboard.
๐ ๏ธ Local Development
To run, inspect, or build YARP Studio from source code:
Prerequisites
- .NET 10.0 SDK or higher
- Node.js (v18+) and npm
Step-by-Step Running Guide
1. Start the React Frontend Dev Server
Navigate to the UI project directory, install packages, and boot Vite's dev server:
cd yarp-studio-ui/yarp-studio-ui
npm install
npm run dev
By default, the Vite dev server spins up at http://localhost:5173.
2. Run the Gateway Host (Backend)
Open a new terminal session, navigate to the gateway host app, and run it:
cd Playground.Gateway
dotnet run
Open https://localhost:<port>/yarp-designer in your browser.
In Development Mode, the ASP.NET Core middleware detects that the Vite dev server is running on port 5173 and automatically forwards all UI static resource requests to it. API requests are routed straight into the local .NET backend.
| Product | Versions 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. |
-
net10.0
- LiteDB (>= 5.0.21)
- Microsoft.AspNetCore.SpaServices.Extensions (>= 10.0.8)
- Yarp.ReverseProxy (>= 2.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.