Architecture — DocumentationViewer

A runtime documentation viewer for generated API data.

1. Runtime Pages

DMBDocumentationViewer is the runtime half of the documentation system. It reads generated documentation data, exposes MVC routes, renders documentation pages and provides MCP tools for agent-assisted documentation workflows. DocumentationViewer runs inside the ASP.NET Core website and depends on data generated by DocumentationBuilder.

Documentation routes
// Routes exposed by DocumentationViewer
// /Documentation/Index          → documentation home
// /Documentation/ShowGroup      → group page
// /Documentation/ShowNamespace  → namespace page
// /Documentation/ShowObject     → type or member page

2. Navigation Layer

The registered sidebar provider maps documentation structure into navigation items. DocumentationViewer uses BootstrapBuilder shell composers to integrate the sidebar into the host website layout. The sidebar is generated by DocumentationBuilder and registered at application startup.

Sidebar registration
// Register the generated sidebar after documentation generation
using DocumentationBuilders.Documentation;

DocumentationSidebarProvider.Register();

3. MCP Endpoint

DocumentationViewer registers MCP tools for querying documentation and project context through the configured endpoint. This allows connected AI agents to look up API summaries, method signatures, namespace structures and cross-package relationships. The endpoint is mapped by DocumentationViewerConfiguration.UseApp(app) .

MCP endpoint setup
// MCP tools are registered automatically
// Endpoint: configured via DocumentationViewerConfiguration
DocumentationViewerConfiguration.LoadCommonConfig(builder);
DocumentationViewerConfiguration.UseApp(app);
Tech Stack
Backend: .NET 10 / ASP.NET Core
Protocol: MCP (Model Context Protocol)
Architecture: Runtime page rendering
Integration: DocumentationBuilder output

See it in action

Learn how documentation requests flow from route to rendered page and MCP response.

Rendering Pipeline