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

project-health-checker

v1.0.0

Published

"CLI tool that statically analyzes full-stack JS projects for route mismatches, dependency issues, and env var drift"

Readme

🔍 Project Health Checker

A CLI tool that statically analyzes full-stack JavaScript projects (Node.js/Express + React/plain JS frontend) and detects common real-world bugs before they cause runtime errors — using AST (Abstract Syntax Tree) parsing via Babel.

No runtime required. No dependencies installed. Just point it at your project and get a report.


What It Checks

1. API Route Drift

Compares Express backend routes against frontend API calls (axios/fetch) and flags:

  • Frontend calls an endpoint that doesn't exist on the backend
  • Backend route is never called from the frontend (dead route)
  • Same path but different HTTP method

2. Dependency Check

Compares packages actually imported/required in code against package.json and flags:

  • Packages used in code but missing from package.json
  • Packages installed but never imported anywhere (unused bloat)

3. Environment Variable Check

Finds all process.env.X usage across the codebase and flags:

  • Any variable used in code but not declared in .env or .env.example

4. External API Usage Detector

Detects calls to known third-party APIs (OpenAI, Google Maps, Twilio, Stripe, etc.) and flags:

  • Hardcoded base URLs in code
  • External API calls with no nearby API key env var (possible hardcoded secret risk)

Installation

npm install -g project-health-checker

Or run without installing:

npx project-health-checker

Usage

Run from the root of your project:

project-health-check

The tool auto-detects common folder names (routes/, src/, client/, api/).

Custom paths

project-health-check --backend ./api/routes --frontend ./client/src

All flags

| Flag | Shorthand | Description | Default | | ------------ | --------- | ---------------------------------------- | ------------- | | --backend | -b | Path to backend routes folder | Auto-detected | | --frontend | -f | Path to frontend folder | Auto-detected | | --project | -p | Project root (for package.json and .env) | . |


Sample Output

🔍 Project Health Check Report Routes: ✖ [MISSING_BACKEND_ROUTE] Frontend calls GET /profiles/:param (in api.js:17) but no matching backend route exists ✖ [DEAD_ROUTE] Backend route PUT /users/:id (in users.js:17) is never called from the frontend

Dependencies: ✖ Missing from package.json: lodash ⚠ Installed but unused: mongoose

Environment Variables: ✖ Used in code but not declared: SECRET_KEY

External APIs: ✖ Hardcoded URL to api.openai.com — no API key env var found nearby (api.js:23) ⚠ Hardcoded URL to maps.googleapis.com (api.js:13) 6 issue(s) found.


Tech Stack


Limitations

  • Detects axios and fetch calls only (not custom HTTP wrappers)
  • Route matching uses normalized wildcard comparison — dynamic routes constructed programmatically may not be detected
  • External API detection covers a fixed list of known domains (OpenAI, Google Maps, Razorpay, Twilio, Stripe, SendGrid)

Roadmap

  • [ ] Missing await on async DB calls (Mongoose)
  • [ ] --html flag for visual HTML report
  • [ ] Git pre-commit hook integration
  • [ ] Support for custom HTTP client wrappers

Author

Jeevan B M
GitHub · npm


License

MIT