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

@jpdup/glad

v1.4.1

Published

Generate a Layer Diagram view of your source layers

Readme

GLAD - Generate Layer Architecture Diagram

Automatically generate layer diagram view of your source code dependencies.

Supports JavaScript, TypeScript, Dart (Flutter), Swift, and DOT graph files.

Motivation

View and Keep your project source files layer dependencies clean. Avoid circular reference or referencing an upper layer from a lower layer.

Project types supported

  • NodeJS - source files of type JS & TS
  • Flutter/Dart - package dependencies
  • Swift - iOS/macOS projects using Tree-Sitter parsing
  • DOT - GraphViz DOT file input for custom diagrams

Simply launch the glad command and open the resulting glad.svg file.

Example

example

Technologies used

Node.js npm JavaScript JSON TS-Morph SVG ESLint Standard - JavaScript Style Guide

Features

  • Optional grouping of layers by folders.
  • Rendering views as Posters, Layers, or Grid.
  • Render with or without edges connection lines.
  • Orphan node detection - highlights files/folders with no dependencies.

Installation

Globally

npm install -g .

DevDependencies

npm install -D @jpdup/glad

As part of your build script step

By adding "glad" to your build step, you will be alerted if you introduce a circular dependencies.

{
  "scripts": {
    "build": "glad ."
  }
}

Execute

glad

CLI Help

glad -h

Usage: glad < path | file.dot > [options]  "Generates an SVG layer diagram file based on your source code dependencies or DOT graph files"

Options:
  -h, --help              Show help  [boolean]
      --align             Set the horizontal position of the nodes  [string] [choices: "left", "center", "right"] [default: "center"]
      --debug             For tech support  [boolean] [default: false]
  -d, --details           Show additional values for each folders  [boolean] [default: false]
      --dev               Show Dev dependencies  [boolean] [default: false]
      --edges             Type of rendering for all edges  [string] [choices: "files", "folders"] [default: "files"]
  -e, --exclude           File glob patterns to exclude from the analysis, eg: "**/*.test.js" "**/AppLogger*"  [array]
      --externals, --ex   Show external dependencies  [boolean] [default: false]
  -i, --input             File path to scan  [string]
      --json              Output the graph to file called glad.json  [boolean] [default: false]
  -l, --layers            Display the layers background and numbers  [boolean] [default: false]
      --lineEffect, --le  Special effect on the lines  [string] [default: "flat"]
      --lines             Type of rendering for all edges  [string] [choices: "curve", "strait", "elbow", "angle", "hide", "warnings"] [default: "curve"]
      --listFiles         List all input files found  [boolean] [default: false]
      --orphans           List all orphan nodes (nodes with no edges)  [boolean] [default: false]
  -o, --output            File path to output svg  [string] [default: "./glad.svg"]
  -s, --silent            No output except for errors  [boolean] [default: false]
      --view              Type of diagram to generate  [string] [choices: "poster", "layers", "grid"] [default: "poster"]
  -v, --version           Show version number  [boolean]

Examples:
  glad . --view layers -l --edges -hide  ">>> Produce a diagram with no edges, each layers are numbered."
  glad myGraph.dot --view layers -l      ">>> Generate layers diagram from DOT graph file."

for more information visit https://github.com/amzn/generate-layer-architecture-diagram

License

This project is licensed under the Apache-2.0 License.

Apache 2.0 License