Dashboard Integration
AspireC4 integrates with the Aspire dashboard so the diagram is easy to reach and links back to resource telemetry.
The sidecar resource
Section titled “The sidecar resource”AddAspireC4() creates an aspirec4 resource (name configurable via the name parameter) of container type. Its state, URLs, and properties are forwarded from the inner LikeC4 server resource, which is always kept hidden. The dashboard shows:
- A View LikeC4 Diagram URL on the resource, opening
/view/index(or theDefaultViewId). - The LikeC4 Version property, resolved from the pinned tag or the startup version check.
- The server’s console logs, relayed onto the outer resource’s Console tab.
Grouping multiple diagrams
Section titled “Grouping multiple diagrams”With only the architecture diagram registered, aspirec4 is a single flat row. Registering a second diagram — WithEntityFrameworkDiagram() — nests both under a shared parent that takes over the aspirec4 name:
aspirec4 # parent row, added only when there is more than one diagram├── aspirec4-likec4 # the architecture diagram, renamed as it is nested└── aspirec4-er # the ER diagram, with its own sidecar nested beneath itThe parent runs nothing; it exists so the diagrams read as one feature rather than unrelated rows. It is not created when there is only one diagram to show, including when HideFromDashboard was set in the AddAspireC4() callback — a parent with one child is just an extra click.
The grouping decision is made when the builder runs. Setting HideFromDashboard through configuration rather than the callback therefore leaves the parent in place.
Grouping and the -likec4 rename arrived in 13.6. WithLegacyLayout() keeps the flat aspirec4 / aspirec4-er pair for an upgrade that changes nothing — see Migration.
Hiding the sidecar
Section titled “Hiding the sidecar”When HideFromDashboard is set (via WithHideFromDashboard(displayName)), the aspirec4 resource is also hidden and the diagram is instead surfaced on every project resource as:
- A link (
architecture-diagram) injected into the project resource’s URLs once the server is running. - A command (
likec4-architecture-diagram) that opens the diagram. The command is disabled until the LikeC4 server isRunning.
DashboardLinkDisplayName controls the label shown (default Architecture Diagram).
Dashboard links on diagram elements
Section titled “Dashboard links on diagram elements”IncludeAspireDashboardLinks (default true) adds links from each LikeC4 element back to the Aspire dashboard’s console logs and structured logs pages for that resource. This requires AutoIncludeAspireMetadata to include Links (the default All includes it). The links are constructed at runtime once the dashboard URL is discovered.
Security: browser tokens in links
Section titled “Security: browser tokens in links”IncludeAspireTokenInDashboardLinks (default false) embeds the Aspire browser token in those dashboard links so the browser is authenticated when the link is clicked (/login?t=…&returnUrl=…).
View selection
Section titled “View selection”The dashboard link opens /view/{DefaultViewId} (index by default — the ID of the auto-generated view). Set DefaultViewId to null/empty to link to the server root instead, which is useful when you prefer the LikeC4 server’s own landing page. If you change GeneratedViewId in the generated file, set DefaultViewId to the same value so the dashboard link still opens the correct diagram.
Hot Module Replacement
Section titled “Hot Module Replacement”HMR keeps the diagram up to date in the browser as the file regenerates. The HMR endpoint is exposed in the dashboard (details view) and, on Windows/Docker Desktop, CHOKIDAR_USEPOLLING/CHOKIDAR_INTERVAL environment variables are set on the container so file changes are detected via polling. Disable HMR with WithHMRDisabled(). See Configuration for HMRPort behavior across LikeC4 versions.