Skip to content

4shil/Docode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DoCode

GitHub stars License Build Status GitHub issues GitHub forks


⚠️ Attribution (Important)

DoCode is a fork/evolution of Understand-Anything by Lum1104.

This project builds upon the excellent foundation laid by Lum1104's Understand-Anything. All core analysis concepts, graph generation techniques, and initial architecture credit goes to the original author. DoCode extends this work with enhanced dashboard features, improved documentation, and additional analysis capabilities.

Original Project: https://github.com/Lum1104/Understand-Anything
Original Author: Lum1104


πŸ“– Table of Contents

  1. What is DoCode?
  2. Why DoCode? (Problem Statement)
  3. Key Features
  4. Screenshots
  5. Quick Start
  6. Detailed Installation Guide
  7. Documentation Pages Guide
  8. Architecture Overview
  9. Use Cases
  10. Frequently Asked Questions
  11. Troubleshooting
  12. Contributing
  13. License
  14. Support & Community

πŸ€” What is DoCode?

DoCode (formerly evolving from Understand-Anything) is a modern code intelligence platform that transforms how developers understand, navigate, and maintain complex codebases. It automatically scans repositories and generates interactive knowledge graphs that visualize:

  • Structural relationships between files, functions, classes, and modules
  • Dependency graphs showing import chains and coupling
  • Domain-specific flows for business logic visualization
  • Interactive dashboards for exploring code relationships

Core Philosophy

  • Fast: Analyzes 500+ files in ~1 second
  • Visual: Interactive graphs instead of static documentation
  • Flexible: Works with GitHub repos, local folders, or ZIP archives
  • Extensible: Plugin architecture for custom analyzers

🎯 Why DoCode? (Problem Statement)

Modern codebases are increasingly complex:

  • Microservices with hundreds of repositories
  • Monorepos with thousands of files
  • Legacy code with poor documentation
  • Rapid team changes leading to knowledge loss

Traditional tools fail because:

  • Static documentation gets outdated quickly
  • Code search lacks relationship context
  • Dependency analysis is fragmented
  • New team members struggle to onboard

DoCode solves this by:

  • Automatically generating living documentation via code analysis
  • Visualizing actual code relationships, not just file structures
  • Providing interactive exploration instead of static docs
  • Enabling quick impact analysis for changes

✨ Key Features

1. Structural Code Analysis

  • Parses ASTs (Abstract Syntax Trees) to extract:
    • Functions, classes, methods, variables
    • Import/export relationships
    • Call hierarchies
    • Type annotations and interfaces
  • Supports multiple languages: JavaScript, TypeScript, Python, Java, C#, Go, Rust

2. Knowledge Graph Generation

  • Creates nodes for code entities (files, functions, classes)
  • Creates edges for relationships (imports, calls, extends, implements)
  • Generates both structural and domain-specific graphs
  • Outputs standard formats: JSON, GraphML, Cytoscape.js

3. Interactive Dashboard

  • Search: Full-text search across all code entities
  • Filter: Filter by type, language, complexity
  • Explore: Click nodes to see details and relationships
  • Navigate: Jump to source code directly from graph
  • Export: Save graphs as images or JSON

4. Flexible Input Sources

Input Type Example Notes
GitHub Repository https://github.com/4shil/Docode Public & private repos (with auth)
Local Folder ~/projects/my-app Analyzes current state
ZIP Archive project.zip Good for one-off analyses
Git URL git@github.com:user/repo.git Clones and analyzes

5. Performance

  • Speed: ~1 second for 500 files (depending on hardware)
  • Incremental: Only re-analyzes changed files
  • Caching: Stores analysis results for quick reloads
  • Parallel: Uses worker threads for concurrent analysis

πŸ“Έ Screenshots

Dashboard Main View

DoCode Dashboard Main The main dashboard view showing code knowledge graph visualization

Graph Visualization

DoCode Graph View Interactive graph showing relationships between code entities

Detail Panel

DoCode Detail Panel Detailed view of selected code entity with relationships


πŸš€ Quick Start

30-Second Quick Start

