How Overlays Work
Overlays add attributes to existing nodes. The visualization then uses these attributes to modify the display:1
Base Graph
Your code structure with nodes (classes, methods) and edges (dependencies, calls).
2
Apply Overlay
A plugin analyzes external data (git, coverage, etc.) and writes attributes to nodes.
3
Visualize
The frontend reads these attributes and maps them to colors, sizes, or badges.
Attribute Prefixes
Each overlay stores data with a unique prefix to avoid conflicts:| Prefix | Overlay | Example Attributes |
|---|---|---|
git: | Git Activity | git:churn, git:authors, git:lastModified |
coverage: | Test Coverage | coverage:percent, coverage:lines, coverage:branches |
complexity: | Complexity | complexity:cyclomatic, complexity:cognitive |
ownership: | Code Ownership | ownership:team, ownership:author |
layout: | Layout (built-in) | layout:x, layout:y, layout:z |
Overlay Definition
Each overlay defines how it should be visualized:Visual Types
| Type | Effect | Use Case |
|---|---|---|
color | Changes node color | Continuous values (coverage %) |
size | Changes node size | Magnitude values (complexity) |
badge | Adds icon/label | Categorical data (team name) |
Built-in Overlays
Git Activity
Shows code churn and authorship:| Attribute | Description |
|---|---|
git:churn | Number of changes to this file |
git:authors | Number of unique contributors |
git:lastModified | Date of last change |
Test Coverage
Shows which code is tested:| Attribute | Description |
|---|---|
coverage:percent | Line coverage percentage |
coverage:lines | Number of covered lines |
coverage:branches | Branch coverage percentage |
Complexity
Shows code complexity metrics:| Attribute | Description |
|---|---|
complexity:cyclomatic | Cyclomatic complexity |
complexity:cognitive | Cognitive complexity |
complexity:loc | Lines of code |
Code Ownership
Shows team boundaries:| Attribute | Description |
|---|---|
ownership:team | Primary team owner |
ownership:author | Primary author |
ownership:shared | Whether multiple teams touch this |
API Flow
1. List Available Overlays
2. Apply Overlay
3. Fetch Graph
4. Remove Overlay
Combining Overlays
Multiple overlays can be active simultaneously:- Git Activity: Colors nodes by churn
- Test Coverage: Adds coverage badges
- Complexity: Sizes nodes by complexity
Single Source of Truth
Overlay configuration lives in code, not in config files:Do
- Plugin defines overlays in C# code
- API exposes overlay definitions
- Frontend fetches and renders dynamically
Don't
- JSON config files for overlays
- Render config in database
- Hardcoded colors in frontend