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

thin-cms

v0.2.3

Published

A lean, mean, headless CMS built in Angular2 that will let you manage any existing Mongoose schemas and then some without designing your project around it.

Downloads

7

Readme

Thin CMS

Alt text

A lean, mean, headless CMS built with Angular 2 that will let you manage existing Mongoose data without designing your project around it.

var cms = require('thin-cms');

cms.init(
  'my-mongo-domain.com/my-db',
  {
    MongooseModel1.modelName: MongooseModel1.schema,
    MongooseModel2.modelName: MongooseModel2.schema,
    MongooseModel3.modelName: MongooseModel3.schema,
    ...
  }
);

Philosophy

A content management system shouldn't be a monolithic system that you build your app within. It should be a lightweight and friendly data management interface that you can easily add to whatever kind of application you want to build. It's only used to manage data, so its only concern should be data.

Features

  • Define data models with vanilla Mongoose schemas for simple configuration
  • Log in with existing Mongo user accounts for simple permission management
  • Optional CMS-specific schema attributes for tailoring user interface, but vanilla Mongoose schemas will always work in the CMS, and extended schemas will always work in Mongoose
  • Completely independent from application; only requires schemas and database access
  • Can be run on the same Node.js process as the application, or on a separate one

CMS-specific schema property attributes

Example:

var Post = new Schema({
  published : { type: Boolean },
  title     : { type: String },
  body      : { type: String, customProp: 'val' },
  url       : { type: String }
});

Optional Attributes for all types

hidden: Boolean

If set to true, this attribute will be stored and can be retrieved and edited with code as normal, but will not appear in the CMS user interface. This is useful for auto-generated attributes, or anything else that's technical or shouldn't be modified by normal users.

Optional Attributes for Number

isMoney: Boolean

Whether or not this number is considered to be money. Affects appearance and decimal precision in the Admin UI.

Optional Attributes for String

stringType: String

Value can be 'short', 'long', or 'rich'. Defaults to 'short' when no value given. Can be added to properties of type String to specify what kind of input should appear in the editor. 'short' yields a single-ling text input, 'long' yields a text area input, and 'rich' yields a rich text editor. Note that text created by the 'rich' editor type will be styled HTML, and will need to be rendered as such.

Things I'm working on

  • Sort/search in collection views
  • Datepicker
  • WYSIWYG editor (for rich text fields)
  • Security (do NOT use Thin CMS in production outside a VPN right now; passwords are sent in plaintext)
  • Site global settings
  • Pagination/infinite scroll in collection views
  • Client-side visuals for Mongoose validation attributes
  • Support for object relationship properties
  • Admin UI theming?

Things that would be neat

  • Support for non-Mongo databases

If anyone feels like grabbing a feature off of one of these lists - especially the "neat" list - and developing it and submitting a pull request, I'd officially certify you as a Really Cool Person.