43 lines
2.7 KiB
Markdown
43 lines
2.7 KiB
Markdown
# Graphify code graph
|
|
|
|
The [interactive graph](../graphify-out/graph.html) maps the backend's source symbols and relationships. Search for a class or file, select a node, and follow its connections. The [graph report](../graphify-out/GRAPH_REPORT.md) and [queryable graph](../graphify-out/graph.json) are committed alongside it. This snapshot was extracted from source commit `131aef79` on 2026-10-04. Regenerate it after meaningful source changes.
|
|
|
|
Graphify is pinned as a Git submodule at `tools/graphify` (commit `0b60d47e6cd9338c51143f39f35b6c45c8453385`, version `0.9.74`). Its repository includes Apache-2.0 and MIT license files. Initialize it after cloning:
|
|
|
|
```sh
|
|
git submodule update --init --depth 1 tools/graphify
|
|
```
|
|
|
|
On Windows, run the command through Git Bash if PowerShell's Git submodule wrapper cannot find its shell utilities:
|
|
|
|
```powershell
|
|
& "C:\Program Files\Git\bin\bash.exe" -lc "git submodule update --init --depth 1 tools/graphify"
|
|
```
|
|
|
|
Use Python 3.10 or newer and an isolated environment. From the backend root:
|
|
|
|
```sh
|
|
python -m venv .tmp/graphify-venv
|
|
# Activate the environment, then:
|
|
python -m pip install -e "tools/graphify[sql]"
|
|
python -m graphify extract . --code-only --max-workers 4
|
|
python -m graphify cluster-only . --no-label
|
|
python -m graphify explain PartnerPaymentWriteStore --graph graphify-out/graph.json
|
|
```
|
|
|
|
In PowerShell, you can run the virtual environment directly without activating it:
|
|
|
|
```powershell
|
|
python -m venv .tmp\graphify-venv
|
|
& .\.tmp\graphify-venv\Scripts\python.exe -m pip install -e "tools/graphify[sql]"
|
|
& .\.tmp\graphify-venv\Scripts\python.exe -m graphify extract . --code-only --max-workers 4
|
|
& .\.tmp\graphify-venv\Scripts\python.exe -m graphify cluster-only . --no-label
|
|
Invoke-Item graphify-out\graph.html
|
|
```
|
|
|
|
Open `graphify-out/graph.html` in a desktop browser. The page loads `vis-network` from a pinned CDN URL with a Subresource Integrity hash, so it needs network access for its viewer script. Graph data is embedded in the HTML; do not publish it outside the development team. The committed graph and report can be queried without regenerating, but local extraction is needed to reflect later code changes.
|
|
|
|
`.graphifyignore` excludes local tooling, tests, migrations, generated code, and caches. `--code-only` uses local AST parsing and does not send source to an LLM. The ignored `graphify-out` cache, analysis, and machine-specific root files stay local; only the graph, report, viewer, and portable manifest are tracked. No application runtime dependency, database migration, or API route is added.
|
|
|
|
This graph is an automatic source map, not a live service dashboard. It complements the manually curated Archify experiment on its separate branch and the running API's Swagger UI.
|