🧭 HubDocs is a developer-friendly UI tool like Swagger, but for SignalR hubs — auto-discover your hubs, explore methods, invoke calls, and preview live client messages.
https://hubdocs.mberrishdev.me/
HubDocs is a powerful tool for exploring and documenting SignalR hubs in your ASP.NET Core applications. It provides a beautiful, Swagger-like UI that automatically discovers and displays all your SignalR hubs and their methods.
- 🔍 Automatic Hub Discovery: Automatically finds all SignalR hubs in your application
- 📝 Method Documentation: Shows method signatures, parameters, and return types
- 🎨 Beautiful UI: Swagger-inspired dark theme interface
- 🔌 Easy Integration: Simple setup with just a few lines of code
- 📦 NuGet Package: Easy to install and use in any ASP.NET Core project
- 📡 Live Client Logging: Displays real-time messages sent from server to clients via strongly-typed interfaces
The HubDocs UI in action — exploring hubs, invoking methods, and seeing real-time client logs.
🔍 Interactive method parameter inputs with \"Try it\" support
📡 Live client method logging with JSON preview
📭 No methods found — HubDocs will show helpful instructions if a hub is registered without a route.
- A dashboard of all registered hubs
- Parameter-aware “Try It” method testers
- Strongly-typed client method preview with JSON payloads
- Live server → client message tracking
dotnet add package HubDocs
- Add HubDocs to your ASP.NET Core application:
using HubDocs;
var builder = WebApplication.CreateBuilder(args);
// ... your other configurations ...
var app = builder.Build();
//Configure and register hub
// Required for HubDocs - registers your hub and makes it discoverable
app.MapHubAndRegister<YourHub>("/hub");
// Configure HubDocs middleware
app.AddHubDocs();
// ... your other middleware configurations ...
- Access the HubDocs UI at
/hubdocs/index.html
or/hubdocs/
in your browser.
public interface IChatClient
{
Task ReceiveMessage(string user, string message);
Task Connected(string connectionId);
}
public class ChatHub : Hub<IChatClient>
{
public async Task SendMessage(string user, string message)
{
await Clients.All.ReceiveMessage(user, message);
}
public override async Task OnConnectedAsync()
{
await Clients.Caller.Connected(Context.ConnectionId);
}
}
Note: To fully leverage HubDocs, your hubs should implement
Hub<T>
with a strongly-typed client interface (T
) that defines the client-callable methods. HubDocs will automatically extract and render both hub and client method metadata in the UI.
HubDocs will automatically discover this hub and display:
- The hub name and full type name
- All public methods with their parameters and return types
- A beautiful, interactive UI to explore the hub
HubDocs is designed to work out of the box with minimal configuration. However, you can customize it by passing specific assemblies to scan:
app.MapHubAndRegister<ChatHub>("/hubs/chat");
app.AddHubDocs();
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Swagger UI
- Built with ASP.NET Core
- Uses Tailwind CSS for styling
If you find a bug or have a feature request, please open an issue.
- Mikheil Berishvili - mberrishdev
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request