Madge is a JavaScript module dependency visualizer and architecture mapper. It analyzes source code to create graphs and diagrams of module relationships, supporting CommonJS, AMD, and ES6 standards.
The tool functions as a circular dependency detector to identify recursive import loops and a dependency graph generator that exports relationship maps into image and vector formats. It provides utilities for auditing project structure, including the identification of orphaned modules and leaf modules.
Its broader capabilities include dead code identification, module impact analysis through dependent tracing, and software architecture visualization. These analyses are performed via static parsing of source files without executing the code.
Analysis settings and scanning behavior can be automated through configuration in a project metadata file.