HtmlReportGenerator
Generates the self-contained Aalekh HTML interactive report.
The output is a single .html file with:
D3.js v7 force-directed graph inlined into a
<script>tag from the bundledd3.min.jsresource - no CDN, no network request when the report is openedAll graph data injected inline as typed
<script type="application/json">tagsSystem font stack; no Google Fonts dependency
Zero runtime server, zero external dependencies once the file is generated
Data injection
The template contains a stable HTML comment marker:
<!-- DATA INJECTED BY KOTLIN GENERATOR BEFORE THIS SCRIPT TAG -->The generator replaces this marker with the two JSON <script> data tags, then the marker itself is removed. This approach is robust to any whitespace or formatting changes inside the template's JavaScript - it only depends on one unique HTML comment, not on matching JS source text.
D3 inlining
The placeholder {{D3_INLINE}} is substituted with the contents of the bundled d3.min.js resource so the resulting HTML works offline. Update D3 by replacing aalekh-report/src/main/resources/d3.min.js.
Functions
Generates the full HTML string for the interactive dependency report.