├── .slugignore ├── .bowerrc ├── Procfile ├── public ├── robots.txt ├── modules │ ├── core │ │ ├── css │ │ │ ├── navbar-static-top.css │ │ │ ├── angular-ui.css │ │ │ ├── justified-nav.css │ │ │ ├── sticky-footer.css │ │ │ ├── core.css │ │ │ └── generic.css │ │ ├── images │ │ │ ├── Map@2x.png │ │ │ ├── mean.png │ │ │ ├── Dude@2x.png │ │ │ ├── Girl@2x.png │ │ │ ├── Goal@2x.png │ │ │ ├── Graph@2x.png │ │ │ ├── Yelp-32.png │ │ │ ├── BreweryDB.png │ │ │ ├── Facebook-32.png │ │ │ ├── Pensils@2x.png │ │ │ ├── Search@2x.png │ │ │ ├── Settings@2x.png │ │ │ ├── Shield@2x.png │ │ │ ├── Twitter-32.png │ │ │ ├── meanjs_logo.png │ │ │ ├── Foursquare-32.png │ │ │ ├── GooglePlus-32.png │ │ │ ├── Instagram-32.png │ │ │ ├── Pinterest-32.png │ │ │ ├── YouTube_01-32.png │ │ │ ├── hack_reactor.png │ │ │ ├── predictionio.jpeg │ │ │ ├── BreweryDB_logo.png │ │ │ ├── Facebook_Like-32.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 │ │ │ └── search.client.controller.js │ │ ├── services │ │ │ ├── search.client.service.js │ │ │ └── menus.client.service.js │ │ ├── config │ │ │ └── core.client.routes.js │ │ ├── tests │ │ │ ├── home.client.controller.test.js │ │ │ ├── header.client.controller.test.js │ │ │ └── search.client.controller.test.js │ │ └── views │ │ │ ├── search.client.view.html │ │ │ ├── home.client.view.html │ │ │ └── header.client.view.html │ ├── nearby │ │ ├── images │ │ │ └── beer-icon.png │ │ ├── nearby.client.module.js │ │ ├── config │ │ │ ├── nearby.client.config.js │ │ │ └── nearby.client.routes.js │ │ ├── services │ │ │ ├── brewery.client.service.js │ │ │ └── breweries.client.service.js │ │ ├── controllers │ │ │ ├── brewery.client.controller.js │ │ │ └── nearby.client.controller.js │ │ ├── css │ │ │ └── map.css │ │ ├── tests │ │ │ ├── brewery.client.controller.test.js │ │ │ └── nearby.client.controller.test.js │ │ └── views │ │ │ ├── nearby.client.view.html │ │ │ └── brewery.client.view.html │ ├── users │ │ ├── img │ │ │ └── buttons │ │ │ │ ├── github.png │ │ │ │ ├── google.png │ │ │ │ ├── twitter.png │ │ │ │ ├── facebook.png │ │ │ │ └── linkedin.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.css │ │ ├── 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 │ ├── beers │ │ ├── beers.client.module.js │ │ ├── services │ │ │ ├── beer.client.service.js │ │ │ └── beers.client.service.js │ │ ├── controllers │ │ │ ├── beer.client.controller.js │ │ │ └── beers.client.controller.js │ │ ├── config │ │ │ └── beers.client.routes.js │ │ ├── views │ │ │ ├── beers.client.view.html │ │ │ └── beer.client.view.html │ │ └── tests │ │ │ ├── beer.client.controller.test.js │ │ │ └── beers.client.controller.test.js │ └── ratings │ │ ├── ratings.client.module.js │ │ ├── config │ │ ├── ratings.client.config.js │ │ └── ratings.client.routes.js │ │ ├── services │ │ ├── stylequery.client.service.js │ │ └── ratings.client.service.js │ │ ├── views │ │ ├── edit-rating.client.view.html │ │ ├── list-ratings.client.view.html │ │ └── view-rating.client.view.html │ │ ├── controllers │ │ └── ratings.client.controller.js │ │ └── tests │ │ └── ratings.client.controller.test.js ├── humans.txt ├── application.js ├── config.js └── dist │ └── application.min.css ├── api-key-example.js ├── api-key.js ├── .travis.yml ├── 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 │ ├── beer.server.routes.js │ ├── beers.server.routes.js │ ├── brewery.server.routes.js │ ├── breweries.server.routes.js │ ├── search.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 │ │ ├── users.authentication.server.controller.js │ │ └── users.password.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 ├── config ├── logger.js ├── passport.js ├── init.js ├── strategies │ ├── local.js │ ├── twitter.js │ ├── google.js │ └── facebook.js ├── config.js ├── env │ ├── development.js │ ├── test.js │ ├── production.js │ ├── secure.js │ └── all.js └── express.js ├── newrelic.js ├── scripts └── generate-ssl-certs.sh ├── Dockerfile ├── .gitignore ├── .editorconfig ├── bower.json ├── LICENSE.md ├── params.json ├── README.md ├── PRESS-RELEASE.md ├── server.js ├── karma.conf.js ├── .jshintrc ├── package.json ├── Gruntfile.js └── CONTRIBUTING.md /.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 | -------------------------------------------------------------------------------- /api-key-example.js: -------------------------------------------------------------------------------- 1 | exports.keys = { 2 | brewerydb : ' PUT YOUR API KEY HERE' 3 | }; 4 | -------------------------------------------------------------------------------- /api-key.js: -------------------------------------------------------------------------------- 1 | exports.keys = { 2 | brewerydb : '87f92c3b32c0d8e031f828b0d03c2c2a' 3 | }; 4 | -------------------------------------------------------------------------------- /public/modules/core/css/navbar-static-top.css: -------------------------------------------------------------------------------- 1 | .navbar-static-top { 2 | margin-bottom: 0; 3 | } 4 | -------------------------------------------------------------------------------- /public/modules/core/css/angular-ui.css: -------------------------------------------------------------------------------- 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/Map@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Map@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/mean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/mean.png -------------------------------------------------------------------------------- /public/modules/core/images/Dude@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Dude@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Girl@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Girl@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Goal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Goal@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Graph@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Graph@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Yelp-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Yelp-32.png -------------------------------------------------------------------------------- /public/modules/core/img/brand/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/img/brand/logo.png -------------------------------------------------------------------------------- /public/modules/core/images/BreweryDB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/BreweryDB.png -------------------------------------------------------------------------------- /public/modules/core/images/Facebook-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Facebook-32.png -------------------------------------------------------------------------------- /public/modules/core/images/Pensils@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Pensils@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Search@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Settings@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Shield@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Shield@2x.png -------------------------------------------------------------------------------- /public/modules/core/images/Twitter-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Twitter-32.png -------------------------------------------------------------------------------- /public/modules/core/images/meanjs_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/meanjs_logo.png -------------------------------------------------------------------------------- /public/modules/core/img/brand/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/img/brand/favicon.ico -------------------------------------------------------------------------------- /public/modules/core/img/loaders/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/img/loaders/loader.gif -------------------------------------------------------------------------------- /public/modules/nearby/images/beer-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/nearby/images/beer-icon.png -------------------------------------------------------------------------------- /public/modules/core/images/Foursquare-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Foursquare-32.png -------------------------------------------------------------------------------- /public/modules/core/images/GooglePlus-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/GooglePlus-32.png -------------------------------------------------------------------------------- /public/modules/core/images/Instagram-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Instagram-32.png -------------------------------------------------------------------------------- /public/modules/core/images/Pinterest-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Pinterest-32.png -------------------------------------------------------------------------------- /public/modules/core/images/YouTube_01-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/YouTube_01-32.png -------------------------------------------------------------------------------- /public/modules/core/images/hack_reactor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/hack_reactor.png -------------------------------------------------------------------------------- /public/modules/core/images/predictionio.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/predictionio.jpeg -------------------------------------------------------------------------------- /public/modules/users/img/buttons/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/users/img/buttons/github.png -------------------------------------------------------------------------------- /public/modules/users/img/buttons/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/users/img/buttons/google.png -------------------------------------------------------------------------------- /public/modules/users/img/buttons/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/users/img/buttons/twitter.png -------------------------------------------------------------------------------- /public/modules/core/images/BreweryDB_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/BreweryDB_logo.png -------------------------------------------------------------------------------- /public/modules/core/images/Facebook_Like-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/Facebook_Like-32.png -------------------------------------------------------------------------------- /public/modules/core/images/no-beer-label-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/no-beer-label-60.png -------------------------------------------------------------------------------- /public/modules/core/images/on-tapp-165x165.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/core/images/on-tapp-165x165.png -------------------------------------------------------------------------------- /public/modules/users/img/buttons/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/users/img/buttons/facebook.png -------------------------------------------------------------------------------- /public/modules/users/img/buttons/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JulieMarie/on-tapp/HEAD/public/modules/users/img/buttons/linkedin.png -------------------------------------------------------------------------------- /app/views/index.server.view.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.server.view.html' %} 2 | 3 | {% block content %} 4 | 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /app/views/500.server.view.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.server.view.html' %} 2 | 3 | {% block content %} 4 |
6 | {{error}}
7 |
8 | {% endblock %}
--------------------------------------------------------------------------------
/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.css:
--------------------------------------------------------------------------------
1 | /* Main marketing message and sign up button */
2 | .jumbotron {
3 | text-align: center;
4 | background-color: transparent;
5 | }
6 |
--------------------------------------------------------------------------------
/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/beers/beers.client.module.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Use application configuration module to register a new module
4 | ApplicationConfiguration.registerModule('beers');
5 |
--------------------------------------------------------------------------------
/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');
--------------------------------------------------------------------------------
/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 %}
--------------------------------------------------------------------------------
/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 | };
--------------------------------------------------------------------------------
/app/controllers/core.server.controller.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Module dependencies.
5 | */
6 | exports.index = function(req, res) {
7 | res.render('index', {
8 | user: req.user || null,
9 | request: req
10 | });
11 | };
--------------------------------------------------------------------------------
/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 | -------------------------------------------------------------------------------- /public/modules/ratings/services/ratings.client.service.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | //Ratings service used to communicate Ratings REST endpoints 4 | angular.module('ratings').factory('Ratings', ['$resource', 5 | function($resource) { 6 | return $resource('ratings/:ratingId', { 7 | ratingId: '@_id' 8 | }, { 9 | update: { 10 | method: 'PUT' 11 | } 12 | }); 13 | } 14 | ]); 15 | -------------------------------------------------------------------------------- /public/modules/nearby/services/breweries.client.service.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('nearby').factory('Breweries', ['$http', 4 | function($http) { 5 | // Breweries service logic 6 | // ... 7 | 8 | // Public API 9 | return { 10 | getData: function(coords){ 11 | return $http.get('/breweries/' + coords.lat + '/' + coords.long); 12 | } 13 | }; 14 | } 15 | ]); 16 | -------------------------------------------------------------------------------- /.csslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-model": false, 4 | "box-sizing": false, 5 | "floats": false, 6 | "font-sizes": false, 7 | "important": false, 8 | "known-properties": false, 9 | "overqualified-elements": false, 10 | "qualified-headings": false, 11 | "regex-selectors": false, 12 | "unique-headings": false, 13 | "universal-selector": false, 14 | "unqualified-attributes": false 15 | } 16 | -------------------------------------------------------------------------------- /public/modules/beers/controllers/beer.client.controller.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('beers').controller('BeerController', ['$scope', 'Beer', '$stateParams', 4 | function($scope, Beer, $stateParams) { 5 | // Beer controller logic 6 | $scope.beerId = $stateParams.beerId; 7 | 8 | Beer.getData($scope.beerId).success(function(results, status) { 9 | $scope.beer = results.data || 'Request failed'; 10 | }); 11 | } 12 | ]); -------------------------------------------------------------------------------- /app/controllers/users.server.controller.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | var _ = require('lodash'); 7 | 8 | /** 9 | * Extend user's controller 10 | */ 11 | module.exports = _.extend( 12 | require('./users/users.authentication.server.controller'), 13 | require('./users/users.authorization.server.controller'), 14 | require('./users/users.password.server.controller'), 15 | require('./users/users.profile.server.controller') 16 | ); -------------------------------------------------------------------------------- /public/modules/beers/config/beers.client.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | //Setting up route 4 | angular.module('beers').config(['$stateProvider', 5 | function($stateProvider) { 6 | // Beers state routing 7 | $stateProvider. 8 | state('beer', { 9 | url: '/beer/:beerId', 10 | templateUrl: 'modules/beers/views/beer.client.view.html' 11 | }). 12 | state('beers', { 13 | url: '/beers/:breweryId', 14 | templateUrl: 'modules/beers/views/beers.client.view.html' 15 | }); 16 | } 17 | ]); 18 | -------------------------------------------------------------------------------- /app/views/templates/reset-password-email.server.view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |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 | -------------------------------------------------------------------------------- /app/routes/beer.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var secret = require('../../api-key'); 3 | var request = require('request'); 4 | 5 | module.exports = function(app) { 6 | // beerId contains the id of the beer 7 | app.get('/beer/:beerId', function(req, res){ 8 | request('https://api.brewerydb.com/v2/beer/' + req.params.beerId + '?withBreweries=Y&withSocialAccounts=Y&withIngredients=Y&key=' + secret.keys.brewerydb, function (error, response, body) { 9 | if (!error && response.statusCode === 200) { 10 | res.send(body); 11 | } 12 | }); 13 | }); 14 | }; -------------------------------------------------------------------------------- /app/routes/beers.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var secret = require('../../api-key'); 3 | var request = require('request'); 4 | 5 | module.exports = function(app) { 6 | // breweryId contains the id of the brewery to allow listing of beers 7 | app.get('/beers/:breweryId', function(req, res){ 8 | request('https://api.brewerydb.com/v2/brewery/' + req.params.breweryId + '/beers?key=' + secret.keys.brewerydb, 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 secret = require('../../api-key'); 3 | var request = require('request'); 4 | 5 | module.exports = function(app) { 6 | // breweryId contains the id of the beer 7 | app.get('/brewery/:breweryId', function(req, res){ 8 | request('https://api.brewerydb.com/v2/brewery/' + req.params.breweryId + '?withGuilds=Y&withSocialAccounts=Y&withLocations=Y&key=' + secret.keys.brewerydb, function (error, response, body) { 9 | if (!error && response.statusCode === 200) { 10 | res.send(body); 11 | } 12 | }); 13 | }); 14 | }; -------------------------------------------------------------------------------- /public/modules/core/config/core.client.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Setting up route 4 | angular.module('core').config(['$stateProvider', '$urlRouterProvider', 5 | function($stateProvider, $urlRouterProvider) { 6 | // Redirect to home view when route not found 7 | $urlRouterProvider.otherwise('/'); 8 | 9 | // Home state routing 10 | $stateProvider. 11 | state('search', { 12 | url: '/search/:page/:keyword/:searchtype', 13 | templateUrl: 'modules/core/views/search.client.view.html' 14 | }). 15 | state('home', { 16 | url: '/', 17 | templateUrl: 'modules/core/views/home.client.view.html' 18 | }); 19 | } 20 | ]); -------------------------------------------------------------------------------- /app/routes/breweries.server.routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var secret = require('../../api-key'); 3 | var request = require('request'); 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('/breweries/:lat/:lng', function(req, res){ 9 | request('https://api.brewerydb.com/v2/search/geo/point?lat=' + req.params.lat + '&lng=' + req.params.lng + '&key=' + secret.keys.brewerydb, 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 | })(); -------------------------------------------------------------------------------- /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: '/ratings', 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 | })(); -------------------------------------------------------------------------------- /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 | }; -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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('brewery', { 9 | url: '/brewery/:breweryId', 10 | templateUrl: 'modules/nearby/views/brewery.client.view.html' 11 | }). 12 | state('nearby', { 13 | url: '/nearby', 14 | templateUrl: 'modules/nearby/views/nearby.client.view.html' 15 | }); 16 | 17 | uiGmapGoogleMapApiProvider.configure({ 18 | key: 'AIzaSyAQHm36O2gZr34HkBjElKYHox3LVWR8UWY', 19 | v: '3.17', 20 | libraries: 'weather,geometry,visualization' 21 | }); 22 | } 23 | ]); 24 | -------------------------------------------------------------------------------- /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"] -------------------------------------------------------------------------------- /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.hashPrefix('!'); 10 | } 11 | ]); 12 | 13 | //Then define the init function for starting up the application 14 | angular.element(document).ready(function() { 15 | //Fixing facebook bug with redirect 16 | if (window.location.hash === '#_=_') window.location.hash = '#!'; 17 | 18 | //Then init the app 19 | angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]); 20 | }); -------------------------------------------------------------------------------- /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 | }; -------------------------------------------------------------------------------- /public/modules/core/css/core.css: -------------------------------------------------------------------------------- 1 | /*.content { 2 | margin-top: 50px; 3 | }*/ 4 | .undecorated-link:hover { 5 | text-decoration: none; 6 | } 7 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { 8 | display: none !important; 9 | } 10 | .ng-invalid.ng-dirty { 11 | border-color: #FA787E; 12 | } 13 | .ng-valid.ng-dirty { 14 | border-color: #78FA89; 15 | } 16 | .browsehappy.jumbotron.hide, 17 | body.ng-cloak 18 | { 19 | display: block; 20 | } 21 | .grey-container { 22 | background-color: #f5f5f5; 23 | border: 1px solid #e3e3e3; 24 | margin: 40px 0; 25 | padding-top: 20px; 26 | padding-bottom: 20px; 27 | } 28 | .search-bar { 29 | width: 240px; 30 | display: inline; 31 | margin-top: 5px; 32 | } 33 | .search-form { 34 | margin-bottom: 5px; 35 | } 36 | 37 | .sponsor{ 38 | height: 150px; 39 | } 40 | -------------------------------------------------------------------------------- /public/modules/users/config/users.client.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Config HTTP Error Handling 4 | angular.module('users').config(['$httpProvider', 5 | function($httpProvider) { 6 | // Set the httpProvider "not authorized" interceptor 7 | $httpProvider.interceptors.push(['$q', '$location', 'Authentication', 8 | function($q, $location, Authentication) { 9 | return { 10 | responseError: function(rejection) { 11 | switch (rejection.status) { 12 | case 401: 13 | // Deauthenticate the global user 14 | Authentication.user = null; 15 | 16 | // Redirect to signin page 17 | $location.path('signin'); 18 | break; 19 | case 403: 20 | // Add unauthorized behaviour 21 | break; 22 | } 23 | 24 | return $q.reject(rejection); 25 | } 26 | }; 27 | } 28 | ]); 29 | } 30 | ]); -------------------------------------------------------------------------------- /config/init.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | var glob = require('glob'), 7 | chalk = require('chalk'); 8 | 9 | /** 10 | * Module init function. 11 | */ 12 | module.exports = function() { 13 | /** 14 | * Before we begin, lets set the environment variable 15 | * We'll Look for a valid NODE_ENV variable and if one cannot be found load the development NODE_ENV 16 | */ 17 | glob('./config/env/' + process.env.NODE_ENV + '.js', { 18 | sync: true 19 | }, function(err, environmentFiles) { 20 | if (!environmentFiles.length) { 21 | if (process.env.NODE_ENV) { 22 | console.error(chalk.red('No configuration file found for "' + process.env.NODE_ENV + '" environment using development instead')); 23 | } else { 24 | console.error(chalk.red('NODE_ENV is not defined! Using default development environment')); 25 | } 26 | 27 | process.env.NODE_ENV = 'development'; 28 | } 29 | }); 30 | 31 | }; -------------------------------------------------------------------------------- /public/config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Init the application configuration module for AngularJS application 4 | var ApplicationConfiguration = (function() { 5 | // Init module configuration options 6 | var applicationModuleName = 'onTappApp'; 7 | var applicationModuleVendorDependencies = ['ngResource', 'ngAnimate', 'ui.router', 'ui.bootstrap', 'ui.utils', 'uiGmapgoogle-maps', 'geolocation', 'angularSpinner']; 8 | 9 | // Add a new vertical module 10 | var registerModule = function(moduleName, dependencies) { 11 | // Create angular module 12 | angular.module(moduleName, dependencies || []); 13 | 14 | // Add the module to the AngularJS configuration file 15 | angular.module(applicationModuleName).requires.push(moduleName); 16 | }; 17 | 18 | return { 19 | applicationModuleName: applicationModuleName, 20 | applicationModuleVendorDependencies: applicationModuleVendorDependencies, 21 | registerModule: registerModule 22 | }; 23 | })(); 24 | -------------------------------------------------------------------------------- /public/modules/ratings/views/edit-rating.client.view.html: -------------------------------------------------------------------------------- 1 |Enter your account username.
4 |


{{beer.name}} - {{beer.breweries[0].name}}
4 |{{beer.description}}
60 |{{beer.foodPairings}}
64 |{{brewery.brewery.description}}
35 |No description
36 |
43 | Established: {{brewery.brewery.established}}
46 |Certified Organic
52 |
7 | For all lovers of frothy goodness to expand the horizons of their enthusiasm.
13 |14 | Discover Breweries Nearby » 15 |
16 |
25 | Mobile accessible web application to allow beer lovers to share and receive recommendations on their favorite form of frothy, liquid refreshment. Will also seek to provide the most immediate outlet for their desired libation.
27 |
30 | People like beer. People would like to know where to readily access the beers they like. In addition, they would like to discover new and interesting beers, based not on beer categories, but based on their personal taste preferences. OnTapp's goal, is to solve those problems.
32 |
35 | Create a user-friendly platform for sharing information about beer tastes and accessibility.
37 |46 |48 |"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!"
47 |
51 |
57 | 60 |62 |"This is what I would want out of a beer app. Untapped so far hasn't done that for me."
61 |
Powered by
69 |
70 |
71 |
72 |
73 |
74 | Established: {{brewery.established}}
12 |Certified Organic
18 |{{brewery.description}}
56 |