# Clone the repository
git clone https://github.com/4shil/Docode.git
cd DoCode

# Install dependencies
pnpm install

# Build core package
cd docode/packages/core && pnpm build && cd ../../

# Run analysis on DoCode itself
pnpm run analyze -- --target . --output .understand-anything/

# Start the dashboard
cd docode/packages/dashboard && pnpm dev

Then open http://localhost:3000 to see your code graph!


πŸ› οΈ Detailed Installation Guide

Prerequisites

  • Node.js β‰₯ 18.x (LTS recommended)
  • pnpm β‰₯ 8.x (Package manager)
  • Git (for cloning repositories)
  • Python 3 (optional, for some analyzers)

Step 1: Install pnpm (if not installed)

# Using npm
npm install -g pnpm

# Or using corepack (Node.js β‰₯ 16.9)
corepack enable
corepack prepare pnpm@latest --activate

Step 2: Clone the Repository

git clone https://github.com/4shil/Docode.git
cd DoCode

Step 3: Install Dependencies

pnpm install
# This installs all workspace packages (core, dashboard, etc.)

Step 4: Build Core Package

cd docode/packages/core
pnpm build
cd ../../  # Return to root

Step 5: Verify Installation

pnpm run analyze -- --help
# Should show help text for the analyzer

πŸ“š Documentation Pages Guide

What's covered:

  • Prerequisites and installation
  • First analysis (GitHub repo, local folder, ZIP)
  • Starting the dashboard
  • Quick examples with expected output
  • Troubleshooting common issues

When to use: New users should start here.

What's covered:

  • Advanced analysis options
  • Configuration files
  • CI/CD integration
  • Performance tuning
  • Custom analyzers
  • Batch processing

When to use: After getting started, to learn advanced features.

What's covered:

  • Dashboard features and UI components
  • Keyboard shortcuts
  • Search and filtering
  • Graph interaction
  • Settings and customization
  • Export options

When to use: To master the interactive dashboard.

What's covered:

  • Project structure deep dive
  • Data flow diagrams
  • Core engine internals
  • Plugin system
  • API endpoints
  • Design decisions

When to use: Contributors and developers extending DoCode.

What's covered:

  • Core API methods
  • Data formats (JSON schemas)
  • TypeScript types
  • HTTP endpoints (if using server mode)
  • Event system
  • Extension points

When to use: Integrating DoCode programmatically.

What's covered:

  • Development setup
  • Coding standards
  • Pull request process
  • Testing guidelines
  • Issue reporting
  • Community guidelines

When to use: Want to contribute code or documentation.


πŸ—οΈ Architecture Overview

DoCode uses a monorepo architecture with three main packages:

Docode/
β”œβ”€β”€ homepage/              # Astro-based documentation site (you are here)
β”‚   β”œβ”€β”€ src/pages/        # Documentation pages (MDX)
β”‚   β”œβ”€β”€ public/           # Static assets
β”‚   └── dist/             # Build output (deployed to GitHub Pages)
β”‚
β”œβ”€β”€ docode/                # Main workspace (pnpm)
β”‚   └── packages/
β”‚       β”œβ”€β”€ core/         # Analysis engine (TypeScript)
β”‚       β”‚   β”œβ”€β”€ src/
β”‚       β”‚   β”‚   β”œβ”€β”€ analyzer/   # Language-specific analyzers
β”‚       β”‚   β”‚   β”œβ”€β”€ graph/      # Graph generation logic
β”‚       β”‚   β”‚   └── output/     # Export formats
β”‚       β”‚   └── dist/           # Compiled output
β”‚       β”‚
β”‚       └── dashboard/    # React-based visualization (Vite + React)
β”‚           β”œβ”€β”€ src/
β”‚           β”‚   β”œβ”€β”€ components/ # UI components
β”‚           β”‚   β”œβ”€β”€ graph/      # Cytoscape.js integration
β”‚           β”‚   └── state/      # State management
β”‚           └── dist/           # Production build
β”‚
β”œβ”€β”€ docs/                  # Documentation source (MDX)
β”œβ”€β”€ scripts/               # Build and analysis scripts
└── .understand-anything/  # Generated knowledge graphs (legacy name)

