Meteor speeds up development by making assumptions about how you’ll build your app. Meteor Starter is a Meteor boilerplate that does the same.

For those who are unfamiliar, take a moment to read what Meteor Starter offers.

I use Meteor starter as a base for pretty much all my projects. This article is about the first steps I take to make the generic boilerplate specific to my project.

0. Setup

To get a copy of Meteor Starter running, just clone the repo and run it

git clone https://github.com/yogiben/meteor-starter.git myapp
cd myapp
meteor

You should get this:
meteor-boilerplate

1. Let’s _config

The first thing to do is to open the config file. This is where all the non-environment specific information about the app is stored, including the name, the URL and social media links.

/both/_config/_config.coffee

config

These properties are used through your app and can be be rendered using the helper

{{Config}}

e.g.

Read our <a href="{{Config.blog}}">blog</a>

You may not be able to replace all the fields right away, but the first three should be no problem.

Changing name, title and subtitle will change the appearance of the home page.

@Config =
    name: 'Cat Hats 4 Cats'
    title: 'Put a hat on that cat'
    subtitle: 'Great headwear for your favourite pet'

cat hats

It will also configure other parts of the app such as the seo and the page title.

2. Styling

Bootstrap variables are found in:

/client/style/bootstrap-variables.less

To give you app a different theme, you can copy a boostrap theme variables.less from Bootswatch.

The Google font import is found in:

/client/style/style.less

Changing the home screen image:

/client/views/home/home.less

Now our app looks and feels a little different

Cat_Hats_4_Cats

 

3. Collections, views and routes

Now it’s time to hack.

Collections

An example collection with collection2 schema:

/both/collections/posts.coffee

CollectionFS file storage collections with support for GraphicsMagick:

/both/collections/attachments.coffee
/both/collections/profile_pictures.coffee

Views

Views and layouts are found in:

/client/views

Router

The router adds some functionality to redirect non-logged in users and to scroll to the top of the page after the route has been rendered.

/both/router.coffee

What are you building

We’re keen to hear how Meteor Starter is being used. If you’ve created something you want to share, please add in the comments below.