- Home
- /
- Documentation
- /
- DMBDocumentationViewer
- /
- Architecture
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.
// Routes exposed by DocumentationViewer
// /Documentation/Index → documentation home
// /Documentation/ShowGroup → group page
// /Documentation/ShowNamespace → namespace page
// /Documentation/ShowObject → type or member page2. 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.
// 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 tools are registered automatically
// Endpoint: configured via DocumentationViewerConfiguration
DocumentationViewerConfiguration.LoadCommonConfig(builder);
DocumentationViewerConfiguration.UseApp(app);Tech Stack
See it in action
Learn how documentation requests flow from route to rendered page and MCP response.
Rendering Pipeline