DOCUMENTATION: Add interactive solution dependency graph - #25
Merged
Conversation
Self-contained graph of the solution scanned from source: project boundaries, per-component method blocks and colour-coded flows across 27 components and 84 edges. index.html carries two views behind one toggle - single copy (default, every component drawn once with all consumers converging on it) and per consumer (dependencies duplicated per caller, each copy showing only the rows that caller uses). Clicking a header or a method row traces the full upstream and downstream slice. All data lives in graph-data.js.
Copies Documentation/DependencyGraph to the Pages artifact on pushes to main that touch it. The graph is static - no npm, no bundler, no build. Hand-authored rather than generated from the Infrastructure project: the Pages actions fall outside ADotNet 4.1.0's task model. Pages must also be enabled once under Settings - Pages with source set to GitHub Actions.
Re-scans the solution, diffs against graph-data.js and re-verifies the rendered graph, so the snapshot can be refreshed when clients, services, brokers or wiring change. Referenced from the graph README.
There was a problem hiding this comment.
Pull request overview
Adds a self-contained, interactive solution dependency graph (HTML renderer + data snapshot + usage docs) and publishes it via GitHub Pages so the architecture can be browsed without building the repo.
Changes:
- Added an interactive SVG-based dependency graph renderer with single-copy and per-consumer (duplicated) views.
- Added a scanned snapshot data model (
graph-data.js) plus a README explaining how to interpret and refresh the graph. - Added a GitHub Pages workflow to publish the graph folder on pushes to
main, plus a Claude skill doc for refreshing the snapshot.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Documentation/DependencyGraph/README.md | Documents how to read the dependency graph and how to refresh it. |
| Documentation/DependencyGraph/index.html | Self-contained renderer (UI + layout + interactions) that reads window.APIPLATFORM_DATA. |
| Documentation/DependencyGraph/graph-data.js | Snapshot of components/edges/projects used by the renderer. |
| .github/workflows/pages.yml | Publishes the dependency graph folder to GitHub Pages on changes. |
| .claude/skills/update-dependency-graph/SKILL.md | Procedure for rescanning the solution and regenerating graph-data.js. |
Suppressed comments (1)
.github/workflows/pages.yml:59
- Same indentation issue in the deploy job: the list item under
steps:must be indented, otherwise the workflow won’t parse.
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+3
to
+8
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - Documentation/DependencyGraph/** | ||
| - .github/workflows/pages.yml |
Comment on lines
+34
to
+47
| steps: | ||
| - name: Check out | ||
| uses: actions/checkout@v4 | ||
| - name: Stage the dependency graph | ||
| run: | | ||
| mkdir -p dist | ||
| cp Documentation/DependencyGraph/index.html dist/ | ||
| cp Documentation/DependencyGraph/graph-data.js dist/ | ||
| - name: Configure Pages | ||
| uses: actions/configure-pages@v5 | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #24
Summary
Lifts the dependency graph from
LondonFhirService#176
into this repo and re-scans it against this solution. Documentation and CI
only — no production code changes.
The renderer is carried over unchanged apart from branding and the data
global (
window.APIPLATFORM_DATA);graph-data.jsis written from scratchfor this codebase: 27 components and 84 edges across the SDK, the AspNetCore
companion package, the Infrastructure generator and the external surfaces the
solution actually calls.
What's included
Documentation/DependencyGraph/index.html— the renderer, carrying twoviews behind one toggle:
method surface, all consumers converging on it. Best for who touches
this?
only the method rows that caller uses. Best for what does this one call
path do?
Clicking a component header or a single method row traces the full upstream
and downstream slice and dims everything else; the selection is outlined in
amber. Search, a utility-broker toggle, and pan/zoom are included. The view
is reflected in the URL (
#single/#duplicated) so links are shareable.graph-data.js— all data (window.APIPLATFORM_DATA).README.md— how to read the graph, the modelling decisions behind it,and the current truths the scan captured.
.github/workflows/pages.yml— publishes the folder to GitHub Pages onpushes to
mainthat touch it..claude/skills/update-dependency-graph/SKILL.md— refreshes thesnapshot: re-scans the solution, diffs against
graph-data.js, andre-verifies the rendered graph.
Notable things the scan surfaced
Recorded in the graph README rather than changed here — each is worth a
separate decision:
ApiPlatformClientFacadeis dead code. An internalIApiPlatformClientholding the same two sub-clients, but nothing constructs or registers it —
AddApiPlatformSdkCoreregisters a hand-builtApiPlatformClientinstead.It appears on the graph with no inbound flows.
PdsOrchestrationServiceinjectsIApiPlatformTokenBrokerand nevercalls it — the access token comes from
CareIdentityService.GetAccessTokenAsync.ISL.Providers.PDS.*package references are unused — no.csfile mentionsAbstractions,FakeFHIRorFHIR; the PDS call ishand-rolled over
IHttpBroker.TryAdd, so ordering decideswhether a web host gets the session brokers or the process-wide in-memory
singletons —
AddApiPlatformSdkAspNetCore()has to come beforeAddApiPlatformSdkInMemoryStorage().GetAccessTokenAsyncreturns an empty string rather than throwing whenboth tokens have expired; the orchestration is what turns that into
UnauthorizedPdsOrchestrationException.PdsServicereturns raw FHIRJSON, and the
Patient/Address/PatientLookupmodels are unused.JsonBroker.Serializehas no callers.ReactApp1.Serverandreactapp1.clientare empty scaffolding (no sourcefiles, not in the
.slnx), so they are not modelled.Validation
copy) and 100 nodes · 413 flows (per consumer); 27 · 84 and 113 · 441 with
utility brokers on.
both off and on.
processing service and a shared broker interface.
Note on
pages.ymlbuild.ymlandprLinter.ymlin this repo are generated byNHSDigital.ApiPlatform.Infrastructure.pages.ymlis hand-authored —the GitHub Pages actions fall outside ADotNet 4.1.0's task model. Regenerating
the other two will not touch it; there is a comment in the file saying so. If
you would rather it were generated, that is a follow-up on
ScriptGenerationService.Before merge
GitHub Pages needs enabling once under Settings → Pages with the source
set to GitHub Actions, otherwise the deploy job will fail on the first
run after merge.