How tanmaymundra/nestjs-dependency-analyzer works
Component Relationships
• Input → Processing → Output
• Double lines: Two-way communication
Specific Components
a. Input Components:
• Command Line Interface (analyze.command.ts)
• File System Reader
• Configuration Parser
b. Core Processing:
• AST Parser (ast.parser.ts)
• Dependency Analyzer (dependency.analyzer.ts)
• Module Type Definitions (modules.types.ts)
c. Output Handlers:
• DOT Visualizer (dot.visualizer.ts)
• JSON Formatter
• Graphviz Integration (external)
Additional Details
Annotations for:
• Supported file formats
• Configuration options
• Output format specifications
• External dependencies (Node.js, Graphviz)
Process Flow Indicators
Main workflow:
• CLI Input → File Reading → AST Parsing → Dependency Analysis → Visualization Generation → Output
Technical Specifications
• Required Node.js version (v14+)
• TypeScript compilation process
• Graphviz integration points
• Supported output formats (DOT, JSON)
Integration Points
Highlight:
• NestJS module integration
• TypeScript Compiler API usage
• Graphviz rendering pipeline
• File system interactions
Key Considerations:
• Modular nature of the tool
• Clear separation between analysis and visualization components
• Extension points for future features
• Optional components (like Graphviz integration)
• Error handling flows