Data Flow

  1. Input β†’ GitHub URL / Local path / ZIP
  2. Analysis β†’ Core engine parses code, extracts entities
  3. Graph Generation β†’ Creates nodes and edges
  4. Output β†’ JSON + Dashboard visualization
  5. Interaction β†’ User explores via dashboard

🎯 Use Cases

1. New Team Member Onboarding

  • Quickly understand project structure
  • Visualize dependencies and relationships
  • Find key files and entry points

2. Legacy Code Understanding

  • Map undocumented codebases
  • Identify dead code and unused dependencies
  • Plan refactoring efforts

3. Impact Analysis

  • See what breaks when changing a function
  • Understand downstream dependencies
  • Plan safe refactoring

4. Code Review Enhancement

  • Visualize PR changes in context
  • Understand relationship impact
  • Generate review documentation

5. Architecture Decision Support

  • Visualize current vs target architecture
  • Identify architectural smells
  • Plan microservices extraction

❓ Frequently Asked Questions

Q: Is DoCode a replacement for IDE features?

A: No, it complements IDEs. While IDEs provide local code intelligence, DoCode gives you a global view of relationships across the entire codebase or multiple repositories.

Q: How is DoCode different from Sourcegraph?

A: Sourcegraph is a search tool with some code intelligence. DoCode focuses specifically on visual graph exploration and relationship mapping, which is more intuitive for understanding complex dependencies.

Q: Can I analyze private repositories?

A: Yes! For GitHub, provide a personal access token. For local folders, just provide the path.

Q: Does DoCode modify my code?

A: Never. DoCode is read-only β€” it only analyzes, never writes to your source files.

Q: How do I add support for a new language?

A: Check the Contributing Guide for creating custom analyzers. DoCode's plugin architecture makes it straightforward.

Q: Why is the output folder named .understand-anything/?

A: Historical compatibility with the original Understand-Anything project. This will be renamed to .docode/ in a future release.


πŸ”§ Troubleshooting

Issue: Analysis fails with "No files found"

Solution:

  • Check that the target path is correct
  • Ensure the language is supported
  • Try with --verbose flag for detailed logs

Issue: Dashboard won't start (port 3000 in use)

Solution:

# Kill process on port 3000
npx kill-port 3000

# Or use a different port
pnpm dev -- --port 3001

Issue: pnpm install fails

Solution:

# Clear pnpm cache
pnpm store prune

# Reinstall
rm -rf node_modules pnpm-lock.yaml
pnpm install

Issue: Build errors in core package

Solution:

cd docode/packages/core
pnpm clean
pnpm install
pnpm build

Issue: Dashboard shows "No data"

Solution:

  • Ensure analysis completed successfully
  • Check that .understand-anything/ folder exists
  • Verify JSON files are valid (use jq to check)

🀝 Contributing

We welcome contributions! Here's how to get started:

Quick Contribution Steps

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/Docode.git
  3. Create branch: git checkout -b feature/your-feature
  4. Make changes and commit: git commit -m "feat: add your feature"
  5. Push to your fork: git push origin feature/your-feature
  6. Open PR against 4shil/Docode:main

Development Setup

# After cloning
pnpm install

# Run core tests
cd docode/packages/core && pnpm test

# Run dashboard dev server
cd ../dashboard && pnpm dev

# Run docs site locally
cd ../../../homepage && pnpm dev

Coding Standards

  • TypeScript: Strict mode enabled
  • Formatting: Prettier + ESLint
  • Commits: Conventional Commits (feat:, fix:, docs:, etc.)
  • Tests: Jest for core, Vitest for dashboard

See Contributing Guide for full details.


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

Important: The original Understand-Anything project by Lum1104 is also MIT licensed. DoCode maintains this license compatibility.


πŸ™ Credits

Original Project

DoCode Evolution

Built With


πŸ’¬ Support & Community


Last Updated: May 2026
Version: 0.1.0 (evolving from Understand-Anything)

About

Interactive code intelligence platform that scans repositories and generates 3D dependency/structural graphs.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors