• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
njbotkin

njbotkin

pnpm-lockfile-visualizer

Public
Like
pnpm-lockfile-visualizer
Home
Code
4
frontend
6
README.md
H
main.ts
sample-pnpm-lock.yaml
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
main.ts
https://njbotkin--09fff33eb6b711f0b7de0224a6c84d84.web.val.run
README.md

PNPM Lockfile Dependency Visualizer

A web application that visualizes dependencies from pnpm-lock.yaml files using D3.js force-directed graphs.

Features

  • File Upload: Drag and drop or click to upload pnpm-lock.yaml files
  • Folder-based Visualization: Separate graphs for each workspace/folder in your project
  • Interactive Force-Directed Graphs:
    • Drag nodes to reposition them
    • Zoom and pan to explore large dependency trees
    • Hover tooltips showing package details
  • Customizable Layout: Adjust force simulation strength
  • Color-coded Dependencies:
    • Blue: Main packages/workspaces
    • Green: Regular dependencies
    • Yellow: Dev dependencies
    • Purple: Optional dependencies
    • Red links: Dev dependency relationships
    • Teal links: Regular dependency relationships
    • Purple links: Optional dependency relationships

How to Use

  1. Open the application in your browser
  2. Upload a pnpm-lock.yaml file by:
    • Dragging and dropping it onto the upload area, or
    • Clicking the upload area to browse for the file
    • Try it out: Use the included sample-pnpm-lock.yaml file to test the application
  3. Select a folder from the dropdown menu to visualize its dependencies
  4. Interact with the graph:
    • Drag nodes to reposition them
    • Use mouse wheel to zoom in/out
    • Pan by dragging empty space
    • Hover over nodes to see package details
  5. Adjust the layout strength slider to change how tightly nodes cluster
  6. Use "Reset Zoom" to return to the default view

Technical Details

Architecture

  • Frontend: Vanilla JavaScript with D3.js for visualization
  • Backend: Hono server for serving static files
  • Styling: TailwindCSS for responsive design

File Structure

├── frontend/
│   ├── compact.html      # Main HTML template (optimized)
│   ├── simple-app.js     # JavaScript application logic
│   ├── index.html        # Original HTML template
│   ├── app.js           # Original JavaScript (large file)
│   └── simple.html      # Test HTML template
├── main.ts              # Hono server entry point
├── sample-pnpm-lock.yaml # Sample lockfile for testing
└── README.md            # This file

Dependencies

  • D3.js v7 for force-directed graph visualization
  • TailwindCSS for styling
  • Hono for the web server

Supported File Format

The application expects pnpm-lock.yaml files with the standard pnpm lockfile structure:

packages: /: dependencies: package-name: version devDependencies: dev-package: version /workspace-folder: dependencies: another-package: version

Browser Compatibility

Works in all modern browsers that support:

  • ES6+ JavaScript features
  • SVG rendering
  • File API for drag-and-drop uploads

Limitations

  • Currently supports pnpm-lock.yaml files only
  • Uses a simplified YAML parser (works for standard pnpm lockfiles)
  • Large dependency trees may impact performance
  • No persistent storage - data is lost on page refresh
HTTP
  • main.ts
    njbotkin--09…84.web.val.run
Code
frontendREADME.md
H
main.ts
sample-pnpm-lock.yaml
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.