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

database-studio

v1.0.8

Published

[![Version](https://img.shields.io/badge/version-1.0.6-blue.svg)](./package.json) [![License](https://img.shields.io/badge/license-MIT-green.svg)](#license) [![Tech Stack](https://img.shields.io/badge/tech-React%20%7C%20Express%20%7C%20MySQL%20%7C%20Mongo

Readme

Database Studio 🚀

Version License Tech Stack

Database Studio is a high-performance, full-stack database viewer and schema explorer. Designed for developers and DBAs, it provides a modern interface to explore, analyze, and document your MySQL and MongoDB databases.

npx database-studio

🌟 Key Features

📊 Interactive Data Viewer

Browse your data with a paginated table interface. Works with MySQL tables and MongoDB collections seamlessly.

📐 Visual Schema Explorer

Visualize your entire database architecture at a glance. Grid-based Schema View with interactive cards and dynamic color-coding. For MongoDB, schemas are automatically inferred by sampling collection documents.

🎨 Canvas View

Drag-and-drop schema visualization with table relationships rendered as an interactive canvas.

📄 PDF Export

Generate professional A4 schema documentation with a single click. Powered by Puppeteer server-side rendering with full style fidelity.

🔐 License-Gated Access

  • JWT session management with HTTP-only cookies
  • RSA-256 offline verification
  • Machine-ID binding for license integrity

🛠️ Developer-First

  • Toggle between 1-4 column grid layouts
  • Switch between Data View, Schema View, and Canvas View
  • Starts in setup mode with inline docs when no database is configured

🚀 Quick Start

Prerequisites

  • Node.js v18+
  • MySQL or MongoDB instance

Usage via npx

npx database-studio

Usage via global install

npm i -g database-studio
database-studio

Environment Configuration

Create a .env file in your project root with one of the following:

# For MySQL
MYSQL_URL=mysql://user:password@localhost:3306/your_database

# For MongoDB (either variable name works)
MONGODB_URL=mongodb://user:password@localhost:27017/your_database
MONGODB_URI=mongodb+srv://user:[email protected]/your_database

Optional:

PORT=5555   # defaults to 5555

Database Studio auto-detects which database to connect to based on the env variable present. If neither is set, it starts in setup mode showing configuration docs in the browser.


💻 Tech Stack


🏗️ Architecture

client/              # React SPA
├── components/      # UI & feature components
├── pages/           # Route-level views
└── lib/             # Utilities and API wrappers

server/              # Express API
├── index.ts         # Routes, license, PDF export
├── config/          # Server configuration
└── drivers/         # Database driver abstraction
    ├── types.ts     # DbDriver interface
    ├── mysql.ts     # MySQL implementation
    ├── mongodb.ts   # MongoDB implementation
    └── index.ts     # Auto-detection factory

bin/                 # CLI entry point

Driver Pattern

All database operations go through a DbDriver interface. The server auto-detects which driver to use based on environment variables — zero conditionals in route handlers.

| Method | MySQL | MongoDB | |--------|-------|---------| | getDatabaseName() | SELECT DATABASE() | db.databaseName | | getTables() | SHOW TABLES | db.listCollections() | | getTableSchema() | SHOW COLUMNS + FK query | Sample 100 docs, infer types | | getTableData() | SELECT * LIMIT OFFSET | find().skip().limit() |


📑 PDF Export Engine

  1. Headless Navigation: Puppeteer visits ?view=schema&export=true
  2. Adaptive CSS: Print-specific layout with hidden interactive elements
  3. Full Fidelity: Captures Tailwind styles into multi-page A4 PDF

🔒 License & Security

Requires a license key on first use. The licensing system uses RSA-256 signatures and Machine-ID hashing.


Part of the Database Studio Workspace.