"Life is like a npm install - you never know what you gonna get." - Forrest Gump

I was always wondering what dependencies my NodeJS applications are using. The first layer is clear, because I add them in the package.json like in this small example:

{
  "name": "my-app",
  "version": "1.0.0",
  "dependencies": {
    "react": "^18.0.0",
    "lodash": "^4.17.21"
  }
}

A small package.json as example

But further down I have no clue what my application is dragging in. So I started a little Pet Project called 'Forrest'. In this application you can paste in your package.json and Forrest will load all dependencies from the npm registry. It analyzes what you are using and what dependencies the dependencies are using. The user can decide how many levels need to be loaded initially. As a default this is set to 2, but you can dig deeper after the initial load.

Tree View for package.json of forrest

Also Forrest gives you a map view, where all dependencies and devDependencies are linked together.

Map View for package.json of forrest

Forrest is implemented in React. All operations are executed entirely on the frontend. To resolve dependencies, the application spawns web workers that asynchronously fetch the required data in the background and return the results to the requesting worker.

Forrest Worker Pool View

Currently Forrest is in active development and many bugs need to be addressed. So many features are incoming in the future. Check out the code in the Github Repository or give it a try.

https://forrest.fkbd.xyz

GitHub - 0x49b/forrest
Contribute to 0x49b/forrest development by creating an account on GitHub.