This boilerplate is here to give you a starting point for your meteor projects, with a console tool to ease up some tasks. Essential atmosphere packages are included to give you features like routing and collection schemas out-of-the-box.
The boilerplate looks like following: boilerplate.meteor.com. Have a look at starthacking for a project created with this boilerplate.
npm install -g orion-cli
This will install the orion-cli tool, which can be used for scaffolding files with different profiles. You can still clone the repository, which doesn't give you the profile and scaffolding support.
# Assuming meteor is already installed
orion create appName
cd appName && meteor
With orion-cli you can scaffold files based on your configuration that you've got.
orion generate routes
You can create models, views, change profiles and reset the project with the console tool (see below).
There's already a lot of predefined code in this boilerplate, to show you the possible functionality. However, if you want to start off with an empty project use the provided command to get rid off all the code you don't need.
orion reset
- default (Plain Vanilla Javascript)
- coffee (coffeescript, Unfancy JavaScript)
- es6 (traceur, Traceur is a JavaScript.next-to-JavaScript-of-today compiler)
You can change your profile like that
orion set-profile
There will be a prompt, where you can enter coffee or any other profile that you have specified. Also use the reset
command to start off with blank files according to your profile.
It is highly recommended to use Meteor Up for easy deployments. Have a look at the repository for more information.
Meteor cannot do SEO
This statement is only partially true, since there is a package called ms-seo, which has a lot of neat little tricks to help web crawlers notice your app the way you want them to. This boilerplate also adds constants under client/lib/constants.js for the app. Change SEO settings inside the routes like that.
Router.route('/about', function () {
this.render('about');
// Using the app constants
SEO.set({ title: 'About -' + Meteor.App.NAME, og: {...} });
});
The browser-policy adds rules to deny all operations from external URLs. This helps dealing with clickjacking and other XSS methods used to attack the client. To whitelist a url, add following to server/config/security.js
BrowserPolicy.content.allowOriginForAll(YOUR_URL);
Other security enforcing packages like audit-argument-checks and matteodem:easy-security have also been added.
- Meteor Core
- meteor-platform
- Routing
- Collections
- Accounts
- UI and UX
- Security
- SEO
- Development
The "insecure" and "autopublish" packages are removed by default (they make your app vulnerable).
client/ # Client folder
compatibility/ # Libraries which create a global variable
config/ # Configuration files (on the client)
lib/ # Library files that get executed first
startup/ # Javascript files on Meteor.startup()
stylesheets # LESS files
modules/ # Meant for components, such as form and more(*)
views/ # Contains all views(*)
common/ # General purpose html templates
model/ # Model files, for each Meteor.Collection(*)
private/ # Private files
public/ # Public files
routes/ # All routes(*)
server/ # Server folder
fixtures/ # Meteor.Collection fixtures defined
lib/ # Server side library folder
publications/ # Collection publications(*)
startup/ # On server startup
meteor-boilerplate # Command line tool
(*) = the command line tool creates files in these folders
- Void by Sacha Greif
- meteor-jw-opinionated-skeleton by jamesdwilson (CoffeeScript)
- meteor-boilerplate by BeDifferential (CoffeeScript)
- em by EventedMind (Boilerplate & Scaffolding)
This boilerplate has an MIT License, see the LICENSE.txt for more information.