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

sriracha

v1.0.0

Published

A spicy admin middleware for mongoose and express.

Readme

Sriracha

A super spicy admin backend for Express and Mongoose.

Image of Sriracha

Build Status Coverage Status Dependency Status devDependency Status npm version

Sriracha is an Express app that can be mounted as middleware to any url in your application. The admin site's routes and editing interface are generated dynamically based on your Mongoose Models. Options are available to control the look and feel of the admin site.

Quick Start

  1. Install Sriracha:
npm install --save sriracha-admin
  1. Include Sriracha in your express app and mount it to a url.
var express = require('express');
var admin = require('sriracha-admin');

app = express();
...
app.use('/admin', admin());
  1. Login with username admin and password admin.

Sriracha is running at yourapp/admin!

Image of Sriracha Landing Page

Setting Options Globally

Options can be set globally through the options object passed to the middleware.

var options = {...};
app.use('/admin', admin(options));

username default: 'admin' User name used to access admin backend.

password default: 'admin' Password used to access the admin backend.

hideFields: default: ['_id', '_v'] Fields that are hidden in all documents and collections.

<collection>.searchField: default: undefined Sriracha implements a simple (for now) autocomplete query against the specified field.

For instance, to search against the email field in the User model, you would supply the following option:

var options = {
...,
User: {
  searchField: 'email'
}
...
}

<collection>.admin default: undefined A setting of false will hide this field from the admin.

Field Types

Field types are set automatically by Sriracha based on the Mongo schema type. However, they can also be customized. Using the 'adminFieldType' option. See the setting options on a schema for examples of how to set custom field types.

Sriracha currently supports the following field types:

text default: String and ObjectId schema types. A simple string input field.

text field

textarea default: none The text area field allows easy inline editing of larger portions of text. The textarea field uses TinyMCE and stores it's results as HTML.

textarea field

date default: Date schema type. A date picker field using the datepicker jquery plugin.

date field

array default: Array schema type. An input that accepts a comma separated list of values.

date field

checkbox default: Boolean schema type. A checkbox that setts a boolean field to true or false.

ref default: Reference to other documents. An input of tags representing references to other documents.

date field

Setting Options on a Schema

All <collection> level options can be set on an individual schema as well. They will take precedence over the same options if they are also defined globally.

To set schema level options, provide the option, prefixed with admin.

For example, the following schema would set the lastName to the search field for users, and would hide the email and onboarding.signupDate fields.

...
var Schema = mongoose.Schema;

var UserSchema = new Schema({
  lastName: {
    type: String,
    default: '',
    adminSearchField: true
  },
  ...,
  email: {
    type: String,
    admin: false
  }
  onboarding: {
    signupDate: {
      type: Date,
      admin: false
    },
    hasLoggedIn: {
      type: Boolean,
      default: false
    }
  },
});
...

Examples

Examples can be found in the ./examples directory. To run them:

git clone <this-repo-or-your-fork>
cd <this-repo-or-your-fork>
npm install
# run the app with simple setup
gulp simple
# run the app with advanced setup
gulp advanced

Contributing

Contributing is anything from filing bugs, to requesting new features, to building features and their tests. Read the Contributing doc to find out more.

Acknowledgments

Thanks Iron Summit Media Strategies for the awesome Start Bootstrap Themes.

Siracha started with SB Admin and I used Jade Converter to turn it into Jade.