Skip to content

Feature Request: Live Interactive Architecture Graph (archctl serve) #11

@qiuethan

Description

@qiuethan

Summary

The current HTML report is a static artifact. While useful for CI, it lacks the interactivity needed for deep exploration during development. This feature proposes a local development server that hosts a live, hot-reloading visualization of the architecture.

Problem

  • Static reports become stale immediately after a code change.
  • Developers need to run archctl lint --format html repeatedly to see the effect of their refactoring.
  • Debugging complex cyclic dependencies is hard without an interactive tool to expand/collapse nodes.

Proposed Solution

Implement archctl serve which starts a local web server (e.g., http://localhost:3000).

Key Capabilities

  1. Hot Reloading: The server watches the file system. When a file changes, it re-runs the graph analysis and pushes updates to the browser via WebSockets.
  2. Interactive Filtering:
    • "Show me only the path between OrderService and PaymentGateway."
    • "Highlight all violations in red."
    • "Collapse all files into their parent modules."
  3. Code Navigation: Clicking a node in the graph could open the corresponding file in VS Code (via vscode:// URL scheme).

Implementation Details

  • Use a lightweight server (e.g., vite or express).
  • Frontend graph visualization using d3.js or cytoscape.js (building on the existing HTML report logic).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions