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

db-scalability-guardian

v1.0.4

Published

A CLI tool for analyzing database migrations and schema changes for scalability and evolvability risks

Downloads

523

Readme

DB Scalability Guardian

Analyze database migrations for scalability and evolvability risks before they hit production.

Features

  • 🔍 16+ deterministic rules — Detects NOT NULL additions, type changes, drops, index locks, enum modifications
  • 🤖 AI-powered analysis — Architectural insights and future feature blockers (paid plans)
  • 🚦 CI/CD gate — Block deployments on HIGH/CRITICAL findings
  • 📊 Multiple formats — JSON + Markdown reports
  • 🔀 Git-aware — Only analyzes changed migrations between branches

Installation

npm install --save-dev db-scalability-guardian

Quick Start

1. Get Your API Key

Create a free account at db-guardian.com and generate your API key.

2. Set Environment Variable

export DB_GUARDIAN_API_KEY=DB-GUARDIAN-XXXXX

3. Run Analysis

npx db-scalability-guardian analyze

Configuration

Create guardian.config.json in your repository root (optional):

{
  "database": {
    "migrationsPath": "prisma/migrations"
  },
  "gate": {
    "failOn": ["HIGH", "CRITICAL"]
  },
  "guardian": {
    "enableAI": true
  }
}

| Option | Description | Default | |--------|-------------|---------| | database.migrationsPath | Path to migrations folder | prisma/migrations | | gate.failOn | Severities that cause exit code 1 | ["HIGH", "CRITICAL"] | | guardian.enableAI | Enable AI analysis (paid plans) | true |

GitHub Actions

name: DB Scalability Check

on:
  pull_request:
    branches: [main]

jobs:
  guardian:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: actions/setup-node@v4
        with:
          node-version: '20'

      - name: Run DB Scalability Guardian
        run: npx db-scalability-guardian analyze
        env:
          DB_GUARDIAN_API_KEY: ${{ secrets.DB_GUARDIAN_API_KEY }}

      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: guardian-reports
          path: guardian-reports/

Output

Reports are generated in guardian-reports/:

| File | Description | |------|-------------| | guardian-report.json | Machine-readable findings | | guardian-report.md | Human-readable report | | guardian-llm-analysis.md | AI architectural analysis (if enabled) |

Detected Patterns

| Severity | Patterns | |----------|----------| | CRITICAL | DROP TABLE, DROP COLUMN, TRUNCATE | | HIGH | ADD COLUMN NOT NULL, TYPE CHANGE, RENAME TABLE, ALTER TYPE ADD/DROP VALUE, SET NOT NULL | | MEDIUM | CREATE INDEX, ADD FK, RENAME COLUMN, Multiple ALTER TABLE, UPDATE/DELETE | | LOW | DROP INDEX |

Exit Codes

  • 0 — Success, no blocking findings
  • 1 — Blocking findings detected

Pricing

| Plan | Deterministic | AI Analysis | Price | |------|--------------|-------------|-------| | Free | ✅ Unlimited | ❌ | $0 | | Starter | ✅ Unlimited | 50/month | $9/mo | | Professional | ✅ Unlimited | 200/month | $29/mo |

Overage: $0.015 per additional AI analysis.

License

ISC