NomikNomik

Visualization Dashboard

Interactive 2D and 3D graph exploration with all 17 node types, 10 edge types, search, filtering, impact overlay, health stats, and query caching — powered by Cytoscape.js and Three.js.

Overview

Nomik includes a built-in visualization dashboard that renders your code knowledge graph as an interactive 2D or 3D graph. Launch it with:

Terminal
nomik serve

This starts the MCP server and opens the dashboard at http://localhost:3333.

For the REST API only (no dashboard):

nomik dashboard    # REST API on http://localhost:4242

2D Graph (Cytoscape.js)

The default view renders the graph using Cytoscape.js with four layout options:

LayoutAlgorithmBest For
ModulesCoSE (Compound Spring Embedder)General-purpose, shows clusters naturally
FlowBreadthfirstHierarchical code (routes → controllers → services)
HubConcentricHighlighting a central node and its dependencies
CircleCircularEven distribution, good for small graphs

Adaptive Performance

The dashboard auto-detects graph size and adjusts rendering quality:

TierNodesAdjustments
Small< 100Full quality, all labels, all edges
Medium100–300Reduced layout iterations, smaller labels
Large300–1000Haystack edges, min-zoomed-font-size, fast CoSE layout (300 iterations)
Extreme> 1000textureOnViewport, hideEdgesOnViewport, edge hover disabled

Level-of-Detail (LOD)

When zoomed out below 0.6x, only File nodes and DEPENDS_ON edges are visible. Zooming in reveals all other node types and edge types. This eliminates visual clutter on large codebases.

Pagination

For large projects, the dashboard loads the top 500 files ranked by function count (importance-ranked), plus their children and inter-node edges. A status bar shows loadedFiles / totalFiles with a "Load More" option.

3D Graph (Three.js)

Toggle to 3D mode for a DNA/neural-network style visualization using 3d-force-graph (Three.js):

  • Animated edge particles on CALLS and DEPENDS_ON edges
  • Click-to-zoom on any node
  • Auto-rotation for small/medium graphs (disabled for large)
  • Adaptive quality — particle count, node resolution, and simulation ticks scale with graph size (thresholds at 300/800/1500 nodes)
  • All 17 node types rendered with distinct colors matching the 2D view

The search bar supports:

  • Name search — type a function, class, or file name
  • Ranked results — matches sorted by relevance (exact > starts-with > contains > path)
  • Focus mode — centers and highlights the selected node
  • Fit All mode — fits all matches in view
  • Prev/Next navigation — cycle through multiple matches
  • Clear on close — highlights are removed when closing search

Example: searching processPayment centers the graph on that function and highlights all its connections.

Filters

The filter panel lets you toggle visibility by node type, edge type, and directory layer. Only types with at least one instance in the current graph are shown.

Node Types (17)

Node TypeColorShape
FileCyanRound rectangle
FunctionEmeraldCircle
ClassPurpleDiamond
RouteAmberHexagon
VariableBlueRound tag
EventPurple (light)Star
EnvVarSlateRound rectangle
ModuleCyan (light)Round rectangle
DBTableOrangeBarrel
DBColumnOrange (dark)Circle
ExternalAPIIndigoPentagon
CronJobLimeOctagon
QueueJobFuchsiaRhomboid
MetricTealTriangle
SpanSkyRound rectangle
TopicVioletConcave hexagon
SecurityIssueRedVee

Edge Types (10)

Edge TypeColorStyleDescription
CONTAINSSlateSolidFile contains a symbol
CALLSAmberSolidFunction invocation
DEPENDS_ONSkyDashedInter-file dependency
IMPORTSIndigoDashedFile-to-file import
EXPORTSVioletDottedModule export
LISTENS_TOPurpleSolidEvent subscription
EXTENDSPurpleSolid (backcurve arrow)Class inheritance
USES_ENVSlateDottedEnv variable reference
HAS_SECURITY_ISSUERedSolid (thick)Security vulnerability
CALLS_EXTERNALIndigoSolidExternal API call

Directory Layers

