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-admin

v0.0.0

Published

Sails My Admin is a web data manager for any database supported by Sails.

Downloads

45

Readme

#sails-my-admin

Introduction

Sails My Admin is a web data manager for any database supported by Sails. The management interface is user-friendly, easy to use, and includes many beneficial features (listed below). To see which databases are supported, read Sails' Models and ORM documentation. Specifically, the Database Agnosticism section. In short, some of the databases they support are MySQL, PostgreSQL, and MongoDB. Here are almost all the other databases supported. I don't know how this application will work with NoSQL databases.

Terminology

These terminologies should be known for anyone reading this document or the source code:

  • model - a representation of a database table. A model is a JavaScript object that gives key functionality to the represented table in the database. See Sails' models.
  • record - a representation of a row in a table. From Sails' documentation: A record is a uniquely identifiable object that corresponds 1-to-1 with a database entry; e.g. a row in Oracle/MSSQL/PostgreSQL/MySQL, a document in MongoDB, or a hash in Redis. See Sails' documentation on records.

Pages

There are three main pages in this application:

1. The Home Page

url: '/'

The home page is where the user of this application can see all their database tables (known as 'models'). Currently, a user can see how many rows are in each table. Perhaps we will add more information in the future.

2. The List Page

url: '/models/<model-name>'

This page is where users can see the records in the current model they're viewing. Some key features are the ability to see associations in a friendlier way rather than just seeing the ids. For example, if there were two models called User and Pet, and a user can have many pets, then the user can see exactly what pet a User owns, rather than only seeing the ID.

3. The Create / Edit Page

Two possible URLs:

  • uri: '/models/<model name>/create'
  • or
  • url: '/models/<model name>/<record id>'

This page gives the user the ability to edit a record in a database using a friendly form. The key benefits of this form is the ability to use SELECT HTML elements to reference foreign keys for one-to-one relationships, or one-to-many relationships.

Getting Started

These are the steps to get started:

  1. Have NodeJS installed.
  2. Clone this repository.
  3. Run npm install
  4. Create a sma.config.json file at the root of this project. See the example config file in this repository.
  5. Install the sails adapter for your database using NPM.
  6. Use the sails generate api command to generate APIs for your database tables. Essentially, this means that for each table in your database, run sails generate api <table name> in a command prompt at the root of this project. If sails is not a recognized command on your computer, then run npm -g install sails. Then try again.
  7. Edit the generated models files to add your table's columns so Sails knows how to read it. Use Sails' attributes documentation to learn how to do this.
  8. Run npm start and navigate to localhost:1337 in your browser to start using this application! You can also run node app.js --port=<port number> to set the port yourself.

Have fun!

Note: This is a work in progress. Though it's been tested, I'm still shy of saying that this project is complete. Use it at your own risk.