Skip to content

DependaCharta is a multi-language code analysis and visualization tool that helps you quickly identify disadvantageous dependencies, cyclic dependencies, and quality hotspots.

License

Notifications You must be signed in to change notification settings

MaibornWolff/DependaCharta

Screenshot of CodeCharta

🌐 Try the Web Studio Now!

No installation required • Instant visualization • Works in your browser

Analyze and visualize your codebase dependencies directly in your browser. Upload your .cg.json file or explore with sample data.

Launch Web Studio

Fully client-side • Your data never leaves your machine • Privacy guaranteed


What is DependaCharta

Having trouble understanding the structure and dependencies in your codebase? DependaCharta is a multi-language code analysis and visualization tool that helps you quickly identify disadvantageous dependencies, cyclic dependencies, and quality hotspots. It runs entirely locally, works with non-compilable code, and supports multiple programming languages. DependaCharta is an open source project developed by MaibornWolff.

For a detailed explanation of DependaCharta's domain concepts and visualization features, see our Domain Model Documentation.

Your Data Stays Local

All analysis and visualization happens entirely on your machine. No data is ever uploaded, shared, or transmitted to any external service. Your code stays private and secure. DependaCharta has no analytics, tracking, or telemetry built-in.

Quick Start

Analyze Your Code

Download the latest JAR from the releases page and run:

java -jar dependacharta.jar -d <directory-to-analyze>

Or use the convenience scripts included in the release: bin/dependacharta.sh (Mac/Linux) or bin/dependacharta.bat (Windows).

With Docker (no Java required):

docker run --rm --user root \
  -v "$(pwd)/your-project:/workspace" \
  maibornwolff/dependacharta-analysis:latest \
  -d /workspace

The analysis outputs a .cg.json file (default: output/analysis.cg.json).

Visualize Your Results

  • Web Studio — Open your .cg.json file directly in the browser. No installation required, fully client-side.
  • Standalone App — Download the desktop app for your OS from the releases page.
  • Run locally — Build and run the visualization yourself. See visualization/README.md.

Features

DependaCharta CLI (Analysis)

The Analysis component is a command-line tool that analyzes codebases using Tree-sitter parsers. It creates .cg.json files containing structural information about your project, including:

  • File and package hierarchies
  • Dependencies between files and packages
  • Cycle detection with detailed cycle information
  • Levelization for architectural insights
  • Support for multiple programming languages: Java, C#, C++, TypeScript, JavaScript, PHP, Go, Python, Kotlin, Vue

Don't see your language? You can extend the supported languages by adding a new parser!

DependaCharta Web (Visualization)

The Visualization component is an Angular/TypeScript web application using Cytoscape.js for interactive dependency graphs. Features include:

  • Interactive graph visualization of your codebase structure
  • Navigate through package and file dependencies
  • Filter and highlight critical dependencies
  • Identify cyclic dependencies and architecture violations
  • Find quality hotspots requiring attention
  • Multiple layout algorithms for optimal viewing
  • Available as both web app and Electron desktop application

Development Setup

Quick Start with Mise (Recommended)

Mise manages both runtime versions (Java, Node.js) and project tasks. One tool, zero manual setup.

# Install mise (https://mise.jdx.dev/getting-started.html)
curl https://mise.run | sh  # or: brew install mise

# Trust and install project runtimes (first time only)
mise trust
mise install

# See all available tasks
mise tasks

# Key workflows
mise run analyze <directory>           # Analyze a codebase
mise run analyze-and-serve <directory> # Analyze and open visualization
mise run test-analysis                # Run analysis unit tests
mise run dev-visualization            # Start development server

Tip: Run mise tasks to discover all available commands.

Manual Setup (Without Mise)

If you prefer not to use mise, install the prerequisites manually:

  • Java: 17 or higher (java -version)
  • Node.js: 22 or higher (node -v)

Analysis Component (Kotlin)

cd analysis

# Build the analysis tool
./gradlew fatJar

# Run the analyzer
java -jar build/libs/dependacharta.jar -d <directory-to-analyze>
# Or use the convenience scripts:
# bin/dependacharta.sh (Mac/Linux)
# bin/dependacharta.bat (Windows)

# Run tests
./gradlew test

For detailed analysis documentation, see analysis/README.md.

Visualization Component (Angular)

cd visualization

# Install dependencies
npm ci

# Development server (http://localhost:4200)
npm run start

# Run as Electron app
npm run start-electron

# Build for production
npm run build

# Run tests
npm run test

# Package for distribution
npm run package-win         # Windows
npm run package-mac-silicon # macOS ARM64
npm run package-mac-intel   # macOS x64

For detailed visualization documentation, see visualization/README.md.

Docker Support

DependaCharta provides official Docker images via Docker Hub for easy deployment and CI/CD integration.

Using Pre-built Images

# Pull the latest image
docker pull maibornwolff/dependacharta-analysis:latest

# Run analysis on a directory
docker run --rm --user root \
  -v "$(pwd)/your-project:/workspace" \
  maibornwolff/dependacharta-analysis:latest \
  -d /workspace

# Output will be in your-project/output/analysis.cg.json

Building Locally

# Build Docker image
mise run docker-build

# Run analysis with Docker
mise run docker-run <directory-to-analyze>

# Analyze and view results
mise run docker-analyze <directory-to-analyze>

Note: When using Docker on macOS/Windows, run the container with --user root to avoid permission issues with mounted volumes.

Get Involved

Do you have a bug, feature request, or question? Please open a new issue. Feedback is always welcome.

Want to contribute? Check out our contributing guide and developer start guide.

Development Practices

  • Test-driven development with tests before implementation
  • Clean Code principles (pragmatic, not dogmatic)
  • Semantic Versioning for releases
  • Automated CI/CD pipeline (see PIPELINE.md)

Links

License

BSD-3-Clause License


Made with ❤ by MaibornWolff  ·  GitHub @MaibornWolff

About

DependaCharta is a multi-language code analysis and visualization tool that helps you quickly identify disadvantageous dependencies, cyclic dependencies, and quality hotspots.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 9