From eae6f2d6bc48e35f0f3f7806f04e73e8e1629c95 Mon Sep 17 00:00:00 2001 From: Amos Haviv Date: Mon, 10 Feb 2014 13:09:31 +0200 Subject: [PATCH] Moving to MEAN.JS --- app/controllers/core.js | 10 ++ app/routes/core.js | 7 + app/tests/articles.js | 63 +++++++ app/tests/users.js | 73 ++++++++ app/views/layout.html | 85 +++++++++ config/env/travis.js | 29 +++ config/utilities.js | 38 ++++ karma.conf.js | 65 +++++++ public/img/brand/favicon.ico | Bin 0 -> 32038 bytes public/img/brand/logo.png | Bin 0 -> 4504 bytes public/js/application.js | 20 +++ public/modules/articles/articles.js | 4 + public/modules/articles/config/routes.js | 20 +++ .../modules/articles/controllers/articles.js | 62 +++++++ public/modules/articles/services/articles.js | 12 ++ .../modules/articles/tests/articles.spec.js | 166 ++++++++++++++++++ public/modules/articles/views/create.html | 26 +++ public/modules/articles/views/edit.html | 26 +++ public/modules/articles/views/list.html | 15 ++ public/modules/articles/views/view.html | 20 +++ public/modules/core/config/routes.js | 11 ++ public/modules/core/controllers/header.js | 19 ++ public/modules/core/controllers/home.js | 5 + public/modules/core/core.js | 4 + public/modules/core/tests/header.spec.js | 26 +++ public/modules/core/tests/home.spec.js | 26 +++ public/modules/core/views/header.html | 39 ++++ public/modules/core/views/home.html | 32 ++++ public/modules/users/config/config.js | 30 ++++ public/modules/users/config/routes.js | 14 ++ .../users/controllers/authentication.js | 31 ++++ public/modules/users/img/buttons/facebook.png | Bin 0 -> 1024 bytes public/modules/users/img/buttons/google.png | Bin 0 -> 3713 bytes public/modules/users/img/buttons/linkedin.png | Bin 0 -> 1506 bytes public/modules/users/img/buttons/twitter.png | Bin 0 -> 2181 bytes .../modules/users/services/authentication.js | 14 ++ public/modules/users/users.js | 4 + public/modules/users/views/signin.html | 39 ++++ public/modules/users/views/signup.html | 51 ++++++ 39 files changed, 1086 insertions(+) create mode 100644 app/controllers/core.js create mode 100644 app/routes/core.js create mode 100644 app/tests/articles.js create mode 100644 app/tests/users.js create mode 100644 app/views/layout.html create mode 100644 config/env/travis.js create mode 100644 config/utilities.js create mode 100644 karma.conf.js create mode 100644 public/img/brand/favicon.ico create mode 100644 public/img/brand/logo.png create mode 100644 public/js/application.js create mode 100755 public/modules/articles/articles.js create mode 100755 public/modules/articles/config/routes.js create mode 100644 public/modules/articles/controllers/articles.js create mode 100644 public/modules/articles/services/articles.js create mode 100644 public/modules/articles/tests/articles.spec.js create mode 100644 public/modules/articles/views/create.html create mode 100644 public/modules/articles/views/edit.html create mode 100644 public/modules/articles/views/list.html create mode 100644 public/modules/articles/views/view.html create mode 100755 public/modules/core/config/routes.js create mode 100644 public/modules/core/controllers/header.js create mode 100644 public/modules/core/controllers/home.js create mode 100755 public/modules/core/core.js create mode 100644 public/modules/core/tests/header.spec.js create mode 100644 public/modules/core/tests/home.spec.js create mode 100644 public/modules/core/views/header.html create mode 100644 public/modules/core/views/home.html create mode 100644 public/modules/users/config/config.js create mode 100755 public/modules/users/config/routes.js create mode 100644 public/modules/users/controllers/authentication.js create mode 100644 public/modules/users/img/buttons/facebook.png create mode 100644 public/modules/users/img/buttons/google.png create mode 100644 public/modules/users/img/buttons/linkedin.png create mode 100644 public/modules/users/img/buttons/twitter.png create mode 100644 public/modules/users/services/authentication.js create mode 100755 public/modules/users/users.js create mode 100644 public/modules/users/views/signin.html create mode 100644 public/modules/users/views/signup.html diff --git a/app/controllers/core.js b/app/controllers/core.js new file mode 100644 index 00000000..ea0642e9 --- /dev/null +++ b/app/controllers/core.js @@ -0,0 +1,10 @@ +'use strict'; + +/** + * Module dependencies. + */ +exports.index = function(req, res) { + res.render('index.html', { + user: req.user || null + }); +}; diff --git a/app/routes/core.js b/app/routes/core.js new file mode 100644 index 00000000..63e84a32 --- /dev/null +++ b/app/routes/core.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function(app) { + // Root routing + var core = require('../../app/controllers/core'); + app.get('/', core.index); +}; \ No newline at end of file diff --git a/app/tests/articles.js b/app/tests/articles.js new file mode 100644 index 00000000..67e700c0 --- /dev/null +++ b/app/tests/articles.js @@ -0,0 +1,63 @@ +'use strict'; + +/** + * Module dependencies. + */ +var should = require('should'), + mongoose = require('mongoose'), + User = mongoose.model('User'), + Article = mongoose.model('Article'); + +//Globals +var user; +var article; + +//The tests +describe('', function() { + describe('Model Article:', function() { + beforeEach(function(done) { + user = new User({ + firstName: 'Full', + lastName: 'Name', + displayName: 'Full Name', + email: 'test@test.com', + username: 'username', + password: 'password' + }); + + user.save(function() { + article = new Article({ + title: 'Article Title', + content: 'Article Content', + user: user + }); + + done(); + }); + }); + + describe('Method Save', function() { + it('should be able to save without problems', function(done) { + return article.save(function(err) { + should.not.exist(err); + done(); + }); + }); + + it('should be able to show an error when try to save without title', function(done) { + article.title = ''; + + return article.save(function(err) { + should.exist(err); + done(); + }); + }); + }); + + afterEach(function(done) { + Article.remove().exec(); + User.remove().exec(); + done(); + }); + }); +}); \ No newline at end of file diff --git a/app/tests/users.js b/app/tests/users.js new file mode 100644 index 00000000..6b7cd884 --- /dev/null +++ b/app/tests/users.js @@ -0,0 +1,73 @@ +'use strict'; + +/** + * Module dependencies. + */ +var should = require('should'), + mongoose = require('mongoose'), + User = mongoose.model('User'); + +//Globals +var user, user2; + +//The tests +describe('', function() { + describe('Model User:', function() { + before(function(done) { + user = new User({ + firstName: 'Full', + lastName: 'Name', + displayName: 'Full Name', + email: 'test@test.com', + username: 'username', + password: 'password', + provider: 'local' + }); + user2 = new User({ + firstName: 'Full', + lastName: 'Name', + displayName: 'Full Name', + email: 'test@test.com', + username: 'username', + password: 'password', + provider: 'local' + }); + + done(); + }); + + describe('Method Save', function() { + it('should begin with no users', function(done) { + User.find({}, function(err, users) { + users.should.have.length(0); + done(); + }); + }); + + it('should be able to save whithout problems', function(done) { + user.save(done); + }); + + it('should fail to save an existing user again', function(done) { + user.save(); + return user2.save(function(err) { + should.exist(err); + done(); + }); + }); + + it('should be able to show an error when try to save without first name', function(done) { + user.firstName = ''; + return user.save(function(err) { + should.exist(err); + done(); + }); + }); + }); + + after(function(done) { + User.remove().exec(); + done(); + }); + }); +}); \ No newline at end of file diff --git a/app/views/layout.html b/app/views/layout.html new file mode 100644 index 00000000..169224c2 --- /dev/null +++ b/app/views/layout.html @@ -0,0 +1,85 @@ + + + + + {{title}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for modulesCSSFile in modulesCSSFiles %} + + {% endfor %} + + + + + + + +
+
+ {% block content %}{% endblock %} +
+
+ + + + + + + + + + + + + + + + + + + + + {% for modulesJSFile in modulesJSFiles %} + + {% endfor %} + + {% if process.env.NODE_ENV === 'development' %} + + + {% endif %} + + \ No newline at end of file diff --git a/config/env/travis.js b/config/env/travis.js new file mode 100644 index 00000000..6b49f231 --- /dev/null +++ b/config/env/travis.js @@ -0,0 +1,29 @@ +'use strict'; + +module.exports = { + db: 'mongodb://localhost/mean-travis', + port: 3001, + app: { + title: 'MEAN.JS - Travis Environment' + }, + facebook: { + clientID: 'APP_ID', + clientSecret: 'APP_SECRET', + callbackURL: 'http://localhost:3000/auth/facebook/callback' + }, + twitter: { + clientID: 'CONSUMER_KEY', + clientSecret: 'CONSUMER_SECRET', + callbackURL: 'http://localhost:3000/auth/twitter/callback' + }, + google: { + clientID: 'APP_ID', + clientSecret: 'APP_SECRET', + callbackURL: 'http://localhost:3000/auth/google/callback' + }, + linkedin: { + clientID: 'APP_ID', + clientSecret: 'APP_SECRET', + callbackURL: 'http://localhost:3000/auth/linkedin/callback' + } +}; \ No newline at end of file diff --git a/config/utilities.js b/config/utilities.js new file mode 100644 index 00000000..ee03717d --- /dev/null +++ b/config/utilities.js @@ -0,0 +1,38 @@ +'use strict'; + +/** + * Module dependencies. + */ +var fs = require('fs'); + +// Walk function to recursively get files +var _walk = function(root, regex, exclude, removePath) { + var output = []; + var directories = []; + + // First read through files + fs.readdirSync(root).forEach(function(file) { + var newPath = root + '/' + file; + var stat = fs.statSync(newPath); + + if (stat.isFile()) { + if (regex.test(file) && (!exclude || !exclude.test(file))) { + output.push(newPath.replace(removePath, '')); + } + } else if (stat.isDirectory()) { + directories.push(newPath); + } + }); + + // Then recursively add directories + directories.forEach(function(directory) { + output = output.concat(_walk(directory, regex, exclude, removePath)); + }); + + return output; +}; + +/** + * Exposing the walk function + */ +exports.walk = _walk; \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 00000000..f518922e --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,65 @@ +'use strict'; + +/** + * Module dependencies. + */ +var utilities = require('./config/utilities'); + +// Grabbing module files using the walk function +var modulesJSFiles = utilities.walk('./public/modules', /(.*)\.(js)/, null, null); + +// Karma configuration +module.exports = function(config) { + config.set({ + // Frameworks to use + frameworks: ['jasmine'], + + // List of files / patterns to load in the browser + files: [ + 'public/lib/angular/angular.js', + 'public/lib/angular-mocks/angular-mocks.js', + 'public/lib/angular-cookies/angular-cookies.js', + 'public/lib/angular-resource/angular-resource.js', + 'public/lib/angular-route/angular-route.js', + 'public/lib/angular-bootstrap/ui-bootstrap.js', + 'public/lib/angular-ui-utils/ui-utils.js', + 'public/js/config.js', + 'public/js/application.js', + ].concat(modulesJSFiles), + + // Test results reporter to use + // Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' + //reporters: ['progress'], + reporters: ['progress'], + + // Web server port + port: 9876, + + // Enable / disable colors in the output (reporters and logs) + colors: true, + + // Level of logging + // Possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + // Enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + // Start these browsers, currently available: + // - Chrome + // - ChromeCanary + // - Firefox + // - Opera + // - Safari (only Mac) + // - PhantomJS + // - IE (only Windows) + browsers: ['PhantomJS'], + + // If browser does not capture in given timeout [ms], kill it + captureTimeout: 60000, + + // Continuous Integration mode + // If true, it capture browsers, run tests and exit + singleRun: true + }); +}; \ No newline at end of file diff --git a/public/img/brand/favicon.ico b/public/img/brand/favicon.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>xSeE?+%ae3%sa1+en9)N*)Z zK}W>5+w706_`#;arAxD}o+BOZkqD!xYh!{xzglE=WyWvW^tQF5XuXG+pwhRhhk2?=w-LRe7PbjPcTHxz!E(s-6tbk!?2z2 z_yUSx9Kcy_lg|?3Lz4r6kbt{nG*@eo%|YIWk|*dV__dc#uZoJv+kL;s0z*qi)l$*@ zrSjiB0ZZl5@sgQg-(8jrv14Zqg-?XJ#MST@xb>VQEYwsdidXi;yLM$HU+e0Zv5}W% zS<_0ki|ix%xP^zsXEW|^SqK(B#U^%&sZt)pHteQHe}=_fYDZ*yW)-IL9$WOfp?&;D zVaVanTR(Vrwq*eyCKz+MxM>l zDK&oG(eBy|4t3yT{_ZvCn?W}e^T@m1r+f8<%21r;eFJVTYp?tF`X3LfQ4^+P(;lQ9 vNh@!qyyqLd#P3?AhGn)=vh8>5<2gBM$&CI2ht-h%e + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/public/modules/articles/views/edit.html b/public/modules/articles/views/edit.html new file mode 100644 index 00000000..790eafad --- /dev/null +++ b/public/modules/articles/views/edit.html @@ -0,0 +1,26 @@ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/public/modules/articles/views/list.html b/public/modules/articles/views/list.html new file mode 100644 index 00000000..d033e492 --- /dev/null +++ b/public/modules/articles/views/list.html @@ -0,0 +1,15 @@ +
+ + +
+ No articles yet, why don't you create one? +
+
\ No newline at end of file diff --git a/public/modules/articles/views/view.html b/public/modules/articles/views/view.html new file mode 100644 index 00000000..b7170c18 --- /dev/null +++ b/public/modules/articles/views/view.html @@ -0,0 +1,20 @@ +
+ + + + + Posted on {{article.created | date:'mediumDate'}} by {{article.user.displayName}} + +

+ {{article.content}} +

+
\ No newline at end of file diff --git a/public/modules/core/config/routes.js b/public/modules/core/config/routes.js new file mode 100755 index 00000000..b9a3cec3 --- /dev/null +++ b/public/modules/core/config/routes.js @@ -0,0 +1,11 @@ +'use strict'; + +// Setting up route +angular.module('mean.core').config(['$routeProvider', + function($routeProvider) { + $routeProvider. + when('/', { + templateUrl: 'modules/core/views/home.html' + }); + } +]); \ No newline at end of file diff --git a/public/modules/core/controllers/header.js b/public/modules/core/controllers/header.js new file mode 100644 index 00000000..803eb0b5 --- /dev/null +++ b/public/modules/core/controllers/header.js @@ -0,0 +1,19 @@ +'use strict'; + +angular.module('mean.core').controller('HeaderController', ['$scope', 'Authentication', + function($scope, Authentication) { + $scope.authentication = Authentication; + + $scope.menu = [{ + title: 'Articles', + link: 'articles', + uiRoute: '/articles' + }, { + title: 'New Article', + link: 'articles/create', + uiRoute: '/articles/create' + }]; + + $scope.isCollapsed = false; + } +]); \ No newline at end of file diff --git a/public/modules/core/controllers/home.js b/public/modules/core/controllers/home.js new file mode 100644 index 00000000..68e9dc90 --- /dev/null +++ b/public/modules/core/controllers/home.js @@ -0,0 +1,5 @@ +'use strict'; + +angular.module('mean.core').controller('HomeController', ['$scope', 'Authentication', function ($scope, Authentication) { + $scope.authentication = Authentication; +}]); \ No newline at end of file diff --git a/public/modules/core/core.js b/public/modules/core/core.js new file mode 100755 index 00000000..d4aeb106 --- /dev/null +++ b/public/modules/core/core.js @@ -0,0 +1,4 @@ +'use strict'; + +// Use Applicaion configuration module to register a new module +ApplicationConfiguration.registerModule('mean.core'); \ No newline at end of file diff --git a/public/modules/core/tests/header.spec.js b/public/modules/core/tests/header.spec.js new file mode 100644 index 00000000..5d25e3bf --- /dev/null +++ b/public/modules/core/tests/header.spec.js @@ -0,0 +1,26 @@ +'use strict'; + +(function() { + describe('MEAN controllers', function() { + describe('HeaderController', function() { + //Initialize global variables + var scope, + HeaderController; + + // Load the main application module + beforeEach(module('mean')); + + beforeEach(inject(function($controller, $rootScope) { + scope = $rootScope.$new(); + + HeaderController = $controller('HeaderController', { + $scope: scope + }); + })); + + it('should expose the authentication service', function() { + expect(scope.authentication).toBeTruthy(); + }); + }); + }); +})(); \ No newline at end of file diff --git a/public/modules/core/tests/home.spec.js b/public/modules/core/tests/home.spec.js new file mode 100644 index 00000000..b70d6be3 --- /dev/null +++ b/public/modules/core/tests/home.spec.js @@ -0,0 +1,26 @@ +'use strict'; + +(function() { + describe('MEAN controllers', function() { + describe('HomeController', function() { + //Initialize global variables + var scope, + HomeController; + + // Load the main application module + beforeEach(module('mean')); + + beforeEach(inject(function($controller, $rootScope) { + scope = $rootScope.$new(); + + HomeController = $controller('HomeController', { + $scope: scope + }); + })); + + it('should expose the authentication service', function() { + expect(scope.authentication).toBeTruthy(); + }); + }); + }); +})(); \ No newline at end of file diff --git a/public/modules/core/views/header.html b/public/modules/core/views/header.html new file mode 100644 index 00000000..47d48c7b --- /dev/null +++ b/public/modules/core/views/header.html @@ -0,0 +1,39 @@ +
+ + +
\ No newline at end of file diff --git a/public/modules/core/views/home.html b/public/modules/core/views/home.html new file mode 100644 index 00000000..7d02d4b3 --- /dev/null +++ b/public/modules/core/views/home.html @@ -0,0 +1,32 @@ +
+

THANK YOU FOR DOWNLOADING MEAN.JS

+
+

+ Before you begin we recommend you read about the basic building blocks that assemble a MEAN.JS application: +

+
+
MongoDB
+
+ Go through MongoDB Official Website and proceed to its Great Manual, which should help you understand NoSQL and MongoDB better. +
+
Express
+
+ The best way to understand Express is through its Official Website, particularly The Express Guide; you can also go through this StackOverflow Thread for more resources. +
+
AngularJS
+
+ Angular's Official Website is a great starting point. You can also use Thinkster Popular Guide, and the Egghead Videos. +
+
Node.js
+
+ Start by going through Node.js Official Website and this StackOverflow Thread, which should get you going with the Node.js platform in no time. +
+
+

+ When you're done with those resources and feel you understand the basic principals continue to the MEAN.JS Documentation. +

+
+
Enjoy & Keep Us Updated, +
The MEAN.JS Team. +
+
\ No newline at end of file diff --git a/public/modules/users/config/config.js b/public/modules/users/config/config.js new file mode 100644 index 00000000..2f1a9b25 --- /dev/null +++ b/public/modules/users/config/config.js @@ -0,0 +1,30 @@ +'use strict'; + +// Config HTTP Error Handling +angular.module('mean.users').config(['$httpProvider', + function($httpProvider) { + // Set the httpProvider "not authorized" interceptor + $httpProvider.interceptors.push(['$q', '$location', 'Authentication', + function($q, $location, Authentication) { + return { + responseError: function(rejection) { + switch (rejection.status) { + case 401: + // Deauthenticate the global user + Authentication.user = null; + + // Redirect to signin page + $location.path('signin'); + break; + case 403: + // Add unauthorized behaviour + break; + } + + return $q.reject(rejection); + } + }; + } + ]); + } +]); \ No newline at end of file diff --git a/public/modules/users/config/routes.js b/public/modules/users/config/routes.js new file mode 100755 index 00000000..65b5a533 --- /dev/null +++ b/public/modules/users/config/routes.js @@ -0,0 +1,14 @@ +'use strict'; + +// Setting up route +angular.module('mean.users').config(['$routeProvider', + function($routeProvider) { + $routeProvider. + when('/signup', { + templateUrl: 'modules/users/views/signup.html' + }). + when('/signin', { + templateUrl: 'modules/users/views/signin.html' + }); + } +]); \ No newline at end of file diff --git a/public/modules/users/controllers/authentication.js b/public/modules/users/controllers/authentication.js new file mode 100644 index 00000000..90b32441 --- /dev/null +++ b/public/modules/users/controllers/authentication.js @@ -0,0 +1,31 @@ +'use strict'; + +angular.module('mean.users').controller('AuthenticationController', ['$scope', '$http', '$location', 'Authentication', + function($scope, $http, $location, Authentication) { + $scope.authentication = Authentication; + + $scope.signup = function() { + $http.post('/auth/signup', $scope.credentials).success(function(data) { + //If successful we assign the data to the global user model + $scope.authentication.user = data; + + //And redirect to the index page + $location.path('/'); + }).error(function(data) { + $scope.error = data.message; + }); + }; + + $scope.signin = function() { + $http.post('/auth/signin', $scope.credentials).success(function(data) { + //If successful we assign the data to the global user model + $scope.authentication.user = data; + + //And redirect to the index page + $location.path('/'); + }).error(function(data) { + $scope.error = data.message; + }); + }; + } +]); \ No newline at end of file diff --git a/public/modules/users/img/buttons/facebook.png b/public/modules/users/img/buttons/facebook.png new file mode 100644 index 0000000000000000000000000000000000000000..8ebea4f71f2dedfa7dc968764c381ed7ff46cc42 GIT binary patch literal 1024 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSY)RhkE)4%caKYZ?lNlJ8w|crb zhE&XXd-uGzNTI~>kI!e${mLE~)FM)~a)I-6Juh}^m-chqQX-yHST7!|R`|+a5tQTD z;&AX?73U;@t<4t|e>t}E$xhj@DSpGtbKhSEH0G=}GumzZ`)^I$@xpztnSWnfZ*8@j zLl6uYFJ`gt=2|Q}i(CInwS-rkh)e%`zk3zC?;by##olaSld6`yRl56?YWhxZrA@gE zjnfZ}L@WS?w~SL}zGvJMHDlMV8Q%mVpOrJH8E5uSD2-!JXw+G5>wK;9uhxM%Huq2O znzwJ`;n{xYXL~L0+_I8IG+yJ{+#@xS4@w!F&uN%z}M?pU#<<4>)$sdvSu zHy^6FJEFYelXWGexUQr`Jo!Gk|G;wwuhZYz%^vH#s4V_6p<~PSjCnqvEE|g6u+Fj% z=yu$6<~c*sX5Z65i}xBb6!0W)i%(mZnyT%emD0mQzJ%R5etyw0euvW3x=&F`*Z(|M`{k{)`~SZMySG`(r*+ z%#!1)|L;C~?8*kf8?i`j74H`T6nX`5%M#s80L*?%(^^A2JPHC+zcOHvSgUxx+-MUEyDk34~uu t4K81I?{L5;rPKR8s@ar);M9!xZ5K9d`+fgN7%)pSc)I$ztaD0e0swd#v*rK* literal 0 HcmV?d00001 diff --git a/public/modules/users/img/buttons/google.png b/public/modules/users/img/buttons/google.png new file mode 100644 index 0000000000000000000000000000000000000000..0c00712521306d369b1809d80ac728324fc2fb25 GIT binary patch literal 3713 zcmV-{4u0{8P)PC)+9+Pe~RYy*YJLy@#H zCY?|W5AYd@80|N4|yikl~#N2p1Ys-neji~^Soa1JpTz0qUH<0Ci4afI4T=i69?%3v?f_Pn0(t;`?0c22xC$Y6Jx;2$Hle4r8uUHwzo%SHRaZ$&R+pDT=qW$<&Kcry_xR#-;5mz zKe%jgFzYf002eei966C2e@M|=^R*MLi>JGSnRF&l9QNB0JKi$Q#ZPs{nr2;`8vyRZ z{l$MjGZ5~d)s)+o?uuUICBfx=JH`)=UwE6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^*YTbPy9%kGo;O-G%0A@Au9iQ z)VMoNZ*Ww>>PFhJIO!Gq;OKzvG;pN(LekI*;G&g6i*;kP+qM_Aoy=Hfq*bZ-_XEX+tl0w^%hPupj3aL}zWvSDr}Ruq5Q-`Tc8_ zMIAQ17d7-Czt6jt);Lhh+2WYQ zNLGQnSHz7sb@v^#e?r0ww1Z93I-Dh9IPl1L14_rUv-aX(sXAAj5m#~J=01YXHMd*V zy9|4Z`$`hwsIm65pCAFT${L36x%n)npF8VPg_?{y|MIYX(P7r{??5UX4>0+l@u5Ya zZWyl1>jopBClGuA0F^=zEEv*~KTbk0JIsN3M?z*5_zg=at^$!GAO>mH6kM*Crm+6!j#2lOatv~b(I0S8->O~nb{-~R`V0Is+I literal 0 HcmV?d00001 diff --git a/public/modules/users/img/buttons/twitter.png b/public/modules/users/img/buttons/twitter.png new file mode 100644 index 0000000000000000000000000000000000000000..2e399c1748dbf9d0913e562f68ed750130472c82 GIT binary patch literal 2181 zcmb_ddpHyN8~=`BbTE{AHyxKQ$0?=48Pb@`(j@oWG^yMVa@)*u&8^i@n9?{d-Q03n z!fd52wM3SpFbWB?FoucaJiotx|DET3-p}Wc_j%sud7tO=eme ziuglnmayHaaH~zQzSy!Q_;39J)v4!Z3y7Q_q!>Sbh<9R4Ww;s|UuxJ!$yAIxcB@kh z6)JTQ2lkQ6V3KwqKMx$xhqyaR)ZKw%O=Ovo%B1mM0p~v)oWiHWA@J*1%stoWWSc%x zZ-+pVH2r2J^=q?VK#w#q23bFgkC-Vl&mzOGPi!wX+wb@$B9{Z+N={Y>PlreQ3_+hG z3fBn^noI}upcPsSAqpkJu)Dl92 z7ruL)iPoLjdjF$>1%?>-1wWdIDzaXo$QY7tvfKi;8Mj`0?$F zC_Q#8p%wgCYI~tbaYC$*TQHaDYSRH7{a`ECz6hz6gqX4Akg0C;WeJpX|YjsM_NuItfy$hWU+p@>$VS2Of7rtj7?Csw9DuG zQl9S|i=^sccoyGPR%jZln)5o^Oy&p=yy| zJC9y$%e3SzCKRL9wMc=4DNmk7FD5==*xN-GdyILKQdLSq+H_Qu(u`FhxPp(<0k8Xk zW#jyY&-lnveSq6ZYvgfm7U97p|X zH@C83x&tu zvU+<>4CZDoo2b-C;+qx+4CHeDRb%kHNZ@PE z=+waNl(?DaDL*nf$3MRT`H{t2C{OWTOrwx-MXY`V;L0$px9sv97eO1&hX649Ftg2L zOa#~1UA2f$9WXK>vEHtghOZ)!EwrQ5bpukP0(Rxq7_iJiy-X^(awF0vOcGv*D0l|} zjel705wrbVr6d>h7%1C}Q3%*Is1}whkhOw-RuHNs@5Ly3O~?R%R7@+IyRd03-b`(YbM!LYaek&q&2l96Vj!Tf z%-CXQ*!N>!WOjsQ54}cT!B1Ft^hf{_Yggh!n(jKnLQ$a)dD<|oQVmWzM)Y-nO9GOz zUSr1JnQA}dZ2MzM7=a&;f|4{xT_~Z z4RvoPF#HzV)%GKGs@@`1WB`Ga%@^xVLe{dG;=Hk0esyijSf5TGzFU=Qr)LV@$2X<> zC95-ekhLP?*eMRH4vgLs8|c#IBL;(!Me{I5GvAXqRHB zZ4q}9S%AJ-&rbj+tfbl#LM=|#+L5B1eGiG2mz)}c8+C`dw#^Be0`OOyscGix_8Y^t_KPoQ;VE_OC literal 0 HcmV?d00001 diff --git a/public/modules/users/services/authentication.js b/public/modules/users/services/authentication.js new file mode 100644 index 00000000..4aa6e87b --- /dev/null +++ b/public/modules/users/services/authentication.js @@ -0,0 +1,14 @@ +'use strict'; + +//Authentication service for user variables +angular.module('mean.users').factory('Authentication', [ + function() { + var _this = this; + + _this._data = { + user: window.user + }; + + return _this._data; + } +]); \ No newline at end of file diff --git a/public/modules/users/users.js b/public/modules/users/users.js new file mode 100755 index 00000000..c204eb04 --- /dev/null +++ b/public/modules/users/users.js @@ -0,0 +1,4 @@ +'use strict'; + +// Use Applicaion configuration module to register a new module +ApplicationConfiguration.registerModule('mean.users'); \ No newline at end of file diff --git a/public/modules/users/views/signin.html b/public/modules/users/views/signin.html new file mode 100644 index 00000000..1a7383c5 --- /dev/null +++ b/public/modules/users/views/signin.html @@ -0,0 +1,39 @@ +
+

Sign in using your social accounts

+ +

Or with your email

+
+ +
+
\ No newline at end of file diff --git a/public/modules/users/views/signup.html b/public/modules/users/views/signup.html new file mode 100644 index 00000000..bbe68b65 --- /dev/null +++ b/public/modules/users/views/signup.html @@ -0,0 +1,51 @@ +
+

Sign up using your social accounts

+ +

Or with your email

+
+ +
+
\ No newline at end of file