Visualize Your NestJS Architecture.
Generate runtime dependency graphs directly from the Nest application container. Explore them dynamically in an Interactive Web Viewer or export to JSON format. See modules, providers, controllers, and every dependency at a glance.
import { Module } from '@nestjs/common'; import { NestGraphInspector } from 'nest-graph-inspector'; @Module({ imports: [ NestGraphInspector.forRoot({ outputs: [ { type: 'viewer', origin: 'http://localhost:9999' } ], }), ], }) export class RootModule {}
Why Nest Graph Inspector?
Understand your NestJS architecture without digging through code. The graph is generated from the runtime Nest container, not static source parsing.
Module Dependency Graph
Automatically maps import relationships between all loaded modules from your root module, giving you a clear view of your application structure.
Provider & Controller Mapping
Lists every provider and controller in each module alongside their dependency chains, so you know exactly what depends on what.
Interactive Web Viewer
Explore your dependency graph dynamically in the browser. Zoom, pan, and inspect nodes to understand your architecture with ease.
JSON Output
Get structured JSON output for programmatic analysis, custom tooling, or integration with your CI/CD pipeline.
Runtime Introspection
Built on the actual Nest runtime container — what you see is what's really running. No guesswork from static analysis.
Drop-in Module
Just import the module with forRoot or forRootAsync and you're done. No decorators to add, no code to change. Works with NestJS 10-11.
Use Cases
Real problems this solves for your team.
Impact Analysis
Narrow regression test scope to relevant modules, understand blast radius before making a change, and reduce unnecessary testing for unrelated areas.
Test Prioritization
Select critical providers for fast validation, understand dependency chains between providers/controllers, and prioritize which flows to check first.
Architecture Visibility
Onboard engineers faster, spot highly coupled modules/providers, and make refactors safer by visualizing relationships before changes.
