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

architecture-diagram-generator

v0.5.0

Published

Automated Architecture Diagram Generator (v0.4.16) for Next.js projects. Scan codebases, classify layers, and generate interactive HTML dashboards and Mermaid diagrams.

Readme

🧠 Architecture Analysis Platform (v0.5.0)

Stop guessing your architecture. Start measuring it.

Transform your codebase into actionable architectural insights with scoring, rules, CI enforcement, and interactive visualization.


🚀 What is this?

This tool analyzes your codebase using static analysis and generates:

  • 📊 Architecture Score (0–100)
  • ⚠️ Actionable Issues (with explanations & fixes)
  • 🔁 History & Diff (track evolution over time)
  • 🧪 CI/CD Enforcement (prevent regressions)
  • 🧭 Interactive Dashboard (visual + diagnostic)

⚡ Quick Start (30 seconds)

npx architecture-generator .

🧪 Analyze your architecture

architecture-generator analyze .

Example output:

Architecture Score: 85/100

⚠️ Issues (5):

[MEDIUM] High fan-out in src/core/ArchitecturePipeline.ts
→ 14 dependencies (limit: 10)
→ Suggestion: Split responsibilities or extract services

📊 Summary:
- Circular dependencies: 0 ✅
- Layer violations: 0 ✅
- Avg fan-out: 8.2

🛡️ Use in CI/CD (prevent bad architecture)

architecture-generator check . -t 80 --fail-on high
  • Fails build if architecture score drops
  • Blocks critical violations
  • Keeps your architecture healthy over time

🔍 Track architecture evolution

architecture-generator diff .

Example:

Score: 82 → 85 (+3)

+2 new issues
-4 resolved issues

Trend: improving 📈

⚙️ Configuration

Create architecture-analyzer.json:

{
  "preset": "balanced",
  "rules": {
    "fan-out": { "threshold": 12 },
    "fan-in": { "threshold": 20 },
    "layer-violation": "error"
  }
}

Presets

  • strict → zero tolerance (recommended for mature systems)
  • balanced → default
  • relaxed → good for legacy codebases

🧠 What it detects

  • ❌ Circular dependencies
  • ❌ Layer violations
  • ⚠️ High coupling (fan-in / fan-out)
  • ⚠️ God modules
  • 📦 External service usage
  • 🧬 Type vs runtime dependencies

📊 Interactive Dashboard

Generate a full visual report:

architecture-generator . -o architecture.json

Includes:

  • Architecture graph (SVG)
  • Issues explorer panel
  • Click-to-inspect modules
  • Suggestions & explanations

🧩 Example Use Cases

  • 🧪 Audit legacy codebases
  • 🛡️ Prevent architectural regressions in CI
  • 📈 Track architecture health over time
  • 🧠 Understand complex systems faster
  • 👥 Align teams on architecture decisions

🔌 Programmatic API

import { ArchitecturePipeline } from 'architecture-diagram-generator';

const pipeline = new ArchitecturePipeline({
  rootDir: process.cwd()
});

const result = await pipeline.runFull('.');

console.log(result.analysis.score);

🛠️ Workflow Integration

Pre-commit (Husky)

architecture-generator check . -t 70

📈 Why this matters

Architecture degrades silently over time.

This tool makes it:

  • visible
  • measurable
  • enforceable

🧪 Real-world workflow

  1. Run analysis
  2. Fix top issues
  3. Commit with CI check
  4. Track improvements over time

💬 Feedback

This project is evolving fast.

If you:

  • find false positives
  • want new rules
  • use it in production

👉 open an issue or share your report


📦 Roadmap

  • [ ] PR comment bot
  • [ ] Team dashboard (hosted)
  • [ ] Advanced rule engine
  • [ ] Monorepo insights

📄 License

MIT