A starting point for MeteorJS applications that use Material Design. Includes Iron Router, Materialize.css, AutoForm and more.
For our Bootstrap version, see the master branch.
- Material Design
- Collections:
- Router:
- Authentication
- Seed Data
- Misc:
- Clone this repo to
<yourapp>
git clone https://github.com/Differential/meteor-boilerplate.git <yourapp>
- Remove
.git
cd <yourapp> && rm -rf .git
- Start coding!
We have a common file structure we use across all of our Meteor apps. Client-only files are stored in the client
directory, server-only files are stored in the server
directory, and shared files are stored in the both
directory. The private
and public
directories are for either private or public assets.
Page titles, meta descriptions and Facebook and Twitter meta tags are handled by the yasinuslu:blaze-meta package. Global settings are configured in both/router/meta.js
, while individual page settings are set at the controller level.
- Note: the
spiderable
package will need to be installed and configured on your server in order for bots to read your meta tags.
PostsShowController = AppController.extend({
path: '/posts/:_id',
waitOn: function() {
return this.subscribe('post', params._id);
},
data: function() {
return {
post: Post.find({_id: params._id})
};
},
onAfterAction: function() {
if(this.ready()) {
Meta.setTitle(this.data().post.title);
}
}
});
Upload your image to http://realfavicongenerator.net/ and place the resulting images in public/images/favicons
You can use the dburles:factory and anti:fake packages to generate fake collection data for testing your UI. See server/seeds.js
for an example:
Meteor.startup(function() {
Factory.define('item', Items, {
name: function() { return Fake.sentence(); },
rating: function() { return _.random(1, 5); }
});
if (Items.find({}).count() === 0) {
_(10).times(function(n) {
Factory.create('item');
});
}
});