Skip to main content
Codegen SDK provides powerful tools for analyzing and improving code modularity. This guide will help you identify and fix common modularity issues like circular dependencies, tight coupling, and poorly organized imports. Common use cases include:
  • Breaking up circular dependencies
  • Organizing imports and exports
  • Identifying highly coupled modules
  • Extracting shared code into common modules
  • Analyzing module boundaries

Analyzing Import Relationships

First, let’s see how to analyze import relationships in your codebase:

Breaking Circular Dependencies

When you find circular dependencies, here’s how to break them:

Organizing Imports

Clean up and organize imports across your codebase:

Identifying Highly Coupled Modules

Find modules that might need to be split up:

Extracting Shared Code

When you find highly coupled modules, extract shared code: