Skip to content

Commit 870f996

Browse files
committed
docs: add screenshots to README (galaxy, module, forces views)
Playwright screenshot script captures 3 views against any codebase.
1 parent fd12a9d commit 870f996

7 files changed

Lines changed: 78 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
3D interactive codebase visualization for TypeScript projects. Parses your codebase, builds a dependency graph, computes architectural metrics, and serves an interactive 3D map in your browser. Also works as an MCP server for LLM-assisted code understanding.
44

5+
## Screenshots
6+
7+
Galaxy view — 3D force-directed graph with module clouds and group legend:
8+
9+
![Galaxy View](docs/screenshot-galaxy.png)
10+
11+
Module view — files clustered by directory with labeled cloud spheres:
12+
13+
![Module View](docs/screenshot-module.png)
14+
15+
Forces view — centrifuge analysis showing tension, bridges, and extraction candidates:
16+
17+
![Forces View](docs/screenshot-forces.png)
18+
519
## Install
620

721
```bash

docs/screenshot-forces.png

502 KB
Loading

docs/screenshot-galaxy.png

454 KB
Loading

docs/screenshot-module.png

519 KB
Loading

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"@types/react-dom": "^19.2.3",
6666
"@types/three": "^0.182.0",
6767
"eslint": "^10.0.0",
68+
"playwright": "^1.58.2",
6869
"tailwindcss": "^4.2.0",
6970
"tsx": "^4.21.0",
7071
"typescript-eslint": "^8.56.0",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/screenshot.mjs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { chromium } from "playwright";
2+
3+
const port = process.argv[2] || "3380";
4+
const outDir = process.argv[3] || "docs";
5+
6+
console.log(`Connecting to http://localhost:${port}...`);
7+
const browser = await chromium.launch({ headless: true });
8+
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
9+
10+
await page.goto(`http://localhost:${port}`, { waitUntil: "networkidle" });
11+
12+
// Wait for 3D graph to render (force-graph needs time to stabilize)
13+
console.log("Waiting for graph to render...");
14+
await page.waitForTimeout(8000);
15+
16+
// Check for console errors
17+
page.on("console", (msg) => {
18+
if (msg.type() === "error") console.error(`[BROWSER] ${msg.text()}`);
19+
});
20+
21+
// Debug: check what's visible on page
22+
const legendVisible = await page.locator(".fixed.bottom-4.left-4").isVisible().catch(() => false);
23+
console.log(`Legend visible: ${legendVisible}`);
24+
25+
const legendHTML = await page.locator(".fixed.bottom-4.left-4").innerHTML().catch(() => "NOT FOUND");
26+
console.log(`Legend content length: ${legendHTML.length}`);
27+
const hasGroups = legendHTML.includes("Groups");
28+
console.log(`Legend has Groups section: ${hasGroups}`);
29+
30+
// Check if clouds are rendered (data attribute on container)
31+
const cloudCount = await page.locator("[data-cloud-count]").getAttribute("data-cloud-count").catch(() => "N/A");
32+
console.log(`Cloud count: ${cloudCount}`);
33+
34+
// Take the main galaxy view screenshot
35+
await page.screenshot({
36+
path: `${outDir}/screenshot-galaxy.png`,
37+
fullPage: false,
38+
});
39+
console.log("Galaxy view captured");
40+
41+
// Switch to Module view
42+
await page.click('button:has-text("Module")');
43+
await page.waitForTimeout(4000);
44+
await page.screenshot({
45+
path: `${outDir}/screenshot-module.png`,
46+
fullPage: false,
47+
});
48+
console.log("Module view captured");
49+
50+
// Switch to Forces view
51+
await page.click('button:has-text("Forces")');
52+
await page.waitForTimeout(4000);
53+
await page.screenshot({
54+
path: `${outDir}/screenshot-forces.png`,
55+
fullPage: false,
56+
});
57+
console.log("Forces view captured");
58+
59+
await browser.close();
60+
console.log("Done — screenshots saved to " + outDir);

0 commit comments

Comments
 (0)