🍱 declarative application framework for high-performance cross-platform services
Switch branches/tags
Clone or download
Pull request Compare This branch is even with FabricLabs:tatami.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
components
config
data
docs
examples/bitfaucet
lib
private/less
public
source
test
tools
views
.bookignore
.coveralls.yml
.gitignore
.nodemonignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
SUMMARY.md
addJob.js
book.json
index.js
maki.js
package.json
worker.js

README.md

Maki

Project Status Build Status Coverage Status Total Contributors Sustainability

The complete stack for building extensible apps, faster than ever. Hand-roll your application by telling Maki what your application does, and it takes care of the rest – without getting in your way if you want to customize it.

  • Write Once, Deploy Everywhere Maki enables a standard definition for applications beyond simply web apps. Because of our resource grammar, we can build desktop and native mobile applications directly – all in supplement to your web application. All with the same code.
  • Resource-Derived Infrastructure REST makes a lot of sense for APIs – we take it one step further and build the entire application around Resources as named channels, serving events and static documents alike. Even Desktop applications built with Maki use the same, familiar API!
  • Robust Plugin Ecosystem Maki is an extensible framework – and there's already a huge list of plugins to provide common (and some not so common!) functionality to your application with almost zero-configuration. For example, Maki's identity protocol allows us to support both username/password auth and cryptographic identity!

Quick Start

You'll need node.js to build a Maki application. Additionally, MongoDB and Redis are the default storage and messaging engines, so you will need to install and configure them to use the defaults, or override them if you'd like to use something different. We'll be changing this in an upcoming release – see #58 for progress!

  1. Install Maki: npm install martindale/maki
  2. Create your app, perhaps in yourapp.js:
var Maki = require('maki');
var myApp = new Maki();

myApp.define('Widget', {
  attributes: {
    name: String
  }
});

myApp.start();
  1. Start your app: node yourapp.js – by default, accessible at http://localhost:9200

Behaviors

Maki applications allow you to construct pipelines, as follows:

// same as above
var Widget = myApp.define('Widget', { attributes: { name: String } });

Widget.pre('create', function(next, done) {
  var widget = this;
  // do something before creation...
  // call next() to continue creation, or done() to complete.  Pass done(err) to
  // abort the pipeline!  Useful for custom validation rules. :)
});

Widget.post('create', function() {
  var widget = this;
  // do something after creation!  This too is a pipeline – the tasks are
  // executed in the order they are injected.
});

Methods

All Maki resources expose these five methods, all of which follow the above pipeline:

  • query to select a list of documents,
  • get to get a single instance of a document by its identifier (ID),
  • create to create a new instance of a document,
  • update to change properties of a document, and
  • destroy to remove a document.

Plugins & Modules

Maki aims to be as lightweight as possible while still offering a base stack that implements #1. We've split out as many components as possible, and offer a list of plugins that can be used to add functionality to any Maki-powered app.

Core Modules

Name Version Build Status Coverage
maki-queue NPM Package Build Status Coverage Status
maki-mongoose-hooks NPM Package Build Status Coverage Status
maki-service-websockets NPM Package Build Status Coverage Status
maki-forms NPM Package Build Status Coverage Status

Plugins

Name Version Build Status Coverage
maki-sessions NPM Package Build Status Coverage Status
maki-passport-local NPM Package Build Status Coverage Status
maki-passport-github NPM Package Build Status Coverage Status
maki-passport-soundcloud NPM Package Build Status Coverage Status
maki-analytics NPM Package Build Status Coverage Status
maki-forms NPM Package Build Status Coverage Status
maki-types-file NPM Package Build Status Coverage Status
maki-assets NPM Package Build Status Coverage Status
maki-client NPM Package Build Status Coverage Status
maki-cms-local NPM Package Build Status Coverage Status

Documentation

For our documentation, see the docs/ subfolder.

Contributors

Special thanks to the whole Maki community for supporting this project with their presence and more.

Many, many other contributors deserve recognition for their work on the open source projects that have made Maki possible. See package.json for just a few of them.

Spirit

Please feel free to submit changes to this repo via pull requests! We're trying to keep this as general and flexible as possible, so anyone can take the project and run with it.