├── .gitignore ├── .meteor ├── .gitignore ├── release ├── platforms ├── .id ├── .finished-upgraders ├── packages └── versions ├── lib ├── collections │ └── apps.js └── routing │ └── router.js ├── client ├── index.html ├── layouts │ └── master_layout.html ├── views │ ├── appPage.js │ ├── topChart.html │ ├── appPreview.html │ └── appPage.html └── style │ └── main.css ├── AppStoreWebApp.pdf └── server ├── publications.js └── fixtures.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.2.1 2 | -------------------------------------------------------------------------------- /.meteor/platforms: -------------------------------------------------------------------------------- 1 | android 2 | browser 3 | ios 4 | server 5 | -------------------------------------------------------------------------------- /lib/collections/apps.js: -------------------------------------------------------------------------------- 1 | Apps = new Meteor.Collection('apps'); 2 | -------------------------------------------------------------------------------- /client/index.html: -------------------------------------------------------------------------------- 1 | 2 | App Store 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AppStoreWebApp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitTiger/meteorjs_app_store/HEAD/AppStoreWebApp.pdf -------------------------------------------------------------------------------- /client/layouts/master_layout.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/publications.js: -------------------------------------------------------------------------------- 1 | Meteor.publish("apps", function (options) { 2 | return Apps.find({}, options); 3 | }); 4 | 5 | Meteor.publish("singleApp", function (id) { 6 | return Apps.find({_id:id}); 7 | }); 8 | 9 | Meteor.publish("singleAppByAppId", function (appId) { 10 | return Apps.find({app_id:appId}); 11 | }); 12 | 13 | 14 | -------------------------------------------------------------------------------- /client/views/appPage.js: -------------------------------------------------------------------------------- 1 | Template.appPage.helpers({ 2 | getSuggestedApp: function(appId) { 3 | Meteor.subscribe('singleAppByAppId', appId); 4 | return Apps.findOne({app_id: appId}); 5 | } 6 | }); 7 | 8 | Template.appPage.events({ 9 | "click #backLink" : function(evt) { 10 | history.back(); 11 | } 12 | }); -------------------------------------------------------------------------------- /.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 | 1edx7j1tm5tca1s62gg0 8 | -------------------------------------------------------------------------------- /.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 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | -------------------------------------------------------------------------------- /client/views/topChart.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /lib/routing/router.js: -------------------------------------------------------------------------------- 1 | Router.configure({ 2 | layoutTemplate: "masterLayout" 3 | }); 4 | 5 | Router.route('/', { 6 | name: 'topChart', 7 | waitOn: function() { 8 | Meteor.subscribe('apps', {sort: {avgRating: -1, app_id: -1}, limit: 50}); 9 | }, 10 | data: function () { 11 | return { 12 | apps: Apps.find({}, {sort: {avgRating: -1, app_id: -1}, limit: 50}) 13 | }; 14 | } 15 | }); 16 | 17 | Router.route('/app/:_id', { 18 | name: 'appPage', 19 | waitOn: function() { 20 | Meteor.subscribe('singleApp', this.params._id); 21 | }, 22 | data: function () { 23 | return Apps.findOne(this.params._id); 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /client/views/appPreview.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.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-base # Packages every Meteor app needs to have 8 | mobile-experience # Packages for a great mobile UX 9 | mongo # The database Meteor supports right now 10 | blaze-html-templates # Compile .html files into Meteor Blaze views 11 | session # Client-side reactive dictionary for your app 12 | jquery # Helpful client-side library 13 | tracker # Meteor's client-side reactive programming library 14 | 15 | standard-minifiers # JS/CSS minifiers run for production mode 16 | es5-shim # ECMAScript 5 compatibility for older browsers. 17 | ecmascript # Enable ECMAScript2015+ syntax in app code 18 | 19 | iron:router 20 | twbs:bootstrap 21 | barbatus:stars-rating 22 | -------------------------------------------------------------------------------- /server/fixtures.js: -------------------------------------------------------------------------------- 1 | if(Apps.find({}).count() < 1){ 2 | 3 | var fs = Npm.require('fs'); 4 | 5 | fs.readFile('../../../../../server/data.json', 'utf8', Meteor.bindEnvironment(function(err, data) { 6 | if (err) throw err; 7 | var newAppData = data.split("\n"); 8 | 9 | for (var i = 0; i < newAppData.length - 1; i++) { 10 | var rawAppData = JSON.parse(newAppData[i]); 11 | var newApp = {}; 12 | 13 | newApp.name = rawAppData.title; 14 | newApp.app_id = rawAppData.app_id; 15 | newApp.developer = rawAppData.developer; 16 | newApp.description = rawAppData.intro; 17 | newApp.avgRating = parseInt(rawAppData.score) / 2; 18 | newApp.iconUrl = rawAppData.thumbnail_url; 19 | newApp.reccomendedApps = rawAppData.top_5_app; 20 | newApp.numberOfRecommendations = 0; 21 | 22 | Apps.insert(newApp); 23 | } 24 | // Project Assignment code goes here 25 | 26 | }, function(err){ 27 | throw err; 28 | })); 29 | } 30 | -------------------------------------------------------------------------------- /.meteor/versions: -------------------------------------------------------------------------------- 1 | autoupdate@1.2.4 2 | babel-compiler@5.8.24_1 3 | babel-runtime@0.1.4 4 | barbatus:stars-rating@1.0.7 5 | base64@1.0.4 6 | binary-heap@1.0.4 7 | blaze@2.1.3 8 | blaze-html-templates@1.0.1 9 | blaze-tools@1.0.4 10 | boilerplate-generator@1.0.4 11 | caching-compiler@1.0.0 12 | caching-html-compiler@1.0.2 13 | callback-hook@1.0.4 14 | check@1.1.0 15 | ddp@1.2.2 16 | ddp-client@1.2.1 17 | ddp-common@1.2.2 18 | ddp-server@1.2.2 19 | deps@1.0.9 20 | diff-sequence@1.0.1 21 | ecmascript@0.1.6 22 | ecmascript-runtime@0.2.6 23 | ejson@1.0.7 24 | es5-shim@4.1.14 25 | fastclick@1.0.7 26 | geojson-utils@1.0.4 27 | hot-code-push@1.0.0 28 | html-tools@1.0.5 29 | htmljs@1.0.5 30 | http@1.1.1 31 | id-map@1.0.4 32 | iron:controller@1.0.12 33 | iron:core@1.0.11 34 | iron:dynamic-template@1.0.12 35 | iron:layout@1.0.12 36 | iron:location@1.0.11 37 | iron:middleware-stack@1.0.11 38 | iron:router@1.0.12 39 | iron:url@1.0.11 40 | jquery@1.11.4 41 | launch-screen@1.0.4 42 | less@2.5.1 43 | livedata@1.0.15 44 | logging@1.0.8 45 | meteor@1.1.10 46 | meteor-base@1.0.1 47 | minifiers@1.1.7 48 | minimongo@1.0.10 49 | mobile-experience@1.0.1 50 | mobile-status-bar@1.0.6 51 | mongo@1.1.3 52 | mongo-id@1.0.1 53 | npm-mongo@1.4.39_1 54 | observe-sequence@1.0.7 55 | ordered-dict@1.0.4 56 | promise@0.5.1 57 | random@1.0.5 58 | reactive-dict@1.1.3 59 | reactive-var@1.0.6 60 | reload@1.1.4 61 | retry@1.0.4 62 | routepolicy@1.0.6 63 | session@1.1.1 64 | spacebars@1.0.7 65 | spacebars-compiler@1.0.7 66 | standard-minifiers@1.0.2 67 | templating@1.1.5 68 | templating-tools@1.0.0 69 | tracker@1.0.9 70 | twbs:bootstrap@3.3.6 71 | ui@1.0.8 72 | underscore@1.0.4 73 | url@1.0.5 74 | webapp@1.2.3 75 | webapp-hashing@1.0.5 76 | -------------------------------------------------------------------------------- /client/style/main.css: -------------------------------------------------------------------------------- 1 | #navTitle { 2 | margin-top: 12px; 3 | } 4 | 5 | .navbar { 6 | margin-bottom: 0px; 7 | } 8 | 9 | .appIconPreview { 10 | width: 50px; 11 | height: 50px; 12 | padding-left: 3px; 13 | margin-top: 2px; 14 | } 15 | 16 | .btn-primary { 17 | color: #337ab7; 18 | background-color: white; 19 | border-color: #337ab7; 20 | } 21 | 22 | .appRank { 23 | margin-top: 13px; 24 | font-size: 18px; 25 | } 26 | 27 | .getApp { 28 | margin-top: 8px; 29 | } 30 | 31 | .mainContainer { 32 | padding-left: 0px; 33 | padding-right: 0px; 34 | } 35 | 36 | .mystar .current-rating { 37 | color: #fbd818; 38 | } 39 | 40 | .ratingText { 41 | font-size: 10px; 42 | } 43 | 44 | .nameColumn { 45 | margin-top: 7px; 46 | } 47 | 48 | .appTitle { 49 | font-size:18px; 50 | margin-top:5px; 51 | } 52 | 53 | .appInfo { 54 | height: 150px; 55 | } 56 | 57 | .ratingsArea{ 58 | display:flex; 59 | position:absolute; 60 | bottom:0; 61 | } 62 | 63 | .appPageContent{ 64 | padding-left: 15px; 65 | padding-right: 15px; 66 | margin-top: 10px; 67 | } 68 | 69 | .list-group-item:first-child { 70 | border-top-left-radius: 0px; 71 | border-top-right-radius: 0px; 72 | } 73 | 74 | 75 | @media (min-width: 768px){ 76 | .navbar { 77 | border-radius: 4px 4px 0px 0px; 78 | } 79 | } 80 | 81 | .suggestedAppContainer { 82 | position: absolute; 83 | width: 700px; 84 | height: 100px; 85 | } 86 | 87 | .reccomendedApp { 88 | height: 80px; 89 | width: 100px; 90 | padding-left: 10px; 91 | padding-right: 10px; 92 | display: inline-block; 93 | } 94 | 95 | .overflowWrapper { 96 | overflow-x: auto; 97 | position: relative; 98 | height: 120px; 99 | width: 390px; 100 | margin-top: 15px; 101 | } -------------------------------------------------------------------------------- /client/views/appPage.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | --------------------------------------------------------------------------------