diff --git a/.meteor/packages b/.meteor/packages
index d1f5c37..e966eab 100644
--- a/.meteor/packages
+++ b/.meteor/packages
@@ -21,3 +21,6 @@ themeteorchef:bert
meteorhacks:ssr
fourseven:scss
standard-minifiers
+
+
+npm-container
\ No newline at end of file
diff --git a/.meteor/versions b/.meteor/versions
index 84b501f..e12c85d 100644
--- a/.meteor/versions
+++ b/.meteor/versions
@@ -59,6 +59,7 @@ mobile-status-bar@1.0.6
mongo@1.1.1
mongo-id@1.0.1
npm-bcrypt@0.7.8_2
+npm-container@1.2.0
npm-mongo@1.4.39_1
observe-sequence@1.0.7
ordered-dict@1.0.4
diff --git a/application.html b/application.html
index 06f4602..0efdc35 100644
--- a/application.html
+++ b/application.html
@@ -1,6 +1,7 @@
-
Application Name
+
+
diff --git a/both/methods/insert/example.js b/both/methods/insert/example.js
new file mode 100644
index 0000000..1bc32d0
--- /dev/null
+++ b/both/methods/insert/example.js
@@ -0,0 +1,20 @@
+/*
+* Methods: Insert - Example
+* Example of a method used for inserting into the database.
+*/
+
+Meteor.methods({
+ exampleInsertMethod: function(argument){
+ // Check the argument. Assuming an Object type here.
+ check(argument, Object);
+
+ // Perform the insert.
+ try {
+ var exampleId = Example.insert(argument);
+ return exampleId;
+ } catch(exception) {
+ // If an error occurs, return it to the client.
+ return exception;
+ }
+ }
+});
diff --git a/both/methods/read/example.js b/both/methods/read/example.js
new file mode 100644
index 0000000..1c54af7
--- /dev/null
+++ b/both/methods/read/example.js
@@ -0,0 +1,22 @@
+/*
+* Methods: Read - Example
+* Example of a method used for reading from the database.
+*/
+
+Meteor.methods({
+ exampleReadMethod: function(argument){
+ // Check the argument. Assuming a String type here.
+ check(argument, String);
+
+ // Perform the read.
+ var exampleItem = Example.findOne(argument);
+
+ // If the read fails (no documents found), throw an error.
+ if (!exampleItem) {
+ throw new Meteor.Error(500, 'Error 500: Not Found', 'No documents found.');
+ }
+
+ // Return either the result or the error.
+ return exampleItem;
+ }
+});
diff --git a/both/methods/remove/example.js b/both/methods/remove/example.js
new file mode 100644
index 0000000..9c8058e
--- /dev/null
+++ b/both/methods/remove/example.js
@@ -0,0 +1,20 @@
+/*
+* Methods: Remove - Example
+* Example of a method used for removing a document from the database.
+*/
+
+Meteor.methods({
+ exampleRemoveMethod: function(argument){
+ // Check the argument. Assuming a String type here.
+ check(argument, String);
+
+ // Perform the remove.
+ try {
+ var exampleId = Example.remove(argument);
+ return exampleId;
+ } catch(exception) {
+ // If an error occurs, return it to the client.
+ return exception;
+ }
+ }
+});
diff --git a/both/methods/update/example.js b/both/methods/update/example.js
new file mode 100644
index 0000000..a7cacd3
--- /dev/null
+++ b/both/methods/update/example.js
@@ -0,0 +1,24 @@
+/*
+* Methods: Update - Example
+* Example of a method used for updating a document in the database.
+*/
+
+Meteor.methods({
+ exampleUpdateMethod: function(argument){
+ // Check the argument. Assuming an Object type here.
+ check(argument, Object);
+
+ // Perform the update.
+ try {
+ var exampleId = Example.update(argument._id, {
+ $set: {
+ "someKey": argument.someKey
+ }
+ });
+ return exampleId;
+ } catch(exception) {
+ // If an error occurs, return it to the client.
+ return exception;
+ }
+ }
+});
diff --git a/both/modules/_modules.js b/both/modules/_modules.js
new file mode 100644
index 0000000..f13b910
--- /dev/null
+++ b/both/modules/_modules.js
@@ -0,0 +1,2 @@
+Modules = {};
+Modules.both = {};
diff --git a/both/modules/startup.js b/both/modules/startup.js
new file mode 100644
index 0000000..adbe072
--- /dev/null
+++ b/both/modules/startup.js
@@ -0,0 +1,3 @@
+var startup = function() {};
+
+Modules.both.startup = startup;
diff --git a/both/startup.js b/both/startup.js
new file mode 100644
index 0000000..dce5dec
--- /dev/null
+++ b/both/startup.js
@@ -0,0 +1 @@
+Meteor.startup( function() { Modules.both.startup(); } );
diff --git a/client/controllers/authenticated/header.js b/client/controllers/authenticated/header.js
deleted file mode 100644
index 0bd86f7..0000000
--- a/client/controllers/authenticated/header.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-* Controller: Header
-* Template: /client/includes/_header.html
-*/
-
-/*
-* Created
-*/
-
-Template.header.onCreated(function(){
- // Code to run when template is created goes here.
-});
-
-/*
-* Rendered
-*/
-
-Template.header.onRendered(function() {
- // Code to run when template is rendered goes here.
-});
-
-/*
-* Helpers
-*/
-
-Template.header.helpers({
- example: function(){
- // Code to run for helper function.
- }
-});
-
-/*
-* Events
-*/
-
-Template.header.events({
- 'click .logout': function(){
- Meteor.logout(function(error){
- if(error){
- Bert.alert(error.reason, 'danger');
- } else {
- Bert.alert('Succesfully logged out!', 'success');
- }
- });
- }
-});
diff --git a/client/controllers/public/login.js b/client/controllers/public/login.js
deleted file mode 100644
index e3e5ec3..0000000
--- a/client/controllers/public/login.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-* Controller: Login
-* Template: /client/views/public/login.html
-*/
-
-/*
-* Created
-*/
-
-Template.login.onCreated(function(){
- // Code to run when template is created goes here.
-});
-
-/*
-* Rendered
-*/
-
-Template.login.onRendered(function(){
- $('#application-login').validate({
- rules: {
- emailAddress: {
- required: true,
- email: true
- },
- password: {
- required: true
- }
- },
- messages: {
- emailAddress: {
- required: "Please enter your email address to login.",
- email: "Please enter a valid email address."
- },
- password: {
- required: "Please enter your password to login."
- }
- },
- submitHandler: function(){
- // Grab the user's details.
- user = {
- email: $('[name="emailAddress"]').val(),
- password: $('[name="password"]').val()
- }
-
- // Log the user in.
- Meteor.loginWithPassword(user.email, user.password, function(error){
- if(error){
- Bert.alert(error.reason, 'danger');
- } else {
- Bert.alert('Logged in!', 'success');
- }
- });
- }
- });
-});
-
-/*
-* Helpers
-*/
-
-Template.login.helpers({
- example: function(){
- // Code to run for helper function.
- }
-});
-
-/*
-* Events
-*/
-
-Template.login.events({
- 'submit form': function(e){
- // Prevent form from submitting.
- e.preventDefault();
- }
-});
diff --git a/client/controllers/public/recover-password.js b/client/controllers/public/recover-password.js
deleted file mode 100644
index c388491..0000000
--- a/client/controllers/public/recover-password.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-* Controller: Recover Password
-* Template: /client/views/public/recover-password.html
-*/
-
-/*
-* Created
-*/
-
-Template.recoverPassword.onCreated(function(){
- // Code to run when template is created goes here.
-});
-
-/*
-* Rendered
-*/
-
-
-Template.recoverPassword.onRendered(function(){
- $('#application-recover-password').validate({
- rules: {
- emailAddress: {
- required: true,
- email: true
- }
- },
- messages: {
- emailAddress: {
- required: "Please enter your email address to recover your password.",
- email: "Please enter a valid email address."
- }
- },
- submitHandler: function(){
- // Grab the user's email address.
- var email = $('[name="emailAddress"]').val();
-
- // Call the send reset password email method.
- Accounts.forgotPassword({email: email}, function(error){
- if(error){
- Bert.alert(error.reason, 'danger');
- } else {
- Bert.alert('Check your inbox for a reset link!', 'success');
- }
- });
- }
- });
-});
-
-/*
-* Helpers
-*/
-
-Template.recoverPassword.helpers({
- example: function(){
- // Code to run for helper function.
- }
-});
-
-/*
-* Events
-*/
-
-Template.recoverPassword.events({
- 'submit form': function(e){
- // Prevent form from submitting.
- e.preventDefault();
- }
-});
diff --git a/client/controllers/public/reset-password.js b/client/controllers/public/reset-password.js
deleted file mode 100644
index e17c7be..0000000
--- a/client/controllers/public/reset-password.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-* Controller: Reset Password
-* Template: /client/views/public/reset-password.html
-*/
-
-/*
-* Created
-*/
-
-Template.resetPassword.onCreated(function(){
- // Code to run when template is created goes here.
-});
-
-/*
-* Rendered
-*/
-
-Template.resetPassword.onRendered(function(){
- $('#application-reset-password').validate({
- rules: {
- newPassword: {
- required: true,
- minlength: 6
- },
- repeatNewPassword: {
- required: true,
- minlength: 6,
- equalTo: "[name='newPassword']"
- }
- },
- messages: {
- newPassword: {
- required: "Please enter a new password.",
- minlength: "Please use at least six characters."
- },
- repeatNewPassword: {
- required: "Please repeat your new password.",
- equalTo: "Your password do not match. Please try again."
- }
- },
- submitHandler: function(){
- // Grab the user's reset token and new password.
- var token = Session.get('resetPasswordToken'),
- password = $('[name="newPassword"]').val();
-
- // Reset the user's password.
- Accounts.resetPassword(token, password, function(error){
- if(error){
- Bert.alert(error.reason, 'danger');
- } else {
- Bert.alert('Password successfully reset!', 'success');
- Session.set('resetPasswordToken', null);
- }
- });
- }
- });
-});
-
-/*
-* Helpers
-*/
-
-Template.resetPassword.helpers({
- example: function(){
- // Code to run for helper function.
- }
-});
-
-/*
-* Events
-*/
-
-Template.resetPassword.events({
- 'submit form': function(e){
- // Prevent form from submitting.
- e.preventDefault();
- }
-});
diff --git a/client/controllers/public/signup.js b/client/controllers/public/signup.js
deleted file mode 100644
index 60c3ad1..0000000
--- a/client/controllers/public/signup.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-* Controller: Signup
-* Template: /client/views/public/signup.html
-*/
-
-/*
-* Created
-*/
-
-Template.signup.onCreated(function(){
- // Code to run when template is created goes here.
-});
-
-/*
-* Rendered
-*/
-
-Template.signup.onRendered(function(){
- $('#application-signup').validate({
- rules: {
- emailAddress: {
- required: true,
- email: true
- },
- password: {
- required: true,
- minlength: 6
- }
- },
- messages: {
- emailAddress: {
- required: "Please enter your email address to sign up.",
- email: "Please enter a valid email address."
- },
- password: {
- required: "Please enter a password to sign up.",
- minlength: "Please use at least six characters."
- }
- },
- submitHandler: function(){
- // Grab the user's details.
- user = {
- email: $('[name="emailAddress"]').val(),
- password: $('[name="password"]').val()
- }
-
- // Create the user's account.
- Accounts.createUser({email: user.email, password: user.password}, function(error){
- if(error){
- Bert.alert(error.reason, 'danger');
- } else {
- Bert.alert('Welcome!', 'success');
- }
- });
- }
- });
-});
-
-/*
-* Helpers
-*/
-
-Template.signup.helpers({
- example: function(){
- // Code to run for helper function.
- }
-});
-
-/*
-* Events
-*/
-
-Template.signup.events({
- 'submit form': function(e){
- // Prevent form from submitting.
- e.preventDefault();
- }
-});
diff --git a/client/helpers/helpers-ui.js b/client/helpers/helpers-ui.js
deleted file mode 100644
index 89a83cf..0000000
--- a/client/helpers/helpers-ui.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-* UI Helpers
-* Define UI helpers for common template functionality.
-*/
-
-/*
-* Current Route
-* Return an active class if the currentRoute session variable name
-* (set in the appropriate file in /client/routes/) is equal to the name passed
-* to the helper in the template.
-*/
-
-UI.registerHelper('currentRoute', function(route){
- return Session.equals('currentRoute', route) ? 'active' : '';
-});
diff --git a/client/helpers/template.js b/client/helpers/template.js
new file mode 100644
index 0000000..89a83cf
--- /dev/null
+++ b/client/helpers/template.js
@@ -0,0 +1,15 @@
+/*
+* UI Helpers
+* Define UI helpers for common template functionality.
+*/
+
+/*
+* Current Route
+* Return an active class if the currentRoute session variable name
+* (set in the appropriate file in /client/routes/) is equal to the name passed
+* to the helper in the template.
+*/
+
+UI.registerHelper('currentRoute', function(route){
+ return Session.equals('currentRoute', route) ? 'active' : '';
+});
diff --git a/client/includes/_header.html b/client/includes/_header.html
deleted file mode 100644
index 9fbe3f7..0000000
--- a/client/includes/_header.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
diff --git a/client/layouts/layout-default.html b/client/layouts/layout-default.html
deleted file mode 100644
index a5090e9..0000000
--- a/client/layouts/layout-default.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
- {{>bertAlert}}
- {{>header}}
-
- {{>yield}}
-
-
diff --git a/client/modules/_modules.js b/client/modules/_modules.js
new file mode 100644
index 0000000..b97216f
--- /dev/null
+++ b/client/modules/_modules.js
@@ -0,0 +1 @@
+Modules.client = {};
diff --git a/client/modules/startup.js b/client/modules/startup.js
new file mode 100644
index 0000000..5d737f4
--- /dev/null
+++ b/client/modules/startup.js
@@ -0,0 +1,3 @@
+var startup = function() {};
+
+Modules.client.startup = startup;
diff --git a/client/startup.js b/client/startup.js
new file mode 100644
index 0000000..4db56b0
--- /dev/null
+++ b/client/startup.js
@@ -0,0 +1 @@
+Meteor.startup( function() { Modules.client.startup(); } );
diff --git a/client/stylesheets/application.scss b/client/stylesheets/application.scss
new file mode 100644
index 0000000..5fbade7
--- /dev/null
+++ b/client/stylesheets/application.scss
@@ -0,0 +1,3 @@
+@import "tools/extends";
+
+@import "components/login";
diff --git a/client/stylesheets/components/_login.scss b/client/stylesheets/components/_login.scss
new file mode 100644
index 0000000..e0744e8
--- /dev/null
+++ b/client/stylesheets/components/_login.scss
@@ -0,0 +1,4 @@
+.login label {
+ display: block;
+ @extend %clearfix;
+}
diff --git a/client/stylesheets/sass/application.scss b/client/stylesheets/sass/application.scss
deleted file mode 100644
index 327a830..0000000
--- a/client/stylesheets/sass/application.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Globals */
-@import "globals/extends";
-
-/* Views */
-@import "views/public/login";
diff --git a/client/stylesheets/sass/globals/_extends.scss b/client/stylesheets/sass/globals/_extends.scss
deleted file mode 100644
index f0ea750..0000000
--- a/client/stylesheets/sass/globals/_extends.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- Clearfix
- via http://nicolasgallagher.com/micro-clearfix-hack
-*/
-%clearfix {
- *zoom: 1;
-
- &:before,
- &:after {
- display: table;
- content: "";
- }
-
- &:after {
- clear: both;
- }
-}
diff --git a/client/stylesheets/sass/views/public/_login.scss b/client/stylesheets/sass/views/public/_login.scss
deleted file mode 100644
index e0744e8..0000000
--- a/client/stylesheets/sass/views/public/_login.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-.login label {
- display: block;
- @extend %clearfix;
-}
diff --git a/client/stylesheets/tools/_extends.scss b/client/stylesheets/tools/_extends.scss
new file mode 100644
index 0000000..f0ea750
--- /dev/null
+++ b/client/stylesheets/tools/_extends.scss
@@ -0,0 +1,17 @@
+/*
+ Clearfix
+ via http://nicolasgallagher.com/micro-clearfix-hack
+*/
+%clearfix {
+ *zoom: 1;
+
+ &:before,
+ &:after {
+ display: table;
+ content: "";
+ }
+
+ &:after {
+ clear: both;
+ }
+}
diff --git a/client/templates/authenticated/index.html b/client/templates/authenticated/index.html
new file mode 100644
index 0000000..d62b919
--- /dev/null
+++ b/client/templates/authenticated/index.html
@@ -0,0 +1,3 @@
+
+ Index
+
diff --git a/client/templates/globals/header.html b/client/templates/globals/header.html
new file mode 100644
index 0000000..5ecd284
--- /dev/null
+++ b/client/templates/globals/header.html
@@ -0,0 +1,32 @@
+
+
+
diff --git a/client/templates/globals/header.js b/client/templates/globals/header.js
new file mode 100644
index 0000000..0bd86f7
--- /dev/null
+++ b/client/templates/globals/header.js
@@ -0,0 +1,46 @@
+/*
+* Controller: Header
+* Template: /client/includes/_header.html
+*/
+
+/*
+* Created
+*/
+
+Template.header.onCreated(function(){
+ // Code to run when template is created goes here.
+});
+
+/*
+* Rendered
+*/
+
+Template.header.onRendered(function() {
+ // Code to run when template is rendered goes here.
+});
+
+/*
+* Helpers
+*/
+
+Template.header.helpers({
+ example: function(){
+ // Code to run for helper function.
+ }
+});
+
+/*
+* Events
+*/
+
+Template.header.events({
+ 'click .logout': function(){
+ Meteor.logout(function(error){
+ if(error){
+ Bert.alert(error.reason, 'danger');
+ } else {
+ Bert.alert('Succesfully logged out!', 'success');
+ }
+ });
+ }
+});
diff --git a/client/templates/layouts/layout-default.html b/client/templates/layouts/layout-default.html
new file mode 100644
index 0000000..a5090e9
--- /dev/null
+++ b/client/templates/layouts/layout-default.html
@@ -0,0 +1,7 @@
+
+ {{>bertAlert}}
+ {{>header}}
+
+ {{>yield}}
+
+
diff --git a/client/templates/public/loading.html b/client/templates/public/loading.html
new file mode 100644
index 0000000..effbcbc
--- /dev/null
+++ b/client/templates/public/loading.html
@@ -0,0 +1,3 @@
+
+ Loading...
+
diff --git a/client/templates/public/login.html b/client/templates/public/login.html
new file mode 100644
index 0000000..744999c
--- /dev/null
+++ b/client/templates/public/login.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
Don't have an account? Sign Up.
+
+
+
diff --git a/client/templates/public/login.js b/client/templates/public/login.js
new file mode 100644
index 0000000..e3e5ec3
--- /dev/null
+++ b/client/templates/public/login.js
@@ -0,0 +1,76 @@
+/*
+* Controller: Login
+* Template: /client/views/public/login.html
+*/
+
+/*
+* Created
+*/
+
+Template.login.onCreated(function(){
+ // Code to run when template is created goes here.
+});
+
+/*
+* Rendered
+*/
+
+Template.login.onRendered(function(){
+ $('#application-login').validate({
+ rules: {
+ emailAddress: {
+ required: true,
+ email: true
+ },
+ password: {
+ required: true
+ }
+ },
+ messages: {
+ emailAddress: {
+ required: "Please enter your email address to login.",
+ email: "Please enter a valid email address."
+ },
+ password: {
+ required: "Please enter your password to login."
+ }
+ },
+ submitHandler: function(){
+ // Grab the user's details.
+ user = {
+ email: $('[name="emailAddress"]').val(),
+ password: $('[name="password"]').val()
+ }
+
+ // Log the user in.
+ Meteor.loginWithPassword(user.email, user.password, function(error){
+ if(error){
+ Bert.alert(error.reason, 'danger');
+ } else {
+ Bert.alert('Logged in!', 'success');
+ }
+ });
+ }
+ });
+});
+
+/*
+* Helpers
+*/
+
+Template.login.helpers({
+ example: function(){
+ // Code to run for helper function.
+ }
+});
+
+/*
+* Events
+*/
+
+Template.login.events({
+ 'submit form': function(e){
+ // Prevent form from submitting.
+ e.preventDefault();
+ }
+});
diff --git a/client/templates/public/not-found.html b/client/templates/public/not-found.html
new file mode 100644
index 0000000..b8df76e
--- /dev/null
+++ b/client/templates/public/not-found.html
@@ -0,0 +1,3 @@
+
+ 404 — Not Found.
+
diff --git a/client/templates/public/recover-password.html b/client/templates/public/recover-password.html
new file mode 100644
index 0000000..f6c6e9d
--- /dev/null
+++ b/client/templates/public/recover-password.html
@@ -0,0 +1,17 @@
+
+
+
diff --git a/client/templates/public/recover-password.js b/client/templates/public/recover-password.js
new file mode 100644
index 0000000..c388491
--- /dev/null
+++ b/client/templates/public/recover-password.js
@@ -0,0 +1,68 @@
+/*
+* Controller: Recover Password
+* Template: /client/views/public/recover-password.html
+*/
+
+/*
+* Created
+*/
+
+Template.recoverPassword.onCreated(function(){
+ // Code to run when template is created goes here.
+});
+
+/*
+* Rendered
+*/
+
+
+Template.recoverPassword.onRendered(function(){
+ $('#application-recover-password').validate({
+ rules: {
+ emailAddress: {
+ required: true,
+ email: true
+ }
+ },
+ messages: {
+ emailAddress: {
+ required: "Please enter your email address to recover your password.",
+ email: "Please enter a valid email address."
+ }
+ },
+ submitHandler: function(){
+ // Grab the user's email address.
+ var email = $('[name="emailAddress"]').val();
+
+ // Call the send reset password email method.
+ Accounts.forgotPassword({email: email}, function(error){
+ if(error){
+ Bert.alert(error.reason, 'danger');
+ } else {
+ Bert.alert('Check your inbox for a reset link!', 'success');
+ }
+ });
+ }
+ });
+});
+
+/*
+* Helpers
+*/
+
+Template.recoverPassword.helpers({
+ example: function(){
+ // Code to run for helper function.
+ }
+});
+
+/*
+* Events
+*/
+
+Template.recoverPassword.events({
+ 'submit form': function(e){
+ // Prevent form from submitting.
+ e.preventDefault();
+ }
+});
diff --git a/client/templates/public/reset-password.html b/client/templates/public/reset-password.html
new file mode 100644
index 0000000..c5c8ded
--- /dev/null
+++ b/client/templates/public/reset-password.html
@@ -0,0 +1,21 @@
+
+
+
diff --git a/client/templates/public/reset-password.js b/client/templates/public/reset-password.js
new file mode 100644
index 0000000..e17c7be
--- /dev/null
+++ b/client/templates/public/reset-password.js
@@ -0,0 +1,78 @@
+/*
+* Controller: Reset Password
+* Template: /client/views/public/reset-password.html
+*/
+
+/*
+* Created
+*/
+
+Template.resetPassword.onCreated(function(){
+ // Code to run when template is created goes here.
+});
+
+/*
+* Rendered
+*/
+
+Template.resetPassword.onRendered(function(){
+ $('#application-reset-password').validate({
+ rules: {
+ newPassword: {
+ required: true,
+ minlength: 6
+ },
+ repeatNewPassword: {
+ required: true,
+ minlength: 6,
+ equalTo: "[name='newPassword']"
+ }
+ },
+ messages: {
+ newPassword: {
+ required: "Please enter a new password.",
+ minlength: "Please use at least six characters."
+ },
+ repeatNewPassword: {
+ required: "Please repeat your new password.",
+ equalTo: "Your password do not match. Please try again."
+ }
+ },
+ submitHandler: function(){
+ // Grab the user's reset token and new password.
+ var token = Session.get('resetPasswordToken'),
+ password = $('[name="newPassword"]').val();
+
+ // Reset the user's password.
+ Accounts.resetPassword(token, password, function(error){
+ if(error){
+ Bert.alert(error.reason, 'danger');
+ } else {
+ Bert.alert('Password successfully reset!', 'success');
+ Session.set('resetPasswordToken', null);
+ }
+ });
+ }
+ });
+});
+
+/*
+* Helpers
+*/
+
+Template.resetPassword.helpers({
+ example: function(){
+ // Code to run for helper function.
+ }
+});
+
+/*
+* Events
+*/
+
+Template.resetPassword.events({
+ 'submit form': function(e){
+ // Prevent form from submitting.
+ e.preventDefault();
+ }
+});
diff --git a/client/templates/public/signup.html b/client/templates/public/signup.html
new file mode 100644
index 0000000..5a7e961
--- /dev/null
+++ b/client/templates/public/signup.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
Already have an account? Log In.
+
+
+
diff --git a/client/templates/public/signup.js b/client/templates/public/signup.js
new file mode 100644
index 0000000..60c3ad1
--- /dev/null
+++ b/client/templates/public/signup.js
@@ -0,0 +1,78 @@
+/*
+* Controller: Signup
+* Template: /client/views/public/signup.html
+*/
+
+/*
+* Created
+*/
+
+Template.signup.onCreated(function(){
+ // Code to run when template is created goes here.
+});
+
+/*
+* Rendered
+*/
+
+Template.signup.onRendered(function(){
+ $('#application-signup').validate({
+ rules: {
+ emailAddress: {
+ required: true,
+ email: true
+ },
+ password: {
+ required: true,
+ minlength: 6
+ }
+ },
+ messages: {
+ emailAddress: {
+ required: "Please enter your email address to sign up.",
+ email: "Please enter a valid email address."
+ },
+ password: {
+ required: "Please enter a password to sign up.",
+ minlength: "Please use at least six characters."
+ }
+ },
+ submitHandler: function(){
+ // Grab the user's details.
+ user = {
+ email: $('[name="emailAddress"]').val(),
+ password: $('[name="password"]').val()
+ }
+
+ // Create the user's account.
+ Accounts.createUser({email: user.email, password: user.password}, function(error){
+ if(error){
+ Bert.alert(error.reason, 'danger');
+ } else {
+ Bert.alert('Welcome!', 'success');
+ }
+ });
+ }
+ });
+});
+
+/*
+* Helpers
+*/
+
+Template.signup.helpers({
+ example: function(){
+ // Code to run for helper function.
+ }
+});
+
+/*
+* Events
+*/
+
+Template.signup.events({
+ 'submit form': function(e){
+ // Prevent form from submitting.
+ e.preventDefault();
+ }
+});
diff --git a/client/views/authenticated/index.html b/client/views/authenticated/index.html
deleted file mode 100644
index d62b919..0000000
--- a/client/views/authenticated/index.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Index
-
diff --git a/client/views/public/loading.html b/client/views/public/loading.html
deleted file mode 100644
index effbcbc..0000000
--- a/client/views/public/loading.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Loading...
-
diff --git a/client/views/public/login.html b/client/views/public/login.html
deleted file mode 100644
index 744999c..0000000
--- a/client/views/public/login.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
Don't have an account? Sign Up.
-
-
-
diff --git a/client/views/public/not-found.html b/client/views/public/not-found.html
deleted file mode 100644
index b8df76e..0000000
--- a/client/views/public/not-found.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- 404 — Not Found.
-
diff --git a/client/views/public/recover-password.html b/client/views/public/recover-password.html
deleted file mode 100644
index f6c6e9d..0000000
--- a/client/views/public/recover-password.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
diff --git a/client/views/public/reset-password.html b/client/views/public/reset-password.html
deleted file mode 100644
index c5c8ded..0000000
--- a/client/views/public/reset-password.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
diff --git a/client/views/public/signup.html b/client/views/public/signup.html
deleted file mode 100644
index 5a7e961..0000000
--- a/client/views/public/signup.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
Already have an account? Log In.
-
-
-
diff --git a/packages.json b/packages.json
index 077404a..0967ef4 100644
--- a/packages.json
+++ b/packages.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/packages/npm-container/index.js b/packages/npm-container/index.js
new file mode 100644
index 0000000..c3fc862
--- /dev/null
+++ b/packages/npm-container/index.js
@@ -0,0 +1,9 @@
+Meteor.npmRequire = function(moduleName) {
+ var module = Npm.require(moduleName);
+ return module;
+};
+
+Meteor.require = function(moduleName) {
+ console.warn('Meteor.require is deprecated. Please use Meteor.npmRequire instead!');
+ return Meteor.npmRequire(moduleName);
+};
\ No newline at end of file
diff --git a/packages/npm-container/package.js b/packages/npm-container/package.js
new file mode 100644
index 0000000..9fab3ce
--- /dev/null
+++ b/packages/npm-container/package.js
@@ -0,0 +1,30 @@
+var path = Npm.require('path');
+var fs = Npm.require('fs');
+
+Package.describe({
+ summary: 'Contains all your npm dependencies',
+ version: '1.2.0',
+ name: 'npm-container'
+});
+
+var packagesJsonFile = path.resolve('./packages.json');
+try {
+ var fileContent = fs.readFileSync(packagesJsonFile);
+ var packages = JSON.parse(fileContent.toString());
+ Npm.depends(packages);
+} catch (ex) {
+ console.error('ERROR: packages.json parsing error [ ' + ex.message + ' ]');
+}
+
+// Adding the app's packages.json as a used file for this package will get
+// Meteor to watch it and reload this package when it changes
+Package.onUse(function(api) {
+ api.addFiles('index.js', 'server');
+ if (api.addAssets) {
+ api.addAssets('../../packages.json', 'server');
+ } else {
+ api.addFiles('../../packages.json', 'server', {
+ isAsset: true
+ });
+ }
+});
\ No newline at end of file
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100755
index 0000000000000000000000000000000000000000..6a0bdc9aca2646e4da474db8d2ce675b07133d65
GIT binary patch
literal 5430
zcmeHLSx*yD6dsK~fS=GOu!EI5w&{
z^*WAQ&vBee<$r#}<}b6k4Q!76WE}o^Hb~N@^g;ZuS8~Q6lB4jiv}_E00}d=KcrkDD
zpjpFXPvNkv?<^`Ef!pmvSC0+n%O_EGVFHcstl;N8C_XtFQHQ3T$AH#>l&qz3J#}sz
zon5ww^43`ouHKrC$S1XCn==RDV!ofbI1!aR>9kngsEE=&$+vvv(bh4)#6GQ~l)qAQ
z$4`&J>-C|qWF#O{RXu~xt#g5ADY@Xe#`jiC8C_5xH3%|ACr04&`H-16BufXaU44T^
z$OFow@ktkGUD9&2vgAcy@(YGhQ8|su`$ps))GLw|b;Ns=ED8!Hsm`d_wUJ#^kCvl&
zf5)nR`Fm_NR`O#-wQEbZ7O5fiJf1P!%IsaaK821SHkd7LIGtYD>|W>$PSm|H%f_;3
ze59H=I<|mtMELle)yK3Q%IaYxfAR|SLY)8Kj5C^5_QKhy+`RV_K
Xc