Whenever we start a new project we find challenges very different… but also some very recurrent.

I created this project with the idea of ​​not having to sort and write configuration files with the basic needs of development in Node.js.

Simple project setup using industry’s best practices and modules. Node.js, Express, Mongoose, passport.js, component.io, Jade, Stylus and Bootstrap.

Routing

For faster page generation and content delivery, we decided that the application should be aimed at generating completely screens from the client, freeing the server running the load and data provider for different pages. To do this, we decided to use Express.JS as API router and Page.js as client router.

Signin / Signup

We conclude that it is best rapid application delegate this task to others, using OAuth to connect users with our application. We allow you to login via Facebook, Twitter or any other OAuth service provider. In order not to restrict the possibility of facing other services, we use PassportJS, which has a large collection of popular social networks.

Persistance and Data modeling Database

To have the flexibidad to work with large volumes of data while addressing an application generated views for certain types of “models” , we conclude that Mongoose was our best option. The ability to create collections of related documents and allow to an API request, crossing the subdocuments popular collections is a “killing feature” that led us to use that resource.

Grab from Github or Check the demo

I co-develop this project with Cristian Douce.

You should follow me on Twitter

Originally published at gravityonmars.com on September 17, 2013.