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!
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!
- Install Maki:
npm install martindale/maki
- Create your app, perhaps in
yourapp.js
:
var Maki = require('maki');
var myApp = new Maki();
myApp.define('Widget', {
attributes: {
name: String
}
});
myApp.start();
- Start your app:
node yourapp.js
– by default, accessible at http://localhost:9200
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.
});
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.
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.
Name | Version | Build Status | Coverage |
---|---|---|---|
maki-queue | |||
maki-mongoose-hooks | |||
maki-service-websockets | |||
maki-forms |
Name | Version | Build Status | Coverage |
---|---|---|---|
maki-sessions | |||
maki-passport-local | |||
maki-passport-github | |||
maki-passport-soundcloud | |||
maki-analytics | |||
maki-forms | |||
maki-types-file | |||
maki-assets | |||
maki-client | |||
maki-cms-local |
For our documentation, see the docs/
subfolder.
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.
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.