npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mohamedadelshendy/hotcode

v1.2.0

Published

HotCode Codebase Scanner & Visual Graph Parser

Downloads

430

Readme

HotCode (System Architecture Scanner & Interactive Visual Graph Generator)

hotcode is a lightweight, zero-configuration codebase architecture scanner and visual dependency mapper. It parses directory trees using AST mappings (Tree-sitter) and regex heuristic parsers, constructs a directional system knowledge graph, resolves inter-file/inter-service references, and generates a standalone, interactive physics-simulated HTML visualization page.

Key Features

  • Universal Multi-Language AST Parsing: Supports Python and JavaScript/TypeScript/JSX/TSX.
  • Non-Code Asset Mapping:
    • SQL Schemas: Extracts database tables and maps relationships via foreign keys/references constraints.
    • Documentation: Scans Markdown files and maps relative document links to files or other assets.
    • Shell Scripts: Traces execution dependency chains between shell scripts.
  • Cross-Repo Microservice Mapping: Connects HTTP requests (using fetch, axios, or Python requests) directly to their corresponding backend API route endpoints.
  • Clean Architecture Checker: Detects architectural violations (such as endpoint controllers directly bypassing services to invoke database schemas) and highlights warnings.
  • Rich Visual Exports:
    • Interactive HTML Graph (graph.html): A standalone, offline-ready UI featuring dynamic searches, checkboxes to show/hide entities, toggling dead code visualization, physics configurations, and a detailed sidebar listing dependencies and warnings.
    • Markdown Report (hotcode-report.md): A detailed GFM report featuring overview metrics, ASCII directory trees, endpoints caller lists, and an auto-generated Mermaid call-flow flowchart.

Usage Guide

You can run hotcode directly using npx or by cloning and running it locally.

Option 1: Run Instantly via npx (Recommended)

You don't need to install anything. Just run the tool on your target directories:

# Scan a single repository directory
npx @mohamedadelshendy/hotcode <path-to-directory>

# Scan multiple directories (for microservice/request mapping)
npx @mohamedadelshendy/hotcode <path-to-repo-A> <path-to-repo-B>

# Specify a custom output directory (defaults to "hotcode-out")
npx @mohamedadelshendy/hotcode <path-to-directory> --out my-architecture-docs

Option 2: Running Locally from Source

If you have cloned the repository and want to run it from source:

  1. Install Dependencies:

    npm install
  2. Build the CLI:

    npm run build
  3. Run the Scanner:

    # Scan directory, placing outputs in default "hotcode-out"
    npm run cli -- <path-to-directory>
    
    # Scan multiple directories with custom output folder name
    npm run cli -- <path-to-repo-A> <path-to-repo-B> --out custom-output

Output Architecture Files

By default, files are generated in the ./hotcode-out/ folder:

  1. graph.html: The interactive visual graph dashboard. Double-click to open in any web browser to explore, search, and inspect code connections.
  2. hotcode-report.md: Markdown report showing tree structures, metrics, and a Mermaid flowchart.
  3. hotcode-summary.json: The complete queryable JSON codebase dependency model.