A Starting Point for Meteor and Backbone Apps

Update: If you're not tied to Backbone, check out a new rewrite I did of this project with Iron Router, called Meteorplate.


The documentation and the examples on meteor.com do a lot to show off the awesome things Meteor can do and get you started, but I found that I was spending a ton of time just getting my app bootstrapped when I was trying to build something more structured. After finally getting a Meteor app up and running with Backbone's pagination and view structure, I created a boilerplate project from it that should server as a great starting point for similar projects.


You can check out a live demo here: backbone-boilerplate.meteor.com
And here is the source code: github.com/justinmc/meteor-backbone-boilerplate


Why Meteor AND Backbone?

Meteor has a nice Collection system itself and its tight integration with MongoDB can cover most of the functionality of Meteor's Models. However, its Router and View system are are not covered by Meteor at all and can be used to create a nicely paged app with a familiar structure. This is especially handy when simpler routers like page.js don't work out of the box with Meteor.


How it's done

The project achieves Backbone style paging combined with Meteor's data reactivity. The main trick to this is to use Meteor.render to reactively render a Meteor Template whenever a Backbone View is routed to.

If you want more detail than that, check out the source code and play around with the live demo. I really hope that this project can serve as a solid starting point for people setting up an app. If you think you have an idea for improvements, contributions are welcome on github!