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

sevr

v0.3.0

Published

A modern framework for building custom content management systems

Downloads

8

Readme

Sevr CMS Framework

npm Build Status David

Sevr is modern Node.js framework for building custom content management systems. Sevr is built on a composable architecture allowing you to creating custom solutions with only the features they need, and nothing you dont.

Disclaimer: This is still in alpha stages and as such, the api is likely to change.

API

Getting Started

The best way to first get started with the Sevr is to follow the tutorial, sevr-tutorial. This will guide you through the setup and common patterns while building a simple blog. If you'd like start from scratch, however, please read on.

Note: Sevr requires a MongoDB instance. This guide assumes one is already set up and running.

Installation

Sevr is available from npm

npm install --save sevr

Directory Structure

In order to run the application, a few directories and files are needed. The following top-level directories are required: collections, types. These directories can remain empty for now. Additionally, an index.js should be added to the root of the project.

Connecting to MongoDB

By default, Sevr will start a new database called 'sevr' on localhost:27017, however this is easily configured:

connection: {
	host: 'localhost',
	port: 27017,
	username: null,
	password: null,
	database: 'sevr'
}

Boilerplate

const Sevr = require('sevr')

const config = {}
const sevr = new Sevr(config)

// Start it up
sevr.start()
	.then(() => {
		sevr.logger.verbose('Ch-check it out. Sevr is ready to go!')
	})
	.catch(err => {
		sevr.logger.error(err.stack)
	})

// Start the Express web server
sevr.startServer()

Collections

Collections are at the heart of any application on the Sevr framework, and are analogous to tables in a relational database. Collections are created by first defining them, with a collection definition, a JavaScript object, which defines the structure and behavior of data within that collection. Collection definitions are defined in the collections directory. Each defintion should be in its own file. More information on creating collection definitions can be found with the Collection API.

Types

Sevr provides many standard data types for collections, but there are times where a custom type will need to be defined to offer specific behavior. Like collection definitions, these are JavaScript objects, which define the underlying data type, validation, and various meta information. Custom types are defined in the types directory. Each type should be in its own file. More information on creating custom types can be found with the Type API.

Plugins

The core framework for Sevr is very lean, which mostly offers a base for working with the data layer and providing a web server instance. Most applications built on the Sevr Framework will need to add a few plugins to enable the features needed for a full functioning system. The lean core here, allows for great flexibility without adding a lot of unnecessary bloat to your projects. More information about plugins can be found with the Plugin API

Tests

Tests are run using Mocha, and create a test database, sevr-test.

npm test

Available Plugins

  • Sevr CLI - Command line interface for the Sevr Framework
  • Sevr Perm - Collection roles and permissions

License

This project is licensed under the MIT license.