├── .DS_Store ├── .iron └── config.json ├── README.md ├── app ├── .DS_Store ├── .meteor │ ├── .finished-upgraders │ ├── .gitignore │ ├── .id │ ├── packages │ ├── platforms │ ├── release │ └── versions ├── client │ ├── .DS_Store │ ├── .gitkeep │ ├── collections │ │ └── .gitkeep │ ├── head.html │ ├── lib │ │ └── .gitkeep │ ├── stylesheets │ │ ├── .gitkeep │ │ └── main.css │ └── templates │ │ ├── .DS_Store │ │ ├── .gitkeep │ │ ├── cars │ │ ├── create_car │ │ │ ├── create_car.css │ │ │ ├── create_car.html │ │ │ └── create_car.js │ │ ├── edit_car │ │ │ ├── edit_car.css │ │ │ ├── edit_car.html │ │ │ └── edit_car.js │ │ └── list_cars │ │ │ ├── list_cars.css │ │ │ ├── list_cars.html │ │ │ └── list_cars.js │ │ ├── home │ │ ├── home.css │ │ ├── home.html │ │ └── home.js │ │ ├── layouts │ │ ├── .DS_Store │ │ └── master_layout │ │ │ ├── master_layout.html │ │ │ └── master_layout.js │ │ └── shared │ │ ├── .DS_Store │ │ ├── loading │ │ └── loading.html │ │ └── not_found │ │ └── not_found.html ├── lib │ ├── .DS_Store │ ├── .gitkeep │ ├── collections │ │ ├── .gitkeep │ │ └── cars.js │ ├── controllers │ │ ├── .gitkeep │ │ ├── cars_controller.js │ │ └── home_controller.js │ ├── methods.js │ └── routes.js ├── packages │ └── .gitkeep ├── private │ └── .gitkeep ├── public │ └── .gitkeep └── server │ ├── .DS_Store │ ├── .gitkeep │ ├── bootstrap.js │ ├── collections │ └── .gitkeep │ ├── controllers │ └── .gitkeep │ ├── lib │ └── .gitkeep │ ├── methods.js │ └── publish.js ├── bin └── .gitkeep ├── build ├── .gitkeep └── README └── config ├── .DS_Store ├── .gitkeep └── development ├── env.sh └── settings.json /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/.DS_Store -------------------------------------------------------------------------------- /.iron/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "engines": { 3 | "html": "html", 4 | "js": "js", 5 | "css": "css" 6 | }, 7 | 8 | "template": { 9 | "html": true, 10 | "js": true, 11 | "css": true 12 | }, 13 | 14 | "route": { 15 | "controller": true, 16 | "template": true 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Meteor Car Manager 2 | -------------------------------------------------------------------------------- /app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/app/.DS_Store -------------------------------------------------------------------------------- /app/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | -------------------------------------------------------------------------------- /app/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /app/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | 9lt694134lt4mr44rah 8 | -------------------------------------------------------------------------------- /app/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-platform 8 | iron:router 9 | aldeed:autoform 10 | aldeed:collection2 11 | twbs:bootstrap 12 | aldeed:delete-button 13 | -------------------------------------------------------------------------------- /app/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /app/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.1.0.2 2 | -------------------------------------------------------------------------------- /app/.meteor/versions: -------------------------------------------------------------------------------- 1 | aldeed:autoform@5.1.2 2 | aldeed:collection2@2.3.1 3 | aldeed:delete-button@1.0.0 4 | aldeed:simple-schema@1.1.0 5 | autoupdate@1.2.1 6 | base64@1.0.3 7 | binary-heap@1.0.3 8 | blaze@2.1.2 9 | blaze-tools@1.0.3 10 | boilerplate-generator@1.0.3 11 | callback-hook@1.0.3 12 | check@1.0.5 13 | ddp@1.1.0 14 | deps@1.0.7 15 | ejson@1.0.6 16 | fastclick@1.0.3 17 | geojson-utils@1.0.3 18 | html-tools@1.0.4 19 | htmljs@1.0.4 20 | http@1.1.0 21 | id-map@1.0.3 22 | iron:controller@1.0.7 23 | iron:core@1.0.7 24 | iron:dynamic-template@1.0.7 25 | iron:layout@1.0.7 26 | iron:location@1.0.7 27 | iron:middleware-stack@1.0.7 28 | iron:router@1.0.7 29 | iron:url@1.0.7 30 | jquery@1.11.3_2 31 | json@1.0.3 32 | launch-screen@1.0.2 33 | livedata@1.0.13 34 | logging@1.0.7 35 | meteor@1.1.6 36 | meteor-platform@1.2.2 37 | minifiers@1.1.5 38 | minimongo@1.0.8 39 | mobile-status-bar@1.0.3 40 | momentjs:moment@2.8.4 41 | mongo@1.1.0 42 | mongo-livedata@1.0.8 43 | observe-sequence@1.0.6 44 | ordered-dict@1.0.3 45 | random@1.0.3 46 | reactive-dict@1.1.0 47 | reactive-var@1.0.5 48 | reload@1.1.3 49 | retry@1.0.3 50 | routepolicy@1.0.5 51 | session@1.1.0 52 | spacebars@1.0.6 53 | spacebars-compiler@1.0.6 54 | templating@1.1.1 55 | tracker@1.0.7 56 | twbs:bootstrap@3.3.4 57 | ui@1.0.6 58 | underscore@1.0.3 59 | url@1.0.4 60 | webapp@1.2.0 61 | webapp-hashing@1.0.3 62 | -------------------------------------------------------------------------------- /app/client/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/app/client/.DS_Store -------------------------------------------------------------------------------- /app/client/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/client/collections/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/client/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | ironapp01 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/client/lib/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/client/stylesheets/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/client/stylesheets/main.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* main: Style */ 3 | /*****************************************************************************/ 4 | .main { 5 | } 6 | 7 | body { padding-top: 70px; padding-bottom: 70px;} 8 | -------------------------------------------------------------------------------- /app/client/templates/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/app/client/templates/.DS_Store -------------------------------------------------------------------------------- /app/client/templates/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/client/templates/cars/create_car/create_car.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* CreateCar: Style */ 3 | /*****************************************************************************/ 4 | .create-car { 5 | } 6 | -------------------------------------------------------------------------------- /app/client/templates/cars/create_car/create_car.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /app/client/templates/cars/create_car/create_car.js: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* CreateCar: Event Handlers */ 3 | /*****************************************************************************/ 4 | Template.CreateCar.events({ 5 | }); 6 | 7 | /*****************************************************************************/ 8 | /* CreateCar: Helpers */ 9 | /*****************************************************************************/ 10 | Template.CreateCar.helpers({ 11 | }); 12 | 13 | /*****************************************************************************/ 14 | /* CreateCar: Lifecycle Hooks */ 15 | /*****************************************************************************/ 16 | Template.CreateCar.created = function () { 17 | }; 18 | 19 | Template.CreateCar.rendered = function () { 20 | }; 21 | 22 | Template.CreateCar.destroyed = function () { 23 | }; 24 | -------------------------------------------------------------------------------- /app/client/templates/cars/edit_car/edit_car.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* EditCar: Style */ 3 | /*****************************************************************************/ 4 | .edit-car { 5 | } 6 | -------------------------------------------------------------------------------- /app/client/templates/cars/edit_car/edit_car.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /app/client/templates/cars/edit_car/edit_car.js: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* EditCar: Event Handlers */ 3 | /*****************************************************************************/ 4 | Template.EditCar.events({ 5 | }); 6 | 7 | /*****************************************************************************/ 8 | /* EditCar: Helpers */ 9 | /*****************************************************************************/ 10 | Template.EditCar.helpers({ 11 | beforeRemove: function () { 12 | return function (collection, id) { 13 | var doc = collection.findOne(id); 14 | if (confirm('Really delete car: "' + doc.brand + " " + doc.model + '"?')) { 15 | this.remove(); 16 | Router.go('carsList'); 17 | } 18 | }; 19 | } 20 | }); 21 | 22 | /*****************************************************************************/ 23 | /* EditCar: Lifecycle Hooks */ 24 | /*****************************************************************************/ 25 | Template.EditCar.created = function () { 26 | }; 27 | 28 | Template.EditCar.rendered = function () { 29 | }; 30 | 31 | Template.EditCar.destroyed = function () { 32 | }; 33 | -------------------------------------------------------------------------------- /app/client/templates/cars/list_cars/list_cars.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* ListCars: Style */ 3 | /*****************************************************************************/ 4 | .list-cars { 5 | } 6 | -------------------------------------------------------------------------------- /app/client/templates/cars/list_cars/list_cars.html: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /app/client/templates/cars/list_cars/list_cars.js: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* ListCars: Event Handlers */ 3 | /*****************************************************************************/ 4 | Template.ListCars.events({ 5 | }); 6 | 7 | /*****************************************************************************/ 8 | /* ListCars: Helpers */ 9 | /*****************************************************************************/ 10 | Template.ListCars.helpers({ 11 | cars: function() { 12 | return Cars.find(); 13 | } 14 | }); 15 | 16 | /*****************************************************************************/ 17 | /* ListCars: Lifecycle Hooks */ 18 | /*****************************************************************************/ 19 | Template.ListCars.created = function () { 20 | }; 21 | 22 | Template.ListCars.rendered = function () { 23 | }; 24 | 25 | Template.ListCars.destroyed = function () { 26 | }; 27 | 28 | AutoForm.addHooks(null, { 29 | onSuccess: function(operation, result, template) { 30 | Router.go('carsList'); 31 | } 32 | }); 33 | -------------------------------------------------------------------------------- /app/client/templates/home/home.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* Home: Style */ 3 | /*****************************************************************************/ 4 | .home { 5 | } 6 | -------------------------------------------------------------------------------- /app/client/templates/home/home.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /app/client/templates/home/home.js: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* Home: Event Handlers */ 3 | /*****************************************************************************/ 4 | Template.Home.events({ 5 | }); 6 | 7 | /*****************************************************************************/ 8 | /* Home: Helpers */ 9 | /*****************************************************************************/ 10 | Template.Home.helpers({ 11 | }); 12 | 13 | /*****************************************************************************/ 14 | /* Home: Lifecycle Hooks */ 15 | /*****************************************************************************/ 16 | Template.Home.created = function () { 17 | }; 18 | 19 | Template.Home.rendered = function () { 20 | }; 21 | 22 | Template.Home.destroyed = function () { 23 | }; 24 | -------------------------------------------------------------------------------- /app/client/templates/layouts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/app/client/templates/layouts/.DS_Store -------------------------------------------------------------------------------- /app/client/templates/layouts/master_layout/master_layout.html: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /app/client/templates/layouts/master_layout/master_layout.js: -------------------------------------------------------------------------------- 1 | Template.MasterLayout.helpers({ 2 | }); 3 | 4 | Template.MasterLayout.events({ 5 | }); 6 | -------------------------------------------------------------------------------- /app/client/templates/shared/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/app/client/templates/shared/.DS_Store -------------------------------------------------------------------------------- /app/client/templates/shared/loading/loading.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /app/client/templates/shared/not_found/not_found.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /app/lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/app/lib/.DS_Store -------------------------------------------------------------------------------- /app/lib/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/lib/collections/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/lib/collections/cars.js: -------------------------------------------------------------------------------- 1 | Cars = new Mongo.Collection('cars'); 2 | 3 | Cars.attachSchema(new SimpleSchema({ 4 | brand: { 5 | type: String, 6 | label: "Brand", 7 | max: 100 8 | }, 9 | model: { 10 | type: String, 11 | label: "Model", 12 | max: 100 13 | }, 14 | fueltype: { 15 | type: String, 16 | label: "Fuel Type", 17 | allowedValues: ['Petrol', 'Diesel', 'Hybrid', 'Electric'], 18 | }, 19 | bodystyle: { 20 | type: String, 21 | label: "Body Style", 22 | allowedValues: ['Convertibles', 'Coupes', 'Hatchbacks', 'Vans', 'Sedans', 'Suvs', 'Trucks', 'Wagons'], 23 | optional: true 24 | }, 25 | topspeed: { 26 | type: Number, 27 | label: "Top Speed (mph)", 28 | optional: true 29 | }, 30 | power: { 31 | type: Number, 32 | label: "Power (HP)", 33 | optional: true 34 | } 35 | })); 36 | 37 | if (Meteor.isServer) { 38 | Cars.allow({ 39 | insert: function (userId, doc) { 40 | return true; 41 | }, 42 | 43 | update: function (userId, doc, fieldNames, modifier) { 44 | return true; 45 | }, 46 | 47 | remove: function (userId, doc) { 48 | return true; 49 | } 50 | }); 51 | } 52 | -------------------------------------------------------------------------------- /app/lib/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/lib/controllers/cars_controller.js: -------------------------------------------------------------------------------- 1 | CarsController = RouteController.extend({ 2 | subscriptions: function () { 3 | this.subscribe('cars'); 4 | }, 5 | data: function () { 6 | return Cars.findOne({_id: this.params._id}); 7 | }, 8 | create: function() { 9 | this.render('CreateCar', {}); 10 | }, 11 | list: function() { 12 | this.render('ListCars', {}); 13 | }, 14 | edit: function() { 15 | this.render('EditCar', {}); 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /app/lib/controllers/home_controller.js: -------------------------------------------------------------------------------- 1 | HomeController = RouteController.extend({ 2 | layoutTemplate: 'MasterLayout', 3 | 4 | subscriptions: function() { 5 | }, 6 | 7 | action: function() { 8 | this.render('Home'); 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /app/lib/methods.js: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* Client and Server Methods */ 3 | /*****************************************************************************/ 4 | Meteor.methods({ 5 | /* 6 | * Example: 7 | * 8 | * '/app/items/insert': function (item) { 9 | * if (this.isSimulation) { 10 | * // do some client stuff while waiting for 11 | * // result from server. 12 | * return; 13 | * } 14 | * 15 | * // server method logic 16 | * } 17 | */ 18 | }); 19 | -------------------------------------------------------------------------------- /app/lib/routes.js: -------------------------------------------------------------------------------- 1 | Router.configure({ 2 | layoutTemplate: 'MasterLayout', 3 | loadingTemplate: 'Loading', 4 | notFoundTemplate: 'NotFound' 5 | }); 6 | 7 | Router.route('/', { 8 | name: 'home', 9 | controller: 'HomeController', 10 | action: 'action', 11 | where: 'client' 12 | }); 13 | 14 | 15 | Router.route('/cars/create', { 16 | name: 'createCar', 17 | controller: 'CarsController', 18 | action: 'create', 19 | where: 'client' 20 | }); 21 | 22 | 23 | Router.route('/cars', { 24 | name: 'carsList', 25 | controller: 'CarsController', 26 | action: 'list', 27 | where: 'client' 28 | }); 29 | 30 | Router.route('/cars/:_id', { 31 | name: 'editCar', 32 | controller: 'CarsController', 33 | action: 'edit', 34 | where: 'client' 35 | }); 36 | -------------------------------------------------------------------------------- /app/packages/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/private/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/public/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/server/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/app/server/.DS_Store -------------------------------------------------------------------------------- /app/server/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/server/bootstrap.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | }); 3 | -------------------------------------------------------------------------------- /app/server/collections/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/server/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/server/lib/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/server/methods.js: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* Server Only Methods */ 3 | /*****************************************************************************/ 4 | Meteor.methods({ 5 | /* 6 | * Example: 7 | * 8 | * '/app/items/insert': function (item) { 9 | * } 10 | */ 11 | }); 12 | -------------------------------------------------------------------------------- /app/server/publish.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Meteor.publish('items', function (param1, param2) { 3 | * this.ready(); 4 | * }); 5 | */ 6 | 7 | 8 | Meteor.publish('cars', function (/* args */) { 9 | return Cars.find(); 10 | }); 11 | -------------------------------------------------------------------------------- /bin/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /build/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /build/README: -------------------------------------------------------------------------------- 1 | Application production builds can go in this directory. To build your 2 | application for staging or production run this command: 3 | 4 | > iron build 5 | -------------------------------------------------------------------------------- /config/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingthesmartway/scotchio-meteor-car/568c8ec22e6bc37e2c81ab580b93187fefb947ad/config/.DS_Store -------------------------------------------------------------------------------- /config/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /config/development/env.sh: -------------------------------------------------------------------------------- 1 | # This .sh file will be sourced before starting your application. 2 | # You can use it to put environment variables you want accessible 3 | # to the server side of your app by using process.env.MY_VAR 4 | # 5 | # Example: 6 | # export MONGO_URL="mongodb://localhost:27017/myapp-development" 7 | # export ROOT_URL="http://localhost:3000" 8 | 9 | export SAMPLE_VARIABLE="somevalue" 10 | -------------------------------------------------------------------------------- /config/development/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": { 3 | }, 4 | 5 | "sample": "value" 6 | } 7 | --------------------------------------------------------------------------------