Eskimo - Node Boilerplate Framework for Rapid MVP's


August 2014

Introducing Eskimo

Eskimo

If an eskimo builds an igloo, and an igloo is a structure made up of individual building blocks, then eskimo is a command line interface (“CLI”) used for building an igloo.

Eskimo is a new Node.js boilerplate for building Rapid MVP’s (“RMVP’s”).

Launched at a NYC Node.js Meetup held at Microsoft on August 27, 2014.

Problems

Cluttered community

Boilerplates

Despite an abundance of boilerplates and frameworks (“project starters”), the Node community lacks an up-to-date, opinionated, simple, modular, and minimal project starter (specifically for building RMVP’s with). Projects start off small and opinionated by one person, but then they become influenced by contributors and grow to unmaintainable proportions. Searching on Google and GitHub for “node boilerplates” or “node frameworks” yields hundreds of results.

Sails/Locomotive !== Express 4.x

Express 3 vs. 4

Due to heavy reliance on connect in express 3.x, the projects have become outdated and do not abide by the concept of “use individual components” (sails #1684 and locomotive #159).

Lack of automation and best-practices

Best Practices

Many project starters lack automation for testing and production deployments. Several ignore front-end best-practices such as having an asset pipeline (uglify/minify/optimize assets) and don’t utilize Bower, Bootstrap, Font Awesome, S3/CloudFront, clustering, and LESS.

App structure and code re-usability

Electrolyte

Currently no frameworks nor boilerplates have implemented dependency injection using electrolyte (other than eskimo, with exception of Jared Hanson’s projects as far as I know.

Catonmat

Most applications structure their code by passing around global objects to exported functions, or simply have global variables (which is bad practice). For example, here’s how many some project starters are structured using global objects:

// config.js

module.exports = {
  port: process.env === 'development' ? 3000 : 80
};
// controller.js

module.exports = function(config) {
  return function(req, res, next) {
    res.send('Hello world');
  });
};
// app.js

var express = require('express');
var app = express();
var config = require('./config');
var controller = require('./controller')(config);

app.get('/', controller);

app.listen(config.port);

Solution

Eskimo

Install

Install Eskimo

Usage

Usage for Eskimo

Simple scaffolding

Built with commander and inspired by yo, the eskimo CLI provides a command create to scaffold a new RMVP and model, view, and controller commands to scaffold a new mongoose schema, jade template, and route middleware respectively.

Highly opinionated

In order to stay focused, one direction across the front-end and back-end must be taken with a project starter. Having support in the CLI for all templating languages, all ORM’s for building schemas, SQL, NoSQL, etc. is too much to maintain. However, support for swapping out anything that is default is required. One templating language (jade), one ORM (mongoose), one database (mongodb), and one CSS pre-processor (less) have been selected as initial candidates based off successful RMVP projects (see the Showcase) below.

Easily customizable

Highly configurable

Don’t like using jade, less, passport, …? Simply delete them from the generated project starter files and remove them from package.json after running eskimo create [name].

Documented micro-examples

After you create a new project starter, what’s next? Need Facebook and/or Google Authentication in your app? Integration with Stripe for payments? Documentation and setup for a RESTful API? Using Sockets.io? Setup for zero-downtime reloads and automated deployment? Simply look in the /examples folder or file an issue if you’d like help. By simply having micro-examples as Readme files, users are forced to learn by reading and thinking (as opposed to simply copying/paste a complete working example).

Framework/boilerplate comparison

Back-end

Name ☆’s* Express 4 DI** Gulp Mocha Travis Cov. LOC***
eskimo 128 2730
sails 7550 26741
locomotive 685 16598
totaljs 1061 14827
hackathon-starter 7300 16877
derby 3366 2688
kraken 2901 1762

Front-end

Name ☆’s* Asset Pipeline Bower Bootstrap 3 Font Awesome 4 Jade LESS
eskimo 128
sails 7550
locomotive 685
totaljs 1061
hackathon-starter 7300
derby 3366
kraken 2901

Showcase

Showcase

Our Harvest

Market Prophit

Seedfeed


niftylettuce@gmail.com | Github | Twitter | Updates | RSS/XML FeedPowered by Wintersmith