-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Explore, audit, enforce, and compare software architecture across 26 languages — entirely on your machine.
Drop in a project folder and PolyGraph builds an interactive node graph of its modules, classes, interfaces, structs, traits, functions, and components — and the relationships between them: imports, calls, inheritance, instantiation, composition, dependency injection, and JSX component usage. Then go further: trace impact, enforce architecture rules in CI, diff two revisions, query the graph, export it, and jump straight to the source. Nothing is uploaded.
New here? Start with Installation → Getting Started. Hacking on it? Start with Architecture Overview.
The fastest way to understand PolyGraph is the loop it's built around:
- Scan a folder → an interactive graph of the codebase.
- Select a node → see its incoming/outgoing relationships and metadata.
- Blast radius → everything transitively affected by a change to it.
- Edge evidence → click an edge to see exactly where (file · line · column) the relationship was observed.
- Open in editor → jump to the precise line in VS Code or a JetBrains IDE.
Everything else — layouts, filters, the query language, CI rules, diffing, exports — hangs off that loop.
| 🔎 Explore | Interactive graph, smart layout, search, filters, focus mode |
| 🧭 Analyze impact | Dependencies, dependents, shortest path, blast radius, architectural insights |
| 🛡️ Enforce | Architecture rules in CI (polygraph check) with SARIF output |
| 🔀 Compare | Diff two revisions / the working tree (polygraph diff) |
| 🗂️ Abstract | Collapse to package- and workspace-level graphs from manifests |
| 🧮 Query | A small query language for selecting and isolating subgraphs |
| 📤 Export | DOT, GraphML, Mermaid, JSON, SVG, standalone HTML report |
| ✏️ Open in editor | Inline source preview + jump to the exact line |
PolyGraph is a local-only pipeline:
folder ─▶ Bun sidecar (reads disk) ─▶ language kernel ─▶ providers ─▶ GraphModel
│
aggregate (collapse/expand + edge evidence) ─▶ scene ─▶ layout (Web Worker)
│
Vello WebGPU canvas (Rust → WASM vectors)
- Analysis is a plugin system: TypeScript/JavaScript gets a precise ts-morph-backed provider (real type-checker call resolution); 25 other languages are declarative tree-sitter packs run by a native Rust core.
- Rendering is a GPU vector canvas (Vello, compiled Rust → WASM, WebGPU) that stays smooth at thousands of nodes.
- Layout runs off the main thread in a Web Worker, with a shape-aware engine picker and budget guards.
The full picture is in Architecture Overview.
- Desktop app (recommended for end-users) — Windows, macOS, Linux. No toolchain. See Installation.
- Web / CLI from source — for development, or to run the architecture-rules CLI in CI. See Development & Building and CLI: Rules & Diff.
| Concern | Choice |
|---|---|
| App | Next.js (App Router, static export) + Chakra UI v3 |
| Desktop | Tauri v2 |
| Analysis | Bun sidecar over loopback |
| Runtime / package manager | Bun |
| Graph render | Vello (Rust → WASM, WebGPU) |
| Layout | dagre (layered/tree) + custom engines, in a worker |
| Code analysis | ts-morph (TS/JS) + native tree-sitter core (Rust, napi-rs) |
| Lint / format | oxlint / oxfmt |
This wiki is written against the current main. Where the in-repo docs/ and this wiki disagree on layout/rendering details, trust the wiki — it documents the engines and budget system added in recent work.
PolyGraph — explore, audit, enforce, and compare software architecture across 26 languages, 100% locally. Repository · Releases · Issues · Licensed Apache-2.0 OR MIT
📖 Using PolyGraph
- Installation
- Getting Started
- The Graph Model
- Layouts & Navigation
- Impact Analysis & Insights
- Query Language
- CLI: Rules & Diff
- Exports, Workspaces & Editor
- Troubleshooting & FAQ
🔧 Internals & Contributing