This is a starting point for Meteor-based applications. It includes some useful packages, organization, and less setup.
A very simple example of a meteor app built from this boilerplate is OnTask.
##Atmosphere Packages Here's a list of packages installed by default from Atmosphere:
###Iron Router A client and server side router designed specifically for Meteor.
###Collection 2 A smart package for Meteor that extends Meteor.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating. Also adds support for virtual fields.
###Collection Helpers Collection helpers automatically sets up a transformation on your collections allowing for simple models, with an interface similar to template helpers.
###Autoform A smart package for Meteor that adds handlebars helpers to easily create basic forms with automatic insert and update events, and automatic reactive validation.
###Roles Roles-based authorization package for Meteor - compatible with built-in accounts package.
###Bootstrap (with less) Bootstrap 3 for Meteor, with Less.
###Font Awesome 4 Meteorite smart package for Font Awesome 4
###Flash Messages Package for displaying flash messages to the user. This is based on the chapter 'Creating a Meteorite Package' from the Discover Meteor Book and foundation-flash-messages package. This package integrate well with Bootstrap Alerts styles, but Bootstrap is not a dependency.
##Core Packages meteor-boilerplate adds these meteor core packages by default:
- insecure
- preserve-inputs
- less
- jquery
- accounts-base
- underscore
##Folder Structure
The /client
, /server
, and /lib
folders provide some basic app structure that I've found to be useful:
/docs - Contains all documentation for your application /src
- /client
- /less - Contains all of your less stylesheets
- app.less - Default less file with basic less organization comments, default media queries, and bootstrap imports
- variables.less - A bootstrap 3 variables less file you can use to overwrite the default bootstrap variables. Imported into the app.less file for variable use within your custom less
- /views - Holds a folder for each application module. Each module folder should contain routes, event handles, UI components, and subscriptions
- /sample
- sample.js - Example view file that defines a default route
- sample.html - Example default template that the sample.js route yields
- /sample
- main.html - Basic app html file with a default layout defined
- routes.js - Iron Router configuration file.
- /less - Contains all of your less stylesheets
- /lib
- /collections - Folder that contains collection definitions
- sample.js - Defines a sample collection
- /collections - Folder that contains collection definitions
- /public - Contains all files served by applications.
- /images - Contains all images served by applications
- /server/ - Server specific files
- /modules/ - Contains a directory for each module. Each module directory will have publication functions, allow/deny functions, and Meteor methods.
- /sample
- sample.js - Sample publication, allow/deny, and method functions.
- /sample
- /startup/ - Files containing scripts that should run on startup. For instance, a user.js file that creates a default admin user for your app if one doesn't already exist.
- sample.js - Sample startup function
- /modules/ - Contains a directory for each module. Each module directory will have publication functions, allow/deny functions, and Meteor methods.