##Where stars are born Nebula is a Meteor boilerplate designed to help you get started making Meteor web apps quickly and easily.
Shout out to two other excellent boilerplates: meteor-boilerplate, Void, and Meteoris.
Preview the boilerplate here: http://nebula-boilerplate.meteor.com/
##Features
- Uses Bootstrap3
- Recommended directory structure
- Models with inheritance and validation
- Included packages like Iron-Router, Collection2, Bootstrap3-less, and npm, give you all the essentials
- Tons of examples: collections, security, route configuration, CRUD operations
- Easily add NPM packages to your application with
packages.json
see meteorhacks/npm for instructions
##Routing
The router comes preconfigured with:
- An option to require the user to be authenticated before they can visit a route
- Loading template
- Not found template
- Update the page title when changing routes
##Packages
- standard-app-packages
- less
- jquery
- underscore
- accounts-base
- accounts-password
- accounts-ui
- iron:router
- meteorhacks:npm
- aldeed:collection2
- aldeed:autoform
- mrt:underscore-string-latest
- mrt:moment
- mrt:numeral
##Directory Structure This directory structure allows for clean, modular code:
client/ # Client folder
compatibility/ # Third-party libraries that create a global variable, or need to be loaded first
config/ # Client-side configuration files
helpers/ # Template helpers
less # LESS files
lib/ # Client-side library files that get executed first
modules/ # Re-usable components and partials
startup/ # Client-side startup code
subscriptions/ # Global subscriptions for the client
views/ # Views/templates for your application
common/ # General purpose templates (header, footer, etc.)
models/ # Model files, with Collection, Schema and publish definitions
lib/ # Models loaded first
private/ # Files inaccessible to client and not automatically loaded by server
public/ # Public files
routes/ # Iron-Router routes
server/ # Server-only files
fixtures/ # Database fixtures
lib/ # Server-side library files that get executed first
methods/ # Meteor.methods definitions
startup/ # On server startup
tests/ # Tests
packages.json # Add desired NPM packages here, load with Meteor.npmRequire
##Installation
- Install Meteor
- Download the repository
- Run
meteor
in the root directory
##Getting Started You will want to read the instructions for the following packages:
- Meteor Documentation
- Iron Router - Basics
- Collection2 - Attaching a Schema to a Collection
- Using NPM Modules in your app
##Models Nebula comes with a basic ORM called "BaseModel". It's extremely basic and may suit your needs. It has the following methods:
set - Set a/several properties on the model. Changes are remembered for efficient saving
toJSON - Converts the model to a JSON object
save - Save all changed properties since the last save
saveAll - Save all the properties of the model, regardless of tracked changes
##Boilerplate Generator
Use our generator to create views, routes, models and full CRUD skeletons quickly.
Run the generator from the private
folder with node nebula.js
create:view - client/views folder with template and JS skeletons
create:crud - client/views folder with CRUD for a model
create:route - client/routes javascript file
create:model - Model skeleton javascript file
create:collection - Collection with model, schema, publish and subscribe
##Recommended Packages
- Pagination with https://github.com/alethes/meteor-pages
- Google Analytics with https://github.com/reywood/meteor-iron-router-ga
- Testing with https://github.com/meteor-velocity/velocity
- Server console with https://github.com/gandev/meteor-server-console
- SEO with https://github.com/DerMambo/ms-seo and http://www.meteorpedia.com/read/spiderable/ also see https://gentlenode.com/journal/meteor-12-the-complete-guide-to-seo/20
##Helpful Resources
- Meteor Docs
- Atmosphere Packages
- Best learning resources for MeteorJS
- Discover Meteor
- Meteor Cookbook
- Crater.io - Hacker News for Meteor
- Meteorpedia
##Todo
- Tests with Velocity and Mocha
- User roles
- Pagination example
- Deployment script recommendations