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

codesynapse

v1.1.1

Published

Real-time codebase visualization tool with neural network-style 3D graph. Watch your code evolve as AI agents work.

Readme

CodeSynapse

Real-time codebase visualization that looks like a living neural network

Watch your code evolve in 3D as files light up like neurons firing. Perfect for understanding codebases and monitoring AI agents at work.

CodeSynapse Visualization

npm version License: MIT

Features

  • 3D Neural Network Visualization - Files as neurons, dependencies as synapses
  • Real-time Updates - Watch changes happen live as you code
  • Dependency Mapping - Automatically parse and visualize import/require relationships
  • Git Diff Integration - Click any file to see code changes
  • Beautiful Effects - Glow effects, pulse animations, and particle flows
  • High Performance - Smooth 60fps visualization even with large codebases
  • AI Agent Friendly - Perfect for watching AI agents work on your code

Demo

Watch your codebase come alive:

  1. Point CodeSynapse at any directory
  2. See all files appear as glowing nodes in 3D space
  3. Dependencies light up as connections between files
  4. When you edit a file, it pulses with cyan light
  5. Click any node to see the git diff in a side panel
  6. Watch the neural network grow as you add more code

Installation

Global Installation (Recommended)

npm install -g codesynapse

Local Installation

npm install --save-dev codesynapse

Usage

Quick Start

Navigate to your project directory and run:

codesynapse

This will:

  1. Start the visualization server on http://localhost:3004
  2. Automatically open your browser
  3. Begin watching your project directory
  4. If port 3004 is in use, it will automatically try the next available port

Command Line Options

codesynapse [options]

Options:
  --port <port>     Specify port (default: 3004)
  --no-open         Don't automatically open browser

Examples:

# Run on a different port
codesynapse --port 8080

# Don't auto-open browser
codesynapse --no-open

Using the Visualization

  1. Start Watching - Click "Start Watching" to begin monitoring your project
  2. Explore the Graph - Drag to rotate, scroll to zoom, click nodes to view code
  3. Watch Changes - Edit files and see them light up in real-time:
    • Green (0-5s) - Just changed, pulsing
    • Amber (5-30s) - Recently active
    • Yellow (30-60s) - Cooling down
    • Blue/Purple/etc. - Stable (color by file type)
  4. View Code - Click any node to see syntax-highlighted code and git diffs
  5. Toggle Theme - Click the sun/moon icon for light/dark mode

Controls

  • Mouse drag: Rotate the camera
  • Scroll: Zoom in/out
  • Click node: View file details and git diff
  • Hover node: See file info tooltip

🏗️ Architecture

code-synapse/
├── server/              # Node.js + Express + Socket.io backend
│   ├── FileWatcher.ts   # Real-time file monitoring (Chokidar)
│   ├── DependencyParser.ts  # AST parsing (@babel/parser)
│   ├── GitIntegration.ts    # Git diff tracking (simple-git)
│   ├── GraphBuilder.ts      # Graph data structure
│   └── index.ts            # WebSocket server
│
├── client/              # React + Three.js frontend
│   ├── components/
│   │   ├── Graph3D.tsx      # 3D visualization (react-force-graph-3d)
│   │   ├── DiffPanel.tsx    # Git diff viewer
│   │   ├── Controls.tsx     # UI controls
│   │   └── Stats.tsx        # Live statistics
│   └── hooks/
│       └── useWebSocket.ts  # Socket.io client

Tech Stack

Backend:

  • Express - HTTP server
  • Socket.io - Real-time WebSocket communication
  • Chokidar - File system watching
  • @babel/parser - JavaScript/TypeScript AST parsing
  • simple-git - Git integration

Frontend:

  • React 18 - UI framework
  • Three.js - 3D graphics
  • react-force-graph-3d - Force-directed graph layout
  • Socket.io-client - Real-time updates

Language:

  • TypeScript throughout for type safety

🎨 Visualization Details

Node Colors

Files are colored by type:

  • JavaScript (.js, .jsx, .mjs, .cjs) - Yellow
  • TypeScript (.ts, .tsx) - Blue
  • JSON (.json) - Green
  • Styles (.css, .scss, .sass, .less) - Purple
  • Markup (.html) - Red
  • Markdown (.md) - Green
  • Other files - Gray

Node Size

Nodes scale based on:

  • Number of connections (imports/exports)
  • File size
  • Change frequency

Visual Effects

  • Pulse animation: Recently changed files glow cyan and pulse
  • Particle flow: Particles travel along dependency connections
  • Glow aura: All nodes have a subtle glow effect
  • Connection highlighting: Hover to see connected files

Use Cases

1. Understanding Codebases

Quickly visualize the structure and dependencies of unfamiliar projects.

2. Watching AI Agents

See exactly what files an AI agent is modifying in real-time.

3. Refactoring

Understand the impact of changes by seeing which files are connected.

4. Code Reviews

Visualize the scope of changes in a pull request.

5. Teaching

Help others understand project architecture visually.

⚙️ Configuration

Create a .codesynapse.json file in your project root:

{
  "ignorePatterns": [
    "**/node_modules/**",
    "**/.git/**",
    "**/dist/**",
    "**/build/**"
  ],
  "colors": {
    "javascript": "#f1e05a",
    "typescript": "#2b7489",
    "json": "#00d084"
  }
}

🔧 Development

Project Structure

npm run dev           # Start both server and client
npm run build         # Build for production
npm start            # Run production build

Server Development

cd server
npm run dev          # Start with hot reload
npm run build        # Compile TypeScript

Client Development

cd client
npm run dev          # Start React dev server
npm run build        # Build for production

🐛 Troubleshooting

"Not a git repository" message

This is normal if the directory you're watching isn't a git repo. Git features will be disabled but file watching still works.

Large codebases slow

Try adjusting physics settings or filtering file types in the configuration.

Connection issues

Make sure both server (3001) and client (3000) ports are available.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contact

Christian Johnson Email: [email protected] GitHub: @metisos

License

MIT License - feel free to use this in your own projects!

🙏 Acknowledgments

Built with:

🚀 Future Ideas

  • Support for more languages (Python, Go, Rust, Java)
  • Time-travel mode to replay changes
  • Heatmap visualization for hot spots
  • Multi-project view
  • VR mode for immersive exploration
  • VS Code extension
  • Collaborative mode

Made for developers who love beautiful visualizations