├── .slugignore ├── .bowerrc ├── Procfile ├── public ├── robots.txt ├── modules │ ├── core │ │ ├── css │ │ │ ├── navbar-static-top.less │ │ │ ├── angular-ui.less │ │ │ ├── justified-nav.less │ │ │ ├── sticky-footer.less │ │ │ ├── core.less │ │ │ └── generic.less │ │ ├── images │ │ │ ├── mean.png │ │ │ ├── Dude@2x.png │ │ │ ├── Girl@2x.png │ │ │ ├── Goal@2x.png │ │ │ ├── Map@2x.png │ │ │ ├── Yelp-32.png │ │ │ ├── meanjs.png │ │ │ ├── BreweryDB.png │ │ │ ├── Graph@2x.png │ │ │ ├── Search@2x.png │ │ │ ├── Shield@2x.png │ │ │ ├── Facebook-32.png │ │ │ ├── Instagram-32.png │ │ │ ├── Pensils@2x.png │ │ │ ├── Pinterest-32.png │ │ │ ├── Settings@2x.png │ │ │ ├── Twitter-32.png │ │ │ ├── hack_reactor.png │ │ │ ├── hrhq-logo@2x.png │ │ │ ├── meanjs_logo.png │ │ │ ├── BreweryDB_logo.png │ │ │ ├── Foursquare-32.png │ │ │ ├── GooglePlus-32.png │ │ │ ├── YouTube_01-32.png │ │ │ ├── predictionio.jpeg │ │ │ ├── Facebook_Like-32.png │ │ │ ├── PredictionIO-logo.png │ │ │ ├── no-beer-label-60.png │ │ │ └── on-tapp-165x165.png │ │ ├── img │ │ │ ├── brand │ │ │ │ ├── logo.png │ │ │ │ └── favicon.ico │ │ │ └── loaders │ │ │ │ └── loader.gif │ │ ├── core.client.module.js │ │ ├── controllers │ │ │ ├── home.client.controller.js │ │ │ └── header.client.controller.js │ │ ├── services │ │ │ ├── search.client.service.js │ │ │ ├── core.client.service.js │ │ │ └── menus.client.service.js │ │ ├── config │ │ │ └── core.client.routes.js │ │ ├── tests │ │ │ ├── home.client.controller.test.js │ │ │ └── header.client.controller.test.js │ │ └── views │ │ │ ├── header.client.view.html │ │ │ └── home.client.view.html │ ├── nearby │ │ ├── images │ │ │ └── beer-icon.png │ │ ├── nearby.client.module.js │ │ ├── controllers │ │ │ ├── info.client.controller.js │ │ │ └── nearby.client.controller.js │ │ ├── config │ │ │ ├── nearby.client.config.js │ │ │ └── nearby.client.routes.js │ │ ├── services │ │ │ └── breweries.client.service.js │ │ ├── views │ │ │ ├── info.client.view.html │ │ │ └── nearby.client.view.html │ │ ├── css │ │ │ └── map.less │ │ └── tests │ │ │ └── nearby.client.controller.test.js │ ├── users │ │ ├── img │ │ │ └── buttons │ │ │ │ ├── github.png │ │ │ │ ├── google.png │ │ │ │ ├── facebook.png │ │ │ │ ├── linkedin.png │ │ │ │ └── twitter.png │ │ ├── users.client.module.js │ │ ├── views │ │ │ ├── password │ │ │ │ ├── reset-password-success.client.view.html │ │ │ │ ├── reset-password-invalid.client.view.html │ │ │ │ ├── forgot-password.client.view.html │ │ │ │ └── reset-password.client.view.html │ │ │ ├── settings │ │ │ │ ├── social-accounts.client.view.html │ │ │ │ ├── change-password.client.view.html │ │ │ │ └── edit-profile.client.view.html │ │ │ └── authentication │ │ │ │ ├── signin.client.view.html │ │ │ │ └── signup.client.view.html │ │ ├── css │ │ │ └── users.less │ │ ├── services │ │ │ ├── authentication.client.service.js │ │ │ └── users.client.service.js │ │ ├── config │ │ │ ├── users.client.config.js │ │ │ └── users.client.routes.js │ │ ├── controllers │ │ │ ├── authentication.client.controller.js │ │ │ ├── password.client.controller.js │ │ │ └── settings.client.controller.js │ │ └── tests │ │ │ └── authentication.client.controller.test.js │ ├── beer │ │ ├── beer.client.module.js │ │ ├── services │ │ │ ├── beer.client.service.js │ │ │ └── stylequery.client.service.js │ │ ├── config │ │ │ └── beer.client.routes.js │ │ ├── controllers │ │ │ └── beer.client.controller.js │ │ ├── tests │ │ │ └── beer.client.controller.test.js │ │ └── views │ │ │ └── beer.client.view.html │ ├── ratings │ │ ├── ratings.client.module.js │ │ ├── services │ │ │ ├── beer.client.service.js │ │ │ ├── stylequery.client.service.js │ │ │ ├── ratings.client.service.js │ │ │ └── predictionio.client.service.js │ │ ├── config │ │ │ ├── ratings.client.config.js │ │ │ └── ratings.client.routes.js │ │ ├── views │ │ │ ├── edit-rating.client.view.html │ │ │ ├── view-rating.client.view.html │ │ │ └── list-ratings.client.view.html │ │ ├── controllers │ │ │ └── ratings.client.controller.js │ │ └── tests │ │ │ └── ratings.client.controller.test.js │ ├── search │ │ ├── search.client.module.js │ │ ├── config │ │ │ └── search.client.routes.js │ │ ├── views │ │ │ └── search.client.view.html │ │ ├── controllers │ │ │ └── search.client.controller.js │ │ └── tests │ │ │ └── search.client.controller.test.js │ └── brewery │ │ ├── brewery.client.module.js │ │ ├── config │ │ └── brewery.client.routes.js │ │ ├── services │ │ └── brewery.client.service.js │ │ ├── tests │ │ └── brewery.client.controller.test.js │ │ └── controllers │ │ └── brewery.client.controller.js ├── humans.txt ├── application.js ├── config.js └── less │ ├── mixins.less │ └── application.less ├── .travis.yml ├── .env ├── app ├── views │ ├── index.server.view.html │ ├── 500.server.view.html │ ├── 404.server.view.html │ ├── templates │ │ ├── reset-password-confirm-email.server.view.html │ │ └── reset-password-email.server.view.html │ └── layout.server.view.html ├── routes │ ├── core.server.routes.js │ ├── beers.server.routes.js │ ├── brewery.server.routes.js │ ├── search.server.routes.js │ ├── beer.server.routes.js │ ├── breweries.server.routes.js │ ├── recommedation.server.routes.js │ ├── ratings.server.routes.js │ └── users.server.routes.js ├── controllers │ ├── core.server.controller.js │ ├── users.server.controller.js │ ├── errors.server.controller.js │ ├── users │ │ ├── users.authorization.server.controller.js │ │ └── users.profile.server.controller.js │ └── ratings.server.controller.js ├── models │ ├── rating.server.model.js │ └── user.server.model.js └── tests │ ├── rating.server.model.test.js │ └── user.server.model.test.js ├── fig.yml ├── circle.yml ├── .csslintrc ├── newrelic.js ├── config ├── logger.js ├── passport.js ├── init.js ├── strategies │ ├── local.js │ ├── twitter.js │ ├── google.js │ └── facebook.js ├── env │ ├── test.js │ ├── development.js │ ├── secure.js │ ├── all.js │ └── production.js ├── config.js └── express.js ├── scripts └── generate-ssl-certs.sh ├── Dockerfile ├── .gitignore ├── bower.json ├── .editorconfig ├── LICENSE.md ├── params.json ├── README.md ├── PRESS-RELEASE.md ├── server.js ├── karma.conf.js ├── .jshintrc ├── package.json └── Gruntfile.js /.slugignore: -------------------------------------------------------------------------------- 1 | /app/tests 2 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "public/lib" 3 | } 4 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: ./node_modules/.bin/forever -m 5 server.js 2 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org/ 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /public/modules/core/css/navbar-static-top.less: -------------------------------------------------------------------------------- 1 | .navbar-static-top { 2 | margin-bottom: 0; 3 | } 4 | -------------------------------------------------------------------------------- /public/modules/core/css/angular-ui.less: -------------------------------------------------------------------------------- 1 | .nav, .pagination, .carousel, .panel-title a { cursor: pointer; } 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | env: 5 | - NODE_ENV=travis 6 | services: 7 | - mongodb 8 | -------------------------------------------------------------------------------- /public/modules/core/images/mean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/mean.png -------------------------------------------------------------------------------- /public/modules/core/images/Dude@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Dude@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Girl@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Girl@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Goal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Goal@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Map@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Map@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Yelp-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Yelp-32.png -------------------------------------------------------------------------------- /public/modules/core/images/meanjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/meanjs.png -------------------------------------------------------------------------------- /public/modules/core/img/brand/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/img/brand/logo.png -------------------------------------------------------------------------------- /public/modules/core/images/BreweryDB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/BreweryDB.png -------------------------------------------------------------------------------- /public/modules/core/images/Graph@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Graph@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Search@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Shield@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Shield@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Facebook-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Facebook-32.png -------------------------------------------------------------------------------- /public/modules/core/images/Instagram-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Instagram-32.png -------------------------------------------------------------------------------- /public/modules/core/images/Pensils@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Pensils@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Pinterest-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Pinterest-32.png -------------------------------------------------------------------------------- /public/modules/core/images/Settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Settings@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Twitter-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Twitter-32.png -------------------------------------------------------------------------------- /public/modules/core/images/hack_reactor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/hack_reactor.png -------------------------------------------------------------------------------- /public/modules/core/images/hrhq-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/hrhq-logo@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/meanjs_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/meanjs_logo.png -------------------------------------------------------------------------------- /public/modules/core/img/brand/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/img/brand/favicon.ico -------------------------------------------------------------------------------- /public/modules/core/img/loaders/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/img/loaders/loader.gif -------------------------------------------------------------------------------- /public/modules/nearby/images/beer-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/nearby/images/beer-icon.png -------------------------------------------------------------------------------- /public/modules/users/img/buttons/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/users/img/buttons/github.png -------------------------------------------------------------------------------- /public/modules/users/img/buttons/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/users/img/buttons/google.png -------------------------------------------------------------------------------- /public/modules/core/images/BreweryDB_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/BreweryDB_logo.png -------------------------------------------------------------------------------- /public/modules/core/images/Foursquare-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Foursquare-32.png -------------------------------------------------------------------------------- /public/modules/core/images/GooglePlus-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/GooglePlus-32.png -------------------------------------------------------------------------------- /public/modules/core/images/YouTube_01-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/YouTube_01-32.png -------------------------------------------------------------------------------- /public/modules/core/images/predictionio.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/predictionio.jpeg -------------------------------------------------------------------------------- /public/modules/users/img/buttons/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/users/img/buttons/facebook.png -------------------------------------------------------------------------------- /public/modules/users/img/buttons/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/users/img/buttons/linkedin.png -------------------------------------------------------------------------------- /public/modules/users/img/buttons/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/users/img/buttons/twitter.png -------------------------------------------------------------------------------- /public/modules/core/images/Facebook_Like-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/Facebook_Like-32.png -------------------------------------------------------------------------------- /public/modules/core/images/PredictionIO-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/PredictionIO-logo.png -------------------------------------------------------------------------------- /public/modules/core/images/no-beer-label-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/no-beer-label-60.png -------------------------------------------------------------------------------- /public/modules/core/images/on-tapp-165x165.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorleungtw/on-tapp/HEAD/public/modules/core/images/on-tapp-165x165.png -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | MONGOLAB_URI="mongodb://MongoLab-i:8Lu9GZSXvdiVCqOTDGRZL7CHOS4XN.FzDpCqHCeTKhc-@ds052827.mongolab.com:52827/MongoLab-i" 2 | NODE_ENV="production" 3 | -------------------------------------------------------------------------------- /app/views/index.server.view.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.server.view.html' %} 2 | 3 | {% block content %} 4 | 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /public/modules/core/core.client.module.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Use Applicaion configuration module to register a new module 4 | ApplicationConfiguration.registerModule('core'); -------------------------------------------------------------------------------- /public/modules/core/css/justified-nav.less: -------------------------------------------------------------------------------- 1 | /* Main marketing message and sign up button */ 2 | .jumbotron { 3 | text-align: center; 4 | background-color: transparent; 5 | } 6 | -------------------------------------------------------------------------------- /app/views/500.server.view.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.server.view.html' %} 2 | 3 | {% block content %} 4 |
6 | {{error}}
7 |
8 | {% endblock %}
9 |
--------------------------------------------------------------------------------
/public/modules/beer/beer.client.module.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Use application configuration module to register a new module
4 | ApplicationConfiguration.registerModule('beer');
5 |
--------------------------------------------------------------------------------
/public/modules/users/users.client.module.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Use Application configuration module to register a new module
4 | ApplicationConfiguration.registerModule('users');
--------------------------------------------------------------------------------
/public/modules/nearby/nearby.client.module.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Use application configuration module to register a new module
4 | ApplicationConfiguration.registerModule('nearby');
5 |
--------------------------------------------------------------------------------
/public/modules/ratings/ratings.client.module.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Use applicaion configuration module to register a new module
4 | ApplicationConfiguration.registerModule('ratings');
--------------------------------------------------------------------------------
/public/modules/search/search.client.module.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Use application configuration module to register a new module
4 | ApplicationConfiguration.registerModule('search');
5 |
--------------------------------------------------------------------------------
/public/modules/brewery/brewery.client.module.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Use application configuration module to register a new module
4 | ApplicationConfiguration.registerModule('brewery');
5 |
--------------------------------------------------------------------------------
/app/views/404.server.view.html:
--------------------------------------------------------------------------------
1 | {% extends 'layout.server.view.html' %}
2 |
3 | {% block content %}
4 |
6 | {{url}} is not a valid path.
7 |
8 | {% endblock %}
9 |
--------------------------------------------------------------------------------
/fig.yml:
--------------------------------------------------------------------------------
1 | web:
2 | build: .
3 | links:
4 | - db
5 | ports:
6 | - "3000:3000"
7 | environment:
8 | NODE_ENV: development
9 | db:
10 | image: mongo
11 | ports:
12 | - "27017:27017"
--------------------------------------------------------------------------------
/app/routes/core.server.routes.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function(app) {
4 | // Root routing
5 | var core = require('../../app/controllers/core.server.controller');
6 | app.route('/').get(core.index);
7 | };
8 |
--------------------------------------------------------------------------------
/public/modules/users/views/password/reset-password-success.client.view.html:
--------------------------------------------------------------------------------
1 | Dear {{name}},
7 | 8 |This is a confirmation that the password for your account has just been changed
9 |The {{appName}} Support Team
12 | 13 | 14 | -------------------------------------------------------------------------------- /public/modules/ratings/services/stylequery.client.service.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('ratings').factory('StyleQuery', ['$http', 4 | function($http) { 5 | // Stylequery service logic 6 | // ... 7 | 8 | // Public API 9 | return { 10 | getStyle: function(styleName) { 11 | return $http.get('/api/style/' + styleName); 12 | } 13 | }; 14 | } 15 | ]); 16 | -------------------------------------------------------------------------------- /public/modules/brewery/config/brewery.client.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | //Setting up route 4 | angular.module('brewery').config(['$stateProvider', 5 | function($stateProvider) { 6 | // Beers state routing 7 | $stateProvider. 8 | state('brewery', { 9 | url: '/brewery/:breweryId', 10 | templateUrl: 'modules/brewery/views/brewery.client.view.html' 11 | }); 12 | } 13 | ]); 14 | -------------------------------------------------------------------------------- /public/modules/nearby/views/info.client.view.html: -------------------------------------------------------------------------------- 1 |Dear {{name}},
7 |9 | You have requested to have your password reset for your account at {{appName}} 10 |
11 |Please visit this url to reset your password:
12 |{{url}}
13 | If you didn't make this request, you can ignore this email. 14 |The {{appName}} Support Team
17 | 18 | 19 | -------------------------------------------------------------------------------- /app/routes/beers.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var request = require('request'); 3 | var config = require('../../config/config'); 4 | 5 | module.exports = function(app) { 6 | // breweryId contains the id of the brewery to allow listing of beers 7 | app.get('/api/beers/:breweryId', function(req, res){ 8 | request('https://api.brewerydb.com/v2/brewery/' + req.params.breweryId + '/beers?key=' + config.brewerydb.api, function (error, response, body) { 9 | if (!error && response.statusCode === 200) { 10 | res.send(body); 11 | } 12 | }); 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /app/routes/brewery.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var request = require('request'); 3 | var config = require('../../config/config'); 4 | 5 | module.exports = function(app) { 6 | // breweryId contains the id of the beer 7 | app.get('/api/brewery/:breweryId', function(req, res){ 8 | request('https://api.brewerydb.com/v2/brewery/' + req.params.breweryId + '?withGuilds=Y&withSocialAccounts=Y&withLocations=Y&key=' + config.brewerydb.api, function (error, response, body) { 9 | if (!error && response.statusCode === 200) { 10 | res.send(body); 11 | } 12 | }); 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /app/routes/search.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var request = require('request'); 3 | var config = require('../../config/config'); 4 | 5 | module.exports = function(app) { 6 | // name contains the partial of what the user is searching for 7 | app.get('/api/search/:keyword/:page', function(req, res){ 8 | request('https://api.brewerydb.com/v2/search?q=' + req.params.keyword + '&p=' + req.params.page + '&key=' + config.brewerydb.api, function (error, response, body) { 9 | if (!error && response.statusCode === 200) { 10 | res.send(body); 11 | } 12 | }); 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /app/routes/beer.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var request = require('request'); 3 | var config = require('../../config/config'); 4 | var api_key = config.brewerydb.api; 5 | 6 | module.exports = function(app) { 7 | // beerId contains the id of the beer 8 | app.get('/api/beer/:beerId', function(req, res){ 9 | request('https://api.brewerydb.com/v2/beer/' + req.params.beerId + '?withBreweries=Y&withSocialAccounts=Y&withIngredients=Y&key=' + api_key, function (error, response, body) { 10 | if (!error && response.statusCode === 200) { 11 | res.send(body); 12 | } 13 | }); 14 | }); 15 | }; 16 | -------------------------------------------------------------------------------- /public/modules/nearby/config/nearby.client.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | //Setting up route 4 | angular.module('nearby').config(['$stateProvider', 'uiGmapGoogleMapApiProvider', 5 | function($stateProvider, uiGmapGoogleMapApiProvider) { 6 | // Nearby state routing 7 | $stateProvider. 8 | state('nearby', { 9 | url: '/nearby', 10 | templateUrl: 'modules/nearby/views/nearby.client.view.html' 11 | }); 12 | 13 | uiGmapGoogleMapApiProvider.configure({ 14 | key: 'AIzaSyAQHm36O2gZr34HkBjElKYHox3LVWR8UWY', 15 | v: '3.17', 16 | libraries: 'geometry,visualization' 17 | }); 18 | } 19 | ]); 20 | -------------------------------------------------------------------------------- /app/routes/breweries.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var request = require('request'); 3 | var config = require('../../config/config'); 4 | 5 | module.exports = function(app) { 6 | // lat and lng contain the current location latitude and longitude to allow listing 7 | // of nearby breweries 8 | app.get('/api/breweries/:lat/:lng', function(req, res){ 9 | request('https://api.brewerydb.com/v2/search/geo/point?lat=' + req.params.lat + '&lng=' + req.params.lng + '&radius=20&key=' + config.brewerydb.api, function (error, response, body) { 10 | if (!error && response.statusCode === 200) { 11 | res.send(body); 12 | } 13 | }); 14 | }); 15 | }; 16 | -------------------------------------------------------------------------------- /public/modules/core/tests/home.client.controller.test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | (function() { 4 | describe('HomeController', function() { 5 | //Initialize global variables 6 | var scope, 7 | HomeController; 8 | 9 | // Load the main application module 10 | beforeEach(module(ApplicationConfiguration.applicationModuleName)); 11 | 12 | beforeEach(inject(function($controller, $rootScope) { 13 | scope = $rootScope.$new(); 14 | 15 | HomeController = $controller('HomeController', { 16 | $scope: scope 17 | }); 18 | })); 19 | 20 | it('should expose the authentication service', function() { 21 | expect(scope.authentication).toBeTruthy(); 22 | }); 23 | }); 24 | })(); 25 | -------------------------------------------------------------------------------- /public/modules/ratings/config/ratings.client.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | //Setting up route 4 | angular.module('ratings').config(['$stateProvider', 5 | function($stateProvider) { 6 | // Ratings state routing 7 | $stateProvider. 8 | state('listRatings', { 9 | url: '/recommendations', 10 | templateUrl: 'modules/ratings/views/list-ratings.client.view.html' 11 | }). 12 | state('viewRating', { 13 | url: '/ratings/:ratingId', 14 | templateUrl: 'modules/ratings/views/view-rating.client.view.html' 15 | }). 16 | state('editRating', { 17 | url: '/ratings/:ratingId/edit', 18 | templateUrl: 'modules/ratings/views/edit-rating.client.view.html' 19 | }); 20 | } 21 | ]); 22 | -------------------------------------------------------------------------------- /public/modules/core/tests/header.client.controller.test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | (function() { 4 | describe('HeaderController', function() { 5 | //Initialize global variables 6 | var scope, 7 | HeaderController; 8 | 9 | // Load the main application module 10 | beforeEach(module(ApplicationConfiguration.applicationModuleName)); 11 | 12 | beforeEach(inject(function($controller, $rootScope) { 13 | scope = $rootScope.$new(); 14 | 15 | HeaderController = $controller('HeaderController', { 16 | $scope: scope 17 | }); 18 | })); 19 | 20 | it('should expose the authentication service', function() { 21 | expect(scope.authentication).toBeTruthy(); 22 | }); 23 | }); 24 | })(); 25 | -------------------------------------------------------------------------------- /newrelic.js: -------------------------------------------------------------------------------- 1 | /** 2 | * New Relic agent configuration. 3 | * 4 | * See lib/config.defaults.js in the agent distribution for a more complete 5 | * description of configuration variables and their potential values. 6 | */ 7 | exports.config = { 8 | /** 9 | * Array of application names. 10 | */ 11 | app_name : ['OnTapp'], 12 | /** 13 | * Your New Relic license key. 14 | */ 15 | license_key : '39a551845a4a8366155beef60b007d011186dd35', 16 | logging : { 17 | /** 18 | * Level at which to log. 'trace' is most useful to New Relic when diagnosing 19 | * issues with the agent, 'info' and higher will impose the least overhead on 20 | * production applications. 21 | */ 22 | level : 'info' 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /config/logger.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var morgan = require('morgan'); 8 | var config = require('./config'); 9 | var fs = require('fs'); 10 | 11 | /** 12 | * Module init function. 13 | */ 14 | module.exports = { 15 | 16 | getLogFormat: function() { 17 | return config.log.format; 18 | }, 19 | 20 | getLogOptions: function() { 21 | var options = {}; 22 | 23 | try { 24 | if ('stream' in config.log.options) { 25 | options = { 26 | stream: fs.createWriteStream(process.cwd() + '/' + config.log.options.stream, {flags: 'a'}) 27 | }; 28 | } 29 | } catch (e) { 30 | options = {}; 31 | } 32 | 33 | return options; 34 | } 35 | 36 | }; 37 | -------------------------------------------------------------------------------- /app/routes/recommedation.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var request = require('request'); 4 | var config = require('../../config/config'); 5 | 6 | module.exports = function(app) { 7 | // Routing logic 8 | // ... 9 | app.get('/api/recommendation/:userId', function(req, res){ 10 | 11 | request.post({ 12 | headers: {'content-type' : 'application/json'}, 13 | url: 'http://54.183.105.216:8000/queries.json', 14 | body: JSON.stringify({ 15 | user: '54b47a41557aa852537fb0ef', 16 | num: 1 17 | }) 18 | }, function (error, response, body) { 19 | if (!error && response.statusCode === 200) { 20 | res.send(body); 21 | } else { 22 | res.send(error); 23 | } 24 | }); 25 | }); 26 | }; 27 | -------------------------------------------------------------------------------- /scripts/generate-ssl-certs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -e server.js ] 4 | then 5 | echo "Error: could not find main application server.js file" 6 | echo "You should run the generate-ssl-certs.sh script from the main MEAN application root directory" 7 | echo "i.e: bash scripts/generate-ssl-cers.sh" 8 | exit -1 9 | fi 10 | 11 | echo "Generating self-signed certificates..." 12 | mkdir -p ./config/sslcerts 13 | openssl genrsa -out ./config/sslcerts/key.pem -aes256 1024 14 | openssl req -new -key ./config/sslcerts/key.pem -out ./config/sslcerts/csr.pem 15 | openssl x509 -req -days 9999 -in ./config/sslcerts/csr.pem -signkey ./config/sslcerts/key.pem -out ./config/sslcerts/cert.pem 16 | rm ./config/sslcerts/csr.pem 17 | chmod 600 ./config/sslcerts/key.pem ./config/sslcerts/cert.pem 18 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dockerfile/nodejs 2 | 3 | MAINTAINER Matthias Luebken, matthias@catalyst-zero.com 4 | 5 | WORKDIR /home/mean 6 | 7 | # Install Mean.JS Prerequisites 8 | RUN npm install -g grunt-cli 9 | RUN npm install -g bower 10 | 11 | # Install Mean.JS packages 12 | ADD package.json /home/mean/package.json 13 | RUN npm install 14 | 15 | # Manually trigger bower. Why doesnt this work via npm install? 16 | ADD .bowerrc /home/mean/.bowerrc 17 | ADD bower.json /home/mean/bower.json 18 | RUN bower install --config.interactive=false --allow-root 19 | 20 | # Make everything available for start 21 | ADD . /home/mean 22 | 23 | # currently only works for development 24 | ENV NODE_ENV development 25 | 26 | # Port 3000 for server 27 | # Port 35729 for livereload 28 | EXPOSE 3000 35729 29 | CMD ["grunt"] -------------------------------------------------------------------------------- /config/passport.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | var passport = require('passport'), 7 | User = require('mongoose').model('User'), 8 | path = require('path'), 9 | config = require('./config'); 10 | 11 | /** 12 | * Module init function. 13 | */ 14 | module.exports = function() { 15 | // Serialize sessions 16 | passport.serializeUser(function(user, done) { 17 | done(null, user.id); 18 | }); 19 | 20 | // Deserialize sessions 21 | passport.deserializeUser(function(id, done) { 22 | User.findOne({ 23 | _id: id 24 | }, '-salt -password', function(err, user) { 25 | done(err, user); 26 | }); 27 | }); 28 | 29 | // Initialize strategies 30 | config.getGlobbedFiles('./config/strategies/**/*.js').forEach(function(strategy) { 31 | require(path.resolve(strategy))(); 32 | }); 33 | }; 34 | -------------------------------------------------------------------------------- /public/application.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | //Start by defining the main module and adding the module dependencies 4 | angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies); 5 | 6 | // Setting HTML5 Location Mode 7 | angular.module(ApplicationConfiguration.applicationModuleName).config(['$locationProvider', 8 | function($locationProvider) { 9 | $locationProvider.html5Mode(true); 10 | $locationProvider.hashPrefix('!'); 11 | } 12 | ]); 13 | 14 | //Then define the init function for starting up the application 15 | angular.element(document).ready(function() { 16 | //Fixing facebook bug with redirect 17 | if (window.location.hash === '#_=_') window.location.hash = '#!'; 18 | 19 | //Then init the app 20 | angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]); 21 | }); 22 | -------------------------------------------------------------------------------- /public/modules/ratings/views/edit-rating.client.view.html: -------------------------------------------------------------------------------- 1 |Enter your account username.
4 |

{{beer.description}}
60 |{{beer.foodPairings}}
64 |You may also want to try:
71 | 72 |{{recommendation.name}} - {{recommendation.category.name}}
75 | 76 | abvMax: {{recommendation.abvMax}}, abvMin: {{recommendation.abvMin}} | 77 | 78 | fgMax: {{recommendation.fgMax}}, fgMin: {{recommendation.fgMin}} | 79 | 80 | ibuMax: {{recommendation.ibuMax}}, ibuMin: {{recommendation.ibuMin}} 81 | 82 |
7 | 14 | Discover Breweries Nearby » 15 |
16 |
24 | Users can locate breweries within a 10 mile radius of their current location. They can rate the beers at those specific breweries and receive recommendations of other beers that are similar.
26 |
29 | We all love beer, and we face an unprecedented variety of options. Where to find the beers we like? What should I drink next? OnTapp's goal is to solve these two problems.
31 |
34 | We would like to discover new and interesting beers, not simply based on categories, but also our current location and personal taste preferences.
36 |
44 | 45 |47 |"Coming from America's 'Craft Beer Capital', we have been lacking an app designed for the beer enthusists, by beer enthusists. This app fills that gap!"
46 |
51 | 52 |54 |"This is what I would want out of a beer app. Untapped so far hasn't done that for me."
53 |
{{beer.breweries[0].name}}
6 | 7 | Total number of stars: {{rating.stars}} 8 | 9 | 10 | 11 |{{beer.description}}
70 |{{beer.foodPairings}}
74 |{{itemScore.description}}
64 |{{itemScore.foodPairings}}
68 |
Top 10 rated beers