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

dbsmash

v1.0.7

Published

[![NPM Version](https://img.shields.io/npm/v/dbsmash)](https://www.npmjs.com/package/dbsmash) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Node.js](https://img.shields.io/badge/Node.js-v18+-gree

Readme

⚡️ DbSmash

NPM Version License Node.js

DbSmash is an AI-powered CLI tool that transforms your app ideas into database schemas, models, relationships, and seeders for:

  • MongoDB (Mongoose)
  • Firebase Firestore
  • Supabase (via Prisma ORM)

Describe your app in plain English, select a database, and DbSmash generates production-ready code in seconds.

github

Gihub repo

🚀 Features

  • 🔍 AI agent converts natural language prompts into schemas
  • 🧩 Supports MongoDB (Mongoose), Firestore (Node.js), and Supabase (Prisma)
  • 📄 Auto-generates models, seeders, and DB config files
  • 🧠 Generates ER diagrams
  • 🧪 Automates backend database setup

Checkout Website

📦 Installation

npm i dbsmash

Requires Node.js v18+

⚙️ Environment Setup

Create a .env file in your project root with the necessary credentials:

# Required for Firebase Firestore

FIREBASE_CREDENTIALS="../../keys.json (download from firestore and save it as keys.json inside the backend root folder)"

# Optional: MongoDB URI
MONGODB_URI=mongodb+srv://username:[email protected]/dbname

# Optional: Prisma/Supabase

  Go to dashboard -> project -> projectname -> settings -> api-keys -> Click on connect on the top left
  (Inside Connection String)
SUPABASE_DATABASE_URL= Transaction pooler url
SUPABASE_DIRECT_URL= Session pooler url

# AI API Key (Gemini & OpenRouter)
GEMINI_API_KEY=your-key-here

OPEN_ROUTER_MISTRAL=your-key-here
// mistralai/mistral-small-3.2-24b-instruct:free

⚠️ Important: Back up your existing .env file before running dbsmash, as it may overwrite it.

🧑‍💻 CLI Usage

1. Start (Inside Backend Folder)

dbsmash

2. Provide a Prompt

Describe your app in plain English, e.g.:

I want an e-commerce app with users, products, and orders

3. Select a Database

Choose a database from the prompted list (MongoDB, Firestore, or Supabase).

4. Code Generation

DbSmash will:

  • Necessary packages will be installed Automatically
  • Generate schema, models, and seeders
  • Create database configuration files

Generated Files:

/models/
  user.model.js
  product.model.js
  order.model.js

/config/
  dbconnection.js

/seed/
  seedUsers.js
  seedProducts.js

5. Database Initialization

After code generation, DbSmash will prompt you with database-specific commands to spin up the database. Examples:

Supabase:

npx prisma migrate dev
npx prisma studio

MongoDB:

node ./src/seed/sampleData.js

Firebase Firestore:

node ./src/firestore/schema.js

🧱 Project Structure

dbsmash/
├── lib/ai-agents/       # AI prompt parsing logic
├── models/              # Generated MongoDB or Prisma models
├── config/              # DB connection files
├── seed/                # Sample data for testing
├── server/              # Express + socket.io backend
└── index.js             # CLI entry point

🛠 Tech Stack

  • 🧠 Gemini / OpenRouter (AI agent)
  • 🗃 MongoDB / Firestore / Supabase
  • ⚙️ Node.js
  • 🧰 Prisma ORM

🧪 Example CLI Output

Prompt: "I want a blog app with users and posts"
→ Generating schema...
✔ users.model.js created
✔ posts.model.js created
✔ dbconnection.js created
✔ ER diagram ready

📌 Roadmap

  • [x] MongoDB & Firestore support
  • [x] CLI for instant schema creation
  • [ ] PostgreSQL + GraphQL support
  • [ ] VS Code extension
  • [ ] GitHub Copilot-style schema preview

🤝 Contributing

Pull requests and ideas are welcome! Create an issue or open a discussion to suggest features.

👨‍💻 Author

Built with ❤️ by N Siddharth Reddy
Backend Developer | Node.js | MongoDB | Prisma | AI Tools

📄 License

This project is licensed under the MIT License.