Files are grouped by top-level directory. Each directory gets a unique color. You can toggle entire directories on/off with "All" / "None" buttons.

Impact Overlay

Click any node to see its full impact highlighted across all edge types:

ColorMeaning
Red glowSource node (clicked)
Amber glowDownstream — all nodes connected via outgoing edges
Blue glowUpstream — all nodes connected via incoming edges
FadedUnrelated nodes

The impact overlay follows all edge types — CALLS, DEPENDS_ON, CONTAINS, EXTENDS, LISTENS_TO, USES_ENV, CALLS_EXTERNAL, HAS_SECURITY_ISSUE, and more.

Node Detail Panel

Click any node to open the side panel. The panel adapts to the node type and shows all relevant relationships:

  • Properties — name, file path, start/end line, async, exported, language, method, route, url, schedule
  • Calls — functions this node calls
  • Called By — functions that call this node
  • Extends — classes this node inherits from
  • Extended By — classes that inherit from this node
  • Listens To — events this node subscribes to
  • Depends On — files/modules this node depends on
  • Depended On By — files/modules that depend on this node
  • Uses Env Vars — environment variables referenced
  • Calls External — external API calls made
  • Security Issues — security vulnerabilities linked to this node
  • Contains — symbols defined in this file (for File nodes)
  • Contained In — the file containing this symbol

Each node type badge is color-coded to match the graph colors.

Stats Panel

The stats panel is a sidebar showing real-time graph metrics with expandable health sections:

Graph Counts

  • Total nodes and edges

Node Type Breakdown

All non-zero node type counts are displayed: Files, Functions, Classes, Routes, Variables, Events, Env Vars, Modules, DB Tables, External APIs, Security Issues.

Health Metrics (expandable)

MetricDetails
Dead codeFunctions never called — click to expand full list with file paths
God objectsFunctions with >15 unexpected cross-file dependencies — click to expand
God filesFiles with >15 functions — shows function count and line count
DuplicatesFunctions with identical body hash (≥3 lines) — shows all copies
Security issuesCount of security vulnerabilities (if any)

Health Score

A composite score (0–100%) computed from:

FactorPenaltyCap
Dead code-1 per % of dead functions-25
God objects-5 per god object-20
God files-3 per god file-15
Duplicates-2 per duplicate group-10
Security issues-10 per issue-30

Score ≥ 80% = Healthy (green), ≥ 50% = Fair (amber), < 50% = Needs attention (red).

Query Caching

All Neo4j queries are cached with a 60-second TTL to avoid redundant database round-trips when switching between 2D/3D modes or re-rendering. The cache is automatically invalidated when you switch projects.

Project Selector

If you have multiple projects, the project selector dropdown filters the graph to show only nodes and edges for the selected project. Switching projects clears the query cache and reloads all data.

REST API (14 Endpoints)

The nomik dashboard command starts a REST API on port 4242:

EndpointMethodDescription
/api/statsGETNode/edge counts by type
/api/healthGETDead code, god files, duplicates
/api/onboardGETFull codebase briefing
/api/rulesGETArchitecture rules evaluation
/api/dead-codeGETList of dead code functions
/api/god-filesGETList of god files
/api/duplicatesGETDuplicate function groups
/api/communitiesGETFunctional clusters
/api/flowsGETExecution flows from entry points
/api/projectsGETAll projects
/api/impact?symbol=XGETImpact analysis for symbol X
/api/explain?symbol=XGETFull context for symbol X
/api/test-impact?symbol=XGETAffected test files for symbol X
/api/service-linksGETCross-service dependencies
/api/search?q=XGETSearch nodes by name

CORS is enabled by default. No external dependencies — uses Node.js built-in http module.

Tech Stack

ComponentLibrary
2D GraphCytoscape.js
3D Graph3d-force-graph (Three.js)
UI FrameworkReact 19 + Vite
StylingTailwind CSS
Graph Databaseneo4j-driver (direct Bolt connection)
CachingIn-memory 60s TTL query cache
State ManagementReact hooks