Skip to main content

Overview

A clear understanding of code interactions and dependencies is necessary to migrate cloud services, update versions, refactor code, or modernize tooling. The dependency mapper is a developer tool that visualizes the structure of a project, analyzes it to provide actionable insights for improvement, and clarify connections to prevent unintended ripple effects during transformations. 

Problem Statement

Major changes require a deep understanding of a project to anticipate ripple effects. Without this understanding, changes can break functionality, introduce poor architectural decisions, waste resources, hide security risks, and accumulate technical debt. But as a project grows in size and scope, it becomes increasingly difficult for a developer to gain and maintain the necessary depth of knowledge. Over time, developers are onboarded and offboarded to the project; the codebase may go through partial refactors, the structure may drift from the documented architecture, and continuous updates to keep a project modern may leave a tangled and opaque mess. The differences between minor and major changes often offer no visible demarcation, and changes that were previously minor can become major due to code revisions. Every single transformative change made to a codebase is decelerated by any loss of transparent structure and project knowledge. 

The Vertical Relevance Dependency Mapper Module solves these problems by providing transparency to even the largest and most convoluted codebases. Architectural clarity is necessary to guarantee a project’s modernization, modularization, and scalability. The Dependency Mapper processes a codebase and returns a map that orients even those new to a project while bringing into sharp focus redundancies, excessive coupling, cyclical dependencies, dead code, and bottlenecks. The Dependency Mapper also provides optional AI-assisted analysis and recommendations to improve issues the developer might otherwise miss and produce documentation for the project. The Dependency Mapper’s interactive dependency graph also makes the natural boundaries of the project’s functionalities clear to simplify breaking apart monoliths into microservices and identify candidacy for moving to new cloud services. 

ProblemDetails
ScalabilityAs workloads shift, software needs to be vertically and horizontally scalable to efficiently use resources. 
Modularization Scalability best practice is project modularization. Modularization reduces risks of unintended side effects, improves maintainability, and allows for independent scaling of components. As a component of scalability, it can also decrease redundancy and prevent resource waste. 
ModernizationAnother best practice to ensure the most efficient use of resources is continuously updating systems to meet business and technical needs through assessing any new architectures, tools, cloud services, and frameworks that might improve resource use or security. 
Architectural ClarityIn attempting to maintain a modern, modular solution, many developers may unintentionally acquire excessive technical debt or drift from the intended architectural design. Without a clear, well-structured codebase, poor design decisions, outdated dependencies, and costly performance bottlenecks can all be hidden in labyrinths of code. Confusing design also delays onboarding time and wastes the time of developers reading and familiarizing themselves with the project.

A lot of solutions to these issues rely on manual processes of review, refactoring, and documentation. Like any manual processes, these solutions introduce a great deal of potential for human error while spending costly development time. It is easy for developers to put off updating documentation or miss something in review and extremely common for technical debt to accumulate while the team is bogged down with other business priorities. Decisions may even begin to get made around what was originally a poor or temporary solution as the team continues to trudge forward. As the manual cleanup of code gets delayed, any attempt to refactor or take a comprehensive appraisal of the code becomes even more time-consuming. And if the team needs to completely modernize the project by, for example, breaking the code into services in a modern language and migrating them to a new cloud services provider? The planning will take a tremendous amount of time and there is still a good chance that the tedious manual review of a large project will miss important dependencies. 

Solution

Background

By providing clear visualization and comprehensive structural metadata, the Dependency Mapper Module is an all-in-one tool to resolve common challenges of growing codebases. Developers can quickly spot cyclic dependencies or modules with excessive coupling, making refactoring decisions more straightforward. Architecture drift becomes easier to detect when the actual implementation is compared against the design. Bottlenecks in testing, build processes, or runtime performance can be uncovered through the clear dependency chain graph. The visual graph also makes natural boundaries within the code immediately visible to accelerate breaking monoliths into microservices and identify candidates to move to new cloud services. 

To use the solution, a user only needs to upload a ZIP file containing the project’s codebase and then will receive an interactive dependency graph, a manifest with all function and class metadata, optional AI-generated insights for code improvement, and optional AI-generated project documentation. In short, the Dependency Mapper Module transforms the invisible complexity of software architecture into a tangible, navigable model that improves design and maintenance decisions. 

Components

  • Streamlit UI – A user interface with Streamlit that allows users to upload zip files, interact with code analysis, and provide feedback
  • Parsers – Language-specific parsers that read the uploaded codebase. Python, Java, and COBOL are all currently supported, but additional language parsers can be added in a modular fashion
  • Credential Providers – Modular API key and secret management to use to make API calls to LLMs
  • AI Service Layer – Abstraction for calls to AI service providers to generate READMEs or recommend code changes
  • Manifest Extraction/ Export – Centralized logic to build and export a manifest from the parsed codebases that contain comprehensive information on functions, classes, dependencies, and points of interaction
  • Visualization – Allows rendering of an interactive dependency graph from the manifest

Implementation Details

The Dependency Mapper provides visualization and analysis of a project’s internal structure and dependencies. This module makes planning for reorganization, migrating, refactoring, and modernizing codebases easier and cleaner. Each development team is empowered to make informed decisions without extensive research time. The module also provides AI-powered insights, encouraging developers to consider things they might not otherwise. 

The out-of-the-box solution can be run locally. Once the user installs the requirements and provides an API key for their preferred AI service provider, they only need to make the preferred selections in the user interface and upload a zipped file containing a codebase as shown in the workflow below. 

Figure-01

The selections currently available are the language being parsed, the LLM provider being used, and the format of the exportable manifest (JSON or YAML). All of the options are extensible, allowing for modular additions or subtractions to all options provided.  

Once the code within the project is parsed, an extensive manifest is produced of all the functions and classes in the code with information on how they are connected and used. This manifest is exportable and available in JSON or YAML. The screenshot below shows the current, out-of-the-box dashboard and part of a generated JSON manifest for an example project. 

Figure-02

The Dependency Mapper also provides an interactive dependency graph, shown in the screenshot below along with options to request AI feedback for an example project. The graph shows natural boundaries through dependency clusters and provides visibility into excessive dependencies. 

Figure-03

The Dependency Mapper can also run in a container hosted by AWS ECS to be accessible internally through an application load balancer as shown in the example below. This configuration would allow the solution to be used by any internal teams given access whenever they plan on refactoring, migrating, reorganizing, or modernizing a project. 

Figure-04

Solution Mapping

ProblemSolutionAWS Services
Scalability Projects become more scalable after using Dependency Mapper to help untangle dependency loops and parse out the architecture. The solution itself is also scalable as it can be provided on-demand via the desktop or a serverless backed web interface. AWS ECS 
Modularization Dependency Mapper parses a project to visually show natural divisions within a code base through an interactive dependency graph that makes dependency clusters and loops visible. It allows the team to think modularly about the services contained within a large project. The Dependency Mapper itself is designed to be very modular, allowing developers to add parsers for unsupported languages and interfaces for new AI service providers.AWS ECS 
ModernizationThrough the modularization gains provided by Dependency Mapper, along with AI-generated suggestions, projects are easier to modernize to meet current business needs with the best options available.AWS ECS, AWS Bedrock 
Architectural ClarityThe manifest provided by Dependency Mapper.AWS ECS, AWS Bedrock 

Summary

Implementing the Dependency Mapper Module allows teams to spot dependency issues before they become roadblocks, refactor with confidence, and keep architecture aligned with design goals. It helps identify bottlenecks that impact testing and performance, highlight unused or overgrown modules, and simplifies onboarding for new developers. In short, the Dependency Mapper turns complexity into clarity, giving teams the insight they need to build, maintain, and scale software with confidence.