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 🙏

© 2024 – Pkg Stats / Ryan Hefner

jumprope-cms

v0.0.6

Published

A primarily flat fs CMS designed for developers to use. Don't expect to edit it much on the client.

Downloads

7

Readme

CMS/framework. Think something between WordPress and Node.js on Rails. Allows real developers to develop and allows their stakeholders to manage their content. (Looking at you WordPress "developers")

Opinionated like Rails.

Uses MongoDB to manage backend.

Has an admin page like WordPress.

TODO:

  • Admin page
  • How to change what is editable on the backend with admin page?
    • One potential solution would be to predefine services that are editable on the admin page. For instance: products and blog
  • Connect DB
  • Create and use options passed into init()
  • Allow editing of options passed into init() and then reboot server

Object returned (like Express)

Features to test

  • Error handling if services are not configured. (API and routes).

Options Passed Into Init()

Four categories

  • ENV - Replaces environment variables
  • DB - Options for Mongoose and the DB
  • Build - Options for the gulp build task that will be inline
  • Server - Options applicable to the Web/App/API server

Within the context of the three sub-objects that are not ENV the options object will have access to a copy of ENV. We create this copy in the boot function so don't set options.build.env else it will be overwritten.

ENV Options

  • NODE_ENV: Pretty self explanatory. Either null or 'production'.
  • PORT: Port for server to listen on. If not specified defaults to 3030.

DB Options

Build Options

Server Options

Options Ideas
  • Options of each package
  • Logging options

DB

You can specify all the models you want. Once you specify a User model you need to be careful because the default user model will no longer be applicable. This can totally destroy your admin page logins if you aren't careful. For convenience I have provided the original User Schema and Model below.

const mongoose = require('mongoose');
const Schema   = mongoose.Schema;
const bcrypt   = require('bcrypt-nodejs');

const UserSchema = mongoose.Schema({

	local         : {
		email       : String,
		password    : String
	},

	facebook      : {
		id          : String,
		token       : String,
		email       : String,
		name        : String
	},

	twitter       : {
		id          : String,
		token       : String,
		displayName : String,
		username    : String
	},

	google        : {
		id          : String,
		token       : String,
		email       : String,
		name        : String
	}

	accessLevel   : Number

});

//
// Methods
//
// Generating a hash
userSchema.methods.generateHash = function(password) {
    return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
};

// Checking if password is valid
userSchema.methods.validPassword = function(password) {
    return bcrypt.compareSync(password, this.local.password);
};

//
// Create the User model and expose it to the CMS
//
module.exports = mongoose.model('User', userSchema);