├── .slugignore ├── .jshintignore ├── packages ├── theme │ ├── README.md │ ├── mean.json │ ├── public │ │ ├── assets │ │ │ ├── img │ │ │ │ ├── bg.png │ │ │ │ ├── gmap.png │ │ │ │ ├── logo.png │ │ │ │ ├── cactus.png │ │ │ │ ├── tree65.png │ │ │ │ ├── tree79.png │ │ │ │ ├── trees7.png │ │ │ │ ├── cypress1.jpg │ │ │ │ ├── forest7.png │ │ │ │ ├── single14.png │ │ │ │ ├── social_fb.png │ │ │ │ ├── social_g+.png │ │ │ │ ├── social_in.png │ │ │ │ ├── social_tw.png │ │ │ │ ├── tree101.png │ │ │ │ ├── tree111.png │ │ │ │ ├── tree144.png │ │ │ │ ├── trees10.png │ │ │ │ ├── devide_line.png │ │ │ │ ├── mail_login.png │ │ │ │ ├── makeapoint.png │ │ │ │ ├── woman_ninja.png │ │ │ │ ├── button_login.png │ │ │ │ ├── christmas128.png │ │ │ │ ├── eye_password.png │ │ │ │ ├── icons │ │ │ │ │ ├── facebook.png │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── github.png │ │ │ │ │ ├── google.png │ │ │ │ │ ├── linkedin.png │ │ │ │ │ ├── twitter.png │ │ │ │ │ └── user-icon.png │ │ │ │ ├── sequoia-logo.png │ │ │ │ ├── social_github.png │ │ │ │ ├── top-gradient.jpg │ │ │ │ ├── welcome_social.png │ │ │ │ ├── welcome_sprite.png │ │ │ │ ├── devide_line_long.png │ │ │ │ ├── button_login_hover.png │ │ │ │ ├── sequoia-logo copy 2.png │ │ │ │ ├── eye_password_disabled.png │ │ │ │ ├── woman_ninja_forg_pass.png │ │ │ │ └── sequoia-logo-white-small.png │ │ │ ├── fonts │ │ │ │ ├── proximanova-light.eot │ │ │ │ ├── proximanova-light.ttf │ │ │ │ ├── proximanova-light.woff │ │ │ │ ├── opensanshebrew-light.eot │ │ │ │ ├── opensanshebrew-light.ttf │ │ │ │ ├── opensanshebrew-light.woff │ │ │ │ ├── opensanshebrew-regular.eot │ │ │ │ ├── opensanshebrew-regular.ttf │ │ │ │ ├── ufonts.com_futura-book.eot │ │ │ │ ├── ufonts.com_futura-book.ttf │ │ │ │ ├── opensanshebrew-regular.woff │ │ │ │ ├── ufonts.com_futura-book.woff │ │ │ │ ├── mark_simonson_-_proxima_nova_regular.eot │ │ │ │ ├── mark_simonson_-_proxima_nova_regular.ttf │ │ │ │ └── mark_simonson_-_proxima_nova_regular.woff │ │ │ └── css │ │ │ │ └── theme.css │ │ ├── services │ │ │ └── theme.js │ │ ├── routes │ │ │ └── theme.js │ │ ├── controllers │ │ │ └── theme.js │ │ └── views │ │ │ └── index.html │ ├── server │ │ ├── views │ │ │ └── index.html │ │ └── routes │ │ │ └── theme.js │ ├── package.json │ └── app.js ├── system │ ├── README.md │ ├── public │ │ ├── assets │ │ │ ├── js │ │ │ │ └── chat.js │ │ │ ├── static │ │ │ │ ├── robots.txt │ │ │ │ └── humans.txt │ │ │ ├── img │ │ │ │ ├── about │ │ │ │ │ ├── li.png │ │ │ │ │ ├── blog.gif │ │ │ │ │ ├── twitter.png │ │ │ │ │ ├── tree-10-512.png │ │ │ │ │ ├── tree-26-512.png │ │ │ │ │ ├── tree-45-64.png │ │ │ │ │ ├── tree-51-64.png │ │ │ │ │ ├── tree-7-512.png │ │ │ │ │ ├── tree-72-512.png │ │ │ │ │ ├── tree-74-64.png │ │ │ │ │ ├── tree-76-512.png │ │ │ │ │ ├── tree-85-64.png │ │ │ │ │ ├── github-10-512.png │ │ │ │ │ └── black-github-256.png │ │ │ │ ├── favicon.ico │ │ │ │ ├── apple │ │ │ │ │ ├── splash.png │ │ │ │ │ ├── splash2x.png │ │ │ │ │ ├── apple-touch-icon.png │ │ │ │ │ ├── apple-touch-icon-precomposed.png │ │ │ │ │ ├── apple-touch-icon-57x57-precomposed.png │ │ │ │ │ ├── apple-touch-icon-72x72-precomposed.png │ │ │ │ │ ├── apple-touch-icon-114x114-precomposed.png │ │ │ │ │ └── apple-touch-icon-144x144-precomposed.png │ │ │ │ ├── placeholder.png │ │ │ │ ├── loaders │ │ │ │ │ └── loader.gif │ │ │ │ └── sprites │ │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ │ └── glyphicons-halflings-white.png │ │ │ └── css │ │ │ │ └── common.css │ │ ├── services │ │ │ ├── menus.js │ │ │ ├── global.js │ │ │ └── interceptor.js │ │ ├── system.js │ │ ├── tests │ │ │ ├── index.spec.js │ │ │ └── headers.spec.js │ │ ├── views │ │ │ ├── index.html │ │ │ └── header.html │ │ ├── controllers │ │ │ ├── header.js │ │ │ └── index.js │ │ └── routes │ │ │ └── system.js │ ├── mean.json │ ├── server │ │ ├── views │ │ │ ├── index.html │ │ │ ├── 404.html │ │ │ ├── 500.html │ │ │ ├── layouts │ │ │ │ └── default.html │ │ │ └── includes │ │ │ │ ├── foot.html │ │ │ │ └── head.html │ │ ├── routes │ │ │ ├── index.js │ │ │ └── menus.js │ │ └── controllers │ │ │ └── index.js │ ├── package.json │ └── app.js ├── articles │ ├── README.md │ ├── server │ │ ├── models │ │ │ └── article.js │ │ ├── tests │ │ │ └── articles.js │ │ └── routes │ │ │ └── articles.js │ ├── public │ │ ├── tests │ │ │ └── articles.spec.js │ │ ├── assets │ │ │ ├── img │ │ │ │ └── logo1.png │ │ │ └── css │ │ │ │ └── articles.css │ │ ├── controllers │ │ │ ├── AddTreeController.js │ │ │ ├── TreesController.js │ │ │ ├── MapViewController.js │ │ │ ├── MessagesController.js │ │ │ └── paginationController.js │ │ ├── views │ │ │ ├── new.html │ │ │ ├── list.html │ │ │ └── profile.html │ │ ├── routes │ │ │ └── articles.js │ │ └── services │ │ │ ├── search.js │ │ │ └── articles.js │ ├── mean.json │ ├── package.json │ └── app.js └── users │ ├── README.md │ ├── mean.json │ ├── public │ ├── assets │ │ └── css │ │ │ └── meanUser.css │ ├── views │ │ ├── forgot-password.html │ │ ├── reset-password.html │ │ ├── login.html │ │ ├── index.html │ │ ├── register.html │ │ └── userProfile.html │ ├── routes │ │ └── auth.js │ ├── services │ │ └── meanUser.js │ ├── controllers │ │ ├── UserController.js │ │ └── meanUser.js │ └── tests │ │ └── auth.spec.js │ ├── package.json │ ├── server │ ├── template.js │ ├── routes │ │ └── users.js │ └── models │ │ └── user.js │ ├── authorization.js │ └── app.js ├── mean.json ├── Procfile ├── .floo ├── .flooignore ├── .bowerrc ├── tools ├── test │ └── mocha-req.js ├── gulp │ ├── gulp.json │ └── gulpfile.js └── grunt │ ├── grunt.json │ └── Gruntfile.js ├── toDo ├── .travis.yml ├── .editorconfig ├── .csslintrc ├── bower.json ├── LICENSE ├── config ├── assets.json ├── env │ ├── test.js │ ├── all.js │ ├── development.js │ └── production.js └── express.js ├── server.js ├── .gitignore ├── api.md ├── karma.conf.js ├── Gruntfile.js ├── package.json ├── README.md ├── .jshintrc └── CONTRIBUTING.md /.slugignore: -------------------------------------------------------------------------------- 1 | /test -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | test/coverage/** -------------------------------------------------------------------------------- /packages/theme/README.md: -------------------------------------------------------------------------------- 1 | README: theme -------------------------------------------------------------------------------- /packages/system/README.md: -------------------------------------------------------------------------------- 1 | README: system -------------------------------------------------------------------------------- /packages/system/public/assets/js/chat.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mean.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/articles/README.md: -------------------------------------------------------------------------------- 1 | README: articles 2 | -------------------------------------------------------------------------------- /packages/users/README.md: -------------------------------------------------------------------------------- 1 | README: meanUser 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: ./node_modules/.bin/forever -m 5 server.js 2 | -------------------------------------------------------------------------------- /packages/articles/server/models/article.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | -------------------------------------------------------------------------------- /packages/articles/public/tests/articles.spec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | -------------------------------------------------------------------------------- /packages/system/mean.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /.floo: -------------------------------------------------------------------------------- 1 | { 2 | "url": "https://floobits.com/dolan.charles08/TreeBook" 3 | } -------------------------------------------------------------------------------- /packages/system/public/assets/static/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org/ 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /packages/articles/mean.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "users": "latest" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/theme/mean.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "users": "latest" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/users/mean.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "system": "latest" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.flooignore: -------------------------------------------------------------------------------- 1 | extern 2 | node_modules 3 | tmp 4 | vendor 5 | .idea/workspace.xml 6 | .idea/misc.xml 7 | -------------------------------------------------------------------------------- /packages/users/public/assets/css/meanUser.css: -------------------------------------------------------------------------------- 1 | .meanUser-example h1 { 2 | background-color: purple 3 | } -------------------------------------------------------------------------------- /packages/theme/public/assets/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/bg.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/gmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/gmap.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/logo.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/cactus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/cactus.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/tree65.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/tree65.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/tree79.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/tree79.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/trees7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/trees7.png -------------------------------------------------------------------------------- /packages/articles/public/assets/img/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/articles/public/assets/img/logo1.png -------------------------------------------------------------------------------- /packages/articles/server/tests/articles.js: -------------------------------------------------------------------------------- 1 | /* jshint -W079 */ 2 | /* Related to https://github.com/linnovate/mean/issues/898 */ 3 | 'use strict'; -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/li.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/li.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/favicon.ico -------------------------------------------------------------------------------- /packages/theme/public/assets/img/cypress1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/cypress1.jpg -------------------------------------------------------------------------------- /packages/theme/public/assets/img/forest7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/forest7.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/single14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/single14.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/social_fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/social_fb.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/social_g+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/social_g+.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/social_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/social_in.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/social_tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/social_tw.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/tree101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/tree101.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/tree111.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/tree111.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/tree144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/tree144.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/trees10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/trees10.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/blog.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/blog.gif -------------------------------------------------------------------------------- /packages/theme/public/assets/img/devide_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/devide_line.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/mail_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/mail_login.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/makeapoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/makeapoint.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/woman_ninja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/woman_ninja.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/twitter.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/apple/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/apple/splash.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/placeholder.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/button_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/button_login.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/christmas128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/christmas128.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/eye_password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/eye_password.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/icons/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/icons/facebook.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/icons/favicon.ico -------------------------------------------------------------------------------- /packages/theme/public/assets/img/icons/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/icons/github.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/icons/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/icons/google.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/icons/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/icons/linkedin.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/icons/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/icons/twitter.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/sequoia-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/sequoia-logo.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/social_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/social_github.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/top-gradient.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/top-gradient.jpg -------------------------------------------------------------------------------- /packages/theme/public/assets/img/welcome_social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/welcome_social.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/welcome_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/welcome_sprite.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/apple/splash2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/apple/splash2x.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/loaders/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/loaders/loader.gif -------------------------------------------------------------------------------- /packages/theme/public/assets/img/devide_line_long.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/devide_line_long.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/icons/user-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/icons/user-icon.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-10-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-10-512.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-26-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-26-512.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-45-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-45-64.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-51-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-51-64.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-7-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-7-512.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-72-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-72-512.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-74-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-74-64.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-76-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-76-512.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/tree-85-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/tree-85-64.png -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/proximanova-light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/proximanova-light.eot -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/proximanova-light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/proximanova-light.ttf -------------------------------------------------------------------------------- /packages/theme/public/assets/img/button_login_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/button_login_hover.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/sequoia-logo copy 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/sequoia-logo copy 2.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/github-10-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/github-10-512.png -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/proximanova-light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/proximanova-light.woff -------------------------------------------------------------------------------- /packages/theme/public/assets/img/eye_password_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/eye_password_disabled.png -------------------------------------------------------------------------------- /packages/theme/public/assets/img/woman_ninja_forg_pass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/woman_ninja_forg_pass.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/about/black-github-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/about/black-github-256.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/apple/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/apple/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/opensanshebrew-light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/opensanshebrew-light.eot -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/opensanshebrew-light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/opensanshebrew-light.ttf -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/opensanshebrew-light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/opensanshebrew-light.woff -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/opensanshebrew-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/opensanshebrew-regular.eot -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/opensanshebrew-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/opensanshebrew-regular.ttf -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/ufonts.com_futura-book.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/ufonts.com_futura-book.eot -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/ufonts.com_futura-book.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/ufonts.com_futura-book.ttf -------------------------------------------------------------------------------- /packages/theme/public/assets/img/sequoia-logo-white-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/img/sequoia-logo-white-small.png -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/opensanshebrew-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/opensanshebrew-regular.woff -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/ufonts.com_futura-book.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/ufonts.com_futura-book.woff -------------------------------------------------------------------------------- /packages/system/public/assets/img/sprites/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/sprites/glyphicons-halflings.png -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components", 3 | "storage": { 4 | "packages": ".bower-cache", 5 | "registry": ".bower-registry" 6 | }, 7 | "tmp": ".bower-tmp" 8 | } 9 | -------------------------------------------------------------------------------- /packages/system/public/assets/img/apple/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/apple/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/sprites/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/sprites/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/mark_simonson_-_proxima_nova_regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/mark_simonson_-_proxima_nova_regular.eot -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/mark_simonson_-_proxima_nova_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/mark_simonson_-_proxima_nova_regular.ttf -------------------------------------------------------------------------------- /packages/theme/public/assets/fonts/mark_simonson_-_proxima_nova_regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/theme/public/assets/fonts/mark_simonson_-_proxima_nova_regular.woff -------------------------------------------------------------------------------- /packages/system/public/assets/img/apple/apple-touch-icon-57x57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/apple/apple-touch-icon-57x57-precomposed.png -------------------------------------------------------------------------------- /packages/system/public/assets/img/apple/apple-touch-icon-72x72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/apple/apple-touch-icon-72x72-precomposed.png -------------------------------------------------------------------------------- /packages/theme/public/services/theme.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mean.theme').factory('Theme', [ 4 | function() { 5 | return { 6 | name: 'theme' 7 | }; 8 | } 9 | ]); 10 | -------------------------------------------------------------------------------- /packages/theme/server/views/index.html: -------------------------------------------------------------------------------- 1 |
4 |
--------------------------------------------------------------------------------
/packages/system/public/assets/img/apple/apple-touch-icon-114x114-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/apple/apple-touch-icon-114x114-precomposed.png
--------------------------------------------------------------------------------
/packages/system/public/assets/img/apple/apple-touch-icon-144x144-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitInsights/TreeBook/HEAD/packages/system/public/assets/img/apple/apple-touch-icon-144x144-precomposed.png
--------------------------------------------------------------------------------
/tools/test/mocha-req.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | process.env.NODE_ENV = 'test';
4 | var appRoot = __dirname + '/../../';
5 | require(appRoot + 'server.js');
6 | require('meanio/lib/core_modules/module/util').preload(appRoot + '/packages/**/server', 'model');
7 |
--------------------------------------------------------------------------------
/packages/system/server/views/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'layouts/default.html' %}
2 | {% block content %}
3 |
4 |
8 | {% endblock %}
9 |
--------------------------------------------------------------------------------
/packages/system/public/services/menus.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | angular.module('mean.system').factory('Menus', ['$resource',
4 | function($resource) {
5 | return $resource('admin/menu/:name', {
6 | name: '@name',
7 | defaultMenu: '@defaultMenu'
8 | });
9 | }
10 | ]);
11 |
--------------------------------------------------------------------------------
/packages/system/public/assets/static/humans.txt:
--------------------------------------------------------------------------------
1 | # humanstxt.org/
2 | # The humans responsible & technology colophon
3 |
4 | # TEAM
5 |
6 |
13 | {{error}}
14 |
15 |
13 | {{error}}
14 |
15 | Please enter your email address to reset your password.
5 | 20 |
You can find your package in /packages/theme
21 | 22 |MEAN versions prior to 0.3.2 will be in /node_modules/theme
23 | 24 |or
5 |
9 | 26 | Each tree has a profile page like the beautiful Alicia Higgins. Each profile has basic information and map showing its precise location. The profile pictures are of each tree species, but if you want to see the exact tree you can use the street view functionality of the embedded map. 27 |
28 | Browse all trees 29 |
36 | The project was created in a week long sprint by 4 students at Hack Reactor. We use the MEAN stack and also used SQL to store the tree data.
37 |
38 |
39 |
40 |
41 |
52 |
53 | 5 | /articles GET (PG) get some Tree Data for 250 trees 6 | /articles/:treeId GET (PG) gets a tree data by ID 7 | /treeimage/:treeId GET (PG) gets tree imgurl by ID 8 | 9 | /articles/new POST (PG) adds a new tree to the database 10 |11 | 12 | ##MESSAGES (Trees/Users) 13 |
14 | /usermessages POST (PG) inserts a message made by a user 15 | /usermessages/:userId GET (PG) gets all messages made by a user 16 | 17 | /treemessages POST (PG) inserts a message made by a tree (bot) 18 | /treemessages/:treeId GET (PG) gets all messages made by a tree 19 |20 | 21 | ##USER DATA 22 |
23 | 24 | /user/:username GET (mongo) fetch a user's document based on username 25 | /user/:username/status POST (mongo) insert a status update in the user's document 26 | 27 | /userimage POST (mongo) upsert user imageurl in db 28 | /userimage/* GET (mongo) fetch user's profile imgurl 29 | 30 | Note: Actual profile picture is stored in AzureCDN 31 |32 | 33 | ##LIKES 34 |
35 | /treelike POST (PG) inserts into likes table a userid/treeid 36 | /treelikes POST (PG) queries DB for params given, 37 | returns list of users which like a tree 38 | /userlikes POST (PG) queries DB for params given, 39 | returns list of trees a user likes 40 |41 | 42 | ##Search 43 |
44 | /searchbyloc GET (PG) gets a list of trees near a given coordinate 45 | /searchbyname/:search GET (PG) gets a list of 250 trees that match the query 46 |47 | 48 | 49 | ##Example Request Control Flow 50 | User gets tree page by id 51 | 52 | 1. articles/controllers 53 | * TreesController.js > findOne 54 | 55 | 2. articles/services 56 | * articles.js['TreeData'] > ['Trees'] > getTree 57 | * automatically passes id of tree to method 58 | * get request for article/:treeID 59 | 60 | 3. server/routes 61 | * articles.js > hits articles/:treeID resource 62 | 63 | 4. server/controllers 64 | * articles.js > hits getTreeData 65 | * connects to pg. and selects name, id, species.. etc 66 | -------------------------------------------------------------------------------- /packages/system/public/controllers/header.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mean.system').controller('HeaderController', ['$scope', '$rootScope', 'Global', 'Menus', 4 | function($scope, $rootScope, Global, Menus) { 5 | $scope.global = Global; 6 | $scope.menus = {}; 7 | 8 | // Default hard coded menu items for main menu 9 | var defaultMainMenu = []; 10 | 11 | // Query menus added by modules. Only returns menus that user is allowed to see. 12 | function queryMenu(name, defaultMenu) { 13 | 14 | Menus.query({ 15 | name: name, 16 | defaultMenu: defaultMenu 17 | }, function(menu) { 18 | $scope.menus[name] = menu; 19 | }); 20 | } 21 | 22 | // Query server for menus and check permissions 23 | queryMenu('main', defaultMainMenu); 24 | queryMenu('account', []); 25 | 26 | 27 | $scope.isCollapsed = false; 28 | 29 | $rootScope.$on('loggedin', function() { 30 | 31 | queryMenu('main', defaultMainMenu); 32 | 33 | $scope.global = { 34 | authenticated: !! $rootScope.user, 35 | user: $rootScope.user 36 | }; 37 | }); 38 | 39 | $scope.chatToggle = false; 40 | $scope.chatPanelStatus = 'Show Chat'; 41 | 42 | $scope.toggleChat = function (){ 43 | if($scope.chatToggle){ 44 | $scope.chatToggle = false; 45 | $scope.chatPanelStatus = 'Show Chat'; 46 | 47 | } else { 48 | $scope.chatToggle = true; 49 | $scope.chatPanelStatus = 'Hide Chat'; 50 | } 51 | }; 52 | 53 | } 54 | ]).controller('ChatController', ['$scope', '$firebaseArray', 'Global', function($scope, $firebaseArray, Global){ 55 | 56 | var ref = new Firebase('https://flickering-torch-2529.firebaseio.com/treeChat'); //jshint ignore:line 57 | 58 | $scope.messages = $firebaseArray(ref); 59 | 60 | var placeHolder = 'system/assets/img/placeholder.png'; 61 | $scope.sendMessage = function(msg){ 62 | Global.user.imageUrl = Global.user.imageUrl || placeHolder; 63 | $scope.messages.$add({ 64 | from: Global.user, 65 | content: msg 66 | }); 67 | 68 | $scope.msg = ''; 69 | }; 70 | 71 | }]).filter('reverse', function(){ 72 | return function(items){ 73 | return items.slice().reverse(); 74 | }; 75 | }); 76 | -------------------------------------------------------------------------------- /packages/system/public/routes/system.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // $viewPathProvider, to allow overriding system default views 4 | angular.module('mean.system').provider('$viewPath', function() { 5 | function ViewPathProvider() { 6 | var overrides = {}; 7 | 8 | this.path = function(path) { 9 | return function() { 10 | return overrides[path] || path; 11 | }; 12 | }; 13 | 14 | this.override = function(defaultPath, newPath) { 15 | if (overrides[defaultPath]) { 16 | throw new Error('View already has an override: ' + defaultPath); 17 | } 18 | overrides[defaultPath] = newPath; 19 | return this; 20 | }; 21 | 22 | this.$get = function() { 23 | return this; 24 | }; 25 | } 26 | 27 | return new ViewPathProvider(); 28 | }); 29 | 30 | // $meanStateProvider, provider to wire up $viewPathProvider to $stateProvider 31 | angular.module('mean.system').provider('$meanState', ['$stateProvider', '$viewPathProvider', function($stateProvider, $viewPathProvider) { 32 | function MeanStateProvider() { 33 | this.state = function(stateName, data) { 34 | if (data.templateUrl) { 35 | data.templateUrl = $viewPathProvider.path(data.templateUrl); 36 | } 37 | $stateProvider.state(stateName, data); 38 | return this; 39 | }; 40 | 41 | this.$get = function() { 42 | return this; 43 | }; 44 | } 45 | 46 | return new MeanStateProvider(); 47 | }]); 48 | 49 | //Setting up route 50 | angular.module('mean.system').config(['$meanStateProvider', '$urlRouterProvider', 51 | function($meanStateProvider, $urlRouterProvider) { 52 | // For unmatched routes: 53 | $urlRouterProvider.otherwise('/'); 54 | 55 | // states for my app 56 | $meanStateProvider 57 | .state('home', { 58 | url: '/', 59 | templateUrl: 'system/views/index.html' 60 | }) 61 | .state('about', { 62 | url: '/about', 63 | templateUrl: 'system/views/about.html' 64 | }); 65 | 66 | $meanStateProvider 67 | .state('Log Out', { 68 | controller: function () { 69 | window.location = '/logout'; 70 | } 71 | }); 72 | } 73 | ]).config(['$locationProvider', 74 | function($locationProvider) { 75 | $locationProvider.hashPrefix('!'); 76 | } 77 | ]); 78 | -------------------------------------------------------------------------------- /packages/system/public/controllers/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mean.system').controller('IndexController', ['$scope', 'Global', 4 | function($scope, Global) { 5 | $scope.global = Global; 6 | $scope.sites = { 7 | 'makeapoint':{ 8 | 'name':'makeapoint', 9 | 'text':'Makeapoint is a platform to craft and fine-tune ideas and messages providing a graphical experience which brough an offline methodlogy online', 10 | 'author':'Linnovate', 11 | 'link':'http://www.linnovate.net', 12 | 'image':'/theme/assets/img/makeapoint.png' 13 | }, 14 | 'cactus':{ 15 | 'name':'Cactus Intranet', 16 | 'text':'Cactus Intranet is an enterprise social network with features like real-time newsfeed, notifications, groups, events, polls, referral system etc. The system has role based permission system, allowing different stakeholders access and controls relevant to them.', 17 | 'author':'QED42', 18 | 'link':'http://www.qed42.com', 19 | 'image':'/theme/assets/img/cactus.png' 20 | } 21 | }; 22 | $scope.packages = { 23 | 'gmap':{ 24 | 'name':'gmap', 25 | 'text':'gmap lets you add geographical information to your applications objects', 26 | 'author':'linnovate', 27 | 'link':'http://www.qed42.com', 28 | 'image':'/theme/assets/img/gmap.png' 29 | }, 30 | 'upload':{ 31 | 'name':'Upload', 32 | 'text':'hello text', 33 | 'author':'Linnovate', 34 | 'link':'http://www.linnovate.net', 35 | 'image':'http://cdn.designbyhumans.com/pictures/blog/09-2013/pop-culture-cats/Pop_Culture_Cats_Hamilton_Hipster.jpg' 36 | }, 37 | 'socket':{ 38 | 'name':'Socket', 39 | 'text':'Socket.io support', 40 | 'author':'Linnovate', 41 | 'link':'http://www.linnovate.net', 42 | 'image':'http://cdn.designbyhumans.com/pictures/blog/09-2013/pop-culture-cats/Pop_Culture_Cats_Hamilton_Hipster.jpg' 43 | } 44 | }; 45 | 46 | $scope.$watch(function () { 47 | for (var i = 0; i < $scope.sites.length; i+=1) { 48 | if ($scope.sites[i].active) { 49 | return $scope.sites[i]; 50 | } 51 | } 52 | }, function (currentSlide, previousSlide) { 53 | if (currentSlide !== previousSlide) { 54 | console.log('currentSlide:', currentSlide); 55 | } 56 | }); 57 | } 58 | ]); 59 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Karma configuration 4 | module.exports = function(config) { 5 | var _ = require('lodash'), 6 | basePath = '.', 7 | assets = require(basePath + '/config/assets.json'); 8 | 9 | config.set({ 10 | 11 | // base path, that will be used to resolve files and exclude 12 | basePath: basePath, 13 | 14 | // frameworks to use 15 | frameworks: ['jasmine'], 16 | 17 | // list of files / patterns to load in the browser 18 | files: _.flatten(_.values(assets.core.js)).concat([ 19 | 'packages/*/public/*.js', 20 | 'packages/*/public/*/*.js' 21 | ]), 22 | 23 | // list of files to exclude 24 | exclude: [], 25 | 26 | // test results reporter to use 27 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' 28 | reporters: ['progress', 'coverage'], 29 | 30 | // coverage 31 | preprocessors: { 32 | // source files that you want to generate coverage for 33 | // do not include tests or libraries 34 | // (these files will be instrumented by Istanbul) 35 | 'packages/*/public/controllers/*.js': ['coverage'], 36 | 'packages/*/public/services/*.js': ['coverage'] 37 | }, 38 | 39 | coverageReporter: { 40 | type: 'html', 41 | dir: 'test/coverage/' 42 | }, 43 | 44 | // web server port 45 | port: 9876, 46 | // Look for server on port 3001 (invoked by mocha) - via @brownman 47 | proxies: { 48 | '/': 'http://localhost:3001/' 49 | }, 50 | 51 | // enable / disable colors in the output (reporters and logs) 52 | colors: true, 53 | 54 | // level of logging 55 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 56 | logLevel: config.LOG_DEBUG, 57 | 58 | // enable / disable watching file and executing tests whenever any file changes 59 | autoWatch: true, 60 | 61 | // Start these browsers, currently available: 62 | // - Chrome 63 | // - ChromeCanary 64 | // - Firefox 65 | // - Opera 66 | // - Safari (only Mac) 67 | // - PhantomJS 68 | // - IE (only Windows) 69 | browsers: ['PhantomJS'], 70 | 71 | // If browser does not capture in given timeout [ms], kill it 72 | captureTimeout: 60000, 73 | 74 | // Continuous Integration mode 75 | // if true, it capture browsers, run tests and exit 76 | singleRun: true 77 | }); 78 | }; 79 | -------------------------------------------------------------------------------- /packages/articles/public/routes/articles.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | //Setting up route 4 | angular.module('mean.articles').config(['$stateProvider', 5 | function($stateProvider) { 6 | // Check if the user is connected 7 | var checkLoggedin = function($q, $timeout, $http, $location) { 8 | // Initialize a new promise 9 | var deferred = $q.defer(); 10 | 11 | // Make an AJAX call to check if the user is logged in 12 | $http.get('/loggedin').success(function(user) { 13 | // Authenticated 14 | if (user !== '0') $timeout(deferred.resolve); 15 | 16 | // Not Authenticated 17 | else { 18 | $timeout(deferred.reject); 19 | $location.url('/login'); 20 | } 21 | }); 22 | 23 | return deferred.promise; 24 | }; 25 | 26 | // states for my app 27 | $stateProvider 28 | .state('all trees', { 29 | url: '/trees', 30 | templateUrl: 'articles/views/list.html', 31 | controller: 'PaginationDemoCtrl', 32 | resolve: { 33 | loggedin: checkLoggedin, 34 | } 35 | }) 36 | .state('search', { 37 | url: '/trees/search', 38 | templateUrl: 'articles/views/list.html', 39 | controller: 'PaginationDemoCtrl', 40 | resolve: { 41 | loggedin: checkLoggedin, 42 | } 43 | }) 44 | .state('tree display', { 45 | url: '/about', 46 | templateUrl: 'articles/views/create.html', 47 | resolve: { 48 | loggedin: checkLoggedin 49 | } 50 | }) 51 | .state('tree profile page', { 52 | url: '/trees/profile', 53 | templateUrl: 'articles/views/profile.html', 54 | resolve: { 55 | loggedin: checkLoggedin 56 | } 57 | }) 58 | .state('add tree page', { 59 | url: '/trees/new', 60 | templateUrl: 'articles/views/new.html', 61 | resolve: { 62 | loggedin: checkLoggedin 63 | } 64 | }) 65 | .state('single tree display', { 66 | url: '/trees/:treeId', 67 | templateUrl: 'articles/views/profile.html', 68 | resolve: { 69 | loggedin: checkLoggedin 70 | } 71 | }) 72 | .state('user profile page', { 73 | url: '/user/:userId', 74 | templateUrl: 'users/views/userProfile.html', 75 | resolve: { 76 | loggedin: checkLoggedin 77 | } 78 | }); 79 | } 80 | ]); 81 | -------------------------------------------------------------------------------- /packages/articles/public/controllers/MapViewController.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Controller that handle the map display, get the lat and lng data and 5 | * display the map on the profile.html 6 | * currently need maker to be added 7 | */ 8 | angular.module('mean.articles', ['uiGmapgoogle-maps', 'angularFileUpload']) 9 | 10 | /** 11 | * Configure tha google map api 12 | */ 13 | .config(['uiGmapGoogleMapApiProvider', function(uiGmapGoogleMapApi){ 14 | uiGmapGoogleMapApi.configure({ 15 | //provide api key if available 16 | v: '3.18', 17 | libraries: 'geometry, visualization, places' 18 | }); 19 | }]) 20 | 21 | /** 22 | * MapView Controller to handle the MapView on ProfilePage 23 | */ 24 | .controller('MapViewController', ['$scope', '$q', 'uiGmapGoogleMapApi', 'TreeData', 'Search', 25 | /** 26 | * 27 | * @param $scope 28 | * @param $q 29 | * @param uiGmapGoogleMapApi 30 | * @param TreeData 31 | * @param Search 32 | */ 33 | function($scope, $q, uiGmapGoogleMapApi, TreeData, Search) { 34 | $scope.resolved = false; 35 | 36 | //Promise that retrive the near by tree data based on the location 37 | var searchNearTrees = function(center){ 38 | $scope.nearTrees = []; 39 | return $q.when(center).then(function(center){ 40 | Search.getNearTrees().get(center, function(results){ 41 | for(var i = 0, size = results.length; i < size; i = i + 1){ 42 | var tmp = {}; 43 | tmp.id = i; 44 | tmp.coords = {latitude: results[i].latitude, longitude: results[i].longitude}; 45 | tmp.options = { draggable: false }; 46 | if(tmp.coords.latitude === center.latitude && tmp.coords.longitude === center.longitude){ 47 | tmp.options = { animation: 1, draggable: false }; 48 | } 49 | $scope.nearTrees.push(tmp); 50 | } 51 | }); 52 | }); 53 | }; 54 | /** 55 | * Promise assign the latitude and longitude to the $scope, $scope.resolved is used for the ng-if. 56 | * @param data 57 | * @returns {*} 58 | */ 59 | var onLoad = function(data){ 60 | return $q.when(data).then(function(data){ 61 | var mapCenter = { 62 | latitude: data.latitude, 63 | longitude: data.longitude 64 | }; 65 | $scope.map = {center: mapCenter, zoom: 20 }; 66 | searchNearTrees(mapCenter).then(function(){ 67 | // console.log('Get the near trees and markers'); 68 | 69 | //Changed to resolve once all data are loaded 70 | $scope.resolved = true; 71 | }); 72 | }); 73 | }; 74 | 75 | //Load the tree 76 | TreeData.getTree().$promise.then(function(tree){ 77 | onLoad(tree); 78 | }); 79 | } 80 | ]); 81 | -------------------------------------------------------------------------------- /packages/articles/public/services/search.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /* 3 | Factory that handle the address search in the list.html 4 | */ 5 | angular.module('mean.articles') 6 | /* 7 | Factory that handle the search in the list.html 8 | */ 9 | .factory('Search', ['$resource', '$q', 'uiGmapGoogleMapApi', 10 | /** 11 | * 12 | * @param $resource 13 | * @param $q 14 | * @param uiGmapGoogleMapApi 15 | * @returns {{getLocation: Function, getNearTrees: Function, getByName: Function}} 16 | */ 17 | function($resource, $q, uiGmapGoogleMapApi) { 18 | /** 19 | * Take the address as params and return the location(lat, lng) 20 | * should remember check the validation of the input somewhere 21 | * @param target 22 | * @returns {*} 23 | */ 24 | var getLocation = function(target) { 25 | console.log('get Location async'); 26 | //this function need to be an async, so &q is used 27 | return $q(function(resolve, reject) { 28 | uiGmapGoogleMapApi.then(function(maps) { 29 | var geocoder = new maps.Geocoder(); 30 | var request = {address: target}; 31 | geocoder.geocode(request, function(results, status) { 32 | // location is found 33 | console.log(results); 34 | if (status === maps.GeocoderStatus.OK) { 35 | var location = results[0].geometry.location; 36 | resolve(location); 37 | } else { 38 | console.log('No Valid Address Found: ' + status); 39 | reject(status); 40 | } 41 | }); 42 | }); 43 | }); 44 | }; 45 | 46 | /** 47 | * Get the nearby trees using the service 48 | * @param queryObj 49 | * @returns {*} 50 | */ 51 | var getNearTrees = function(queryObj) { 52 | return $resource('/searchbyloc', {lat: '@latitude', lng: '@longitude'}, 53 | { 54 | get: { 55 | method: 'GET', 56 | isArray: true 57 | } 58 | }); 59 | }; 60 | 61 | /** 62 | * Get the trees using the service through the name, id or species 63 | * search should support both clear and vague string 64 | * @param queryObj 65 | * @returns {*} 66 | */ 67 | var getByName = function(queryObj) { 68 | return $resource('/searchbyname/:search', {search: '@search'}, 69 | { 70 | get: { 71 | method: 'GET', 72 | isArray: true 73 | } 74 | }); 75 | }; 76 | 77 | return { 78 | getLocation: getLocation, 79 | getNearTrees: getNearTrees, 80 | getByName: getByName 81 | }; 82 | } 83 | ]); 84 | -------------------------------------------------------------------------------- /packages/users/public/services/meanUser.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mean.users') 4 | 5 | .factory('MeanUser', [ 6 | 7 | function() { 8 | return { 9 | name: 'users' 10 | }; 11 | } 12 | ]) 13 | 14 | // Factory to retrieve tree images 15 | .factory('TreeImage', ['$http', 16 | function($http, $stateParams) { 17 | var imageStore = {}; 18 | 19 | var loadTreeImage = function(treeId, cb) { 20 | if (imageStore[treeId]){ 21 | cb(imageStore[treeId]); 22 | } else { 23 | $http.get('/treeimage/'+treeId) 24 | .success(function(url){ 25 | imageStore[treeId] = url; 26 | cb(url); 27 | }) 28 | .error(function(){ 29 | console.log('Error getting tree image URL'); 30 | }); 31 | } 32 | }; 33 | 34 | 35 | return { 36 | loadTreeImage: loadTreeImage, 37 | }; 38 | } 39 | ]) 40 | 41 | .factory('UserLikes', ['$http', 42 | function($http) { 43 | 44 | var getLikes = function(username, cb){ 45 | var treeLikes = []; 46 | $http.post('/userlikes', {username: username}) 47 | .success(function(data){ 48 | data.forEach(function(treeLike){ 49 | console.log(treeLike); 50 | if (treeLikes.indexOf(treeLike.name) === -1){ 51 | treeLikes.push({ 52 | name: treeLike.name, 53 | id: treeLike.treeid, 54 | imgUrl: treeLike.url 55 | }); 56 | } 57 | }); 58 | cb(treeLikes); 59 | }) 60 | .error(function(error){ 61 | console.log('error getting userlikes'); 62 | }); 63 | }; 64 | 65 | 66 | return { 67 | getLikes: getLikes, 68 | }; 69 | } 70 | ]) 71 | 72 | /** 73 | * GetUserMessages factory to handle the routing to the server for getting user messages 74 | */ 75 | .factory('GetUserMessages', ['$resource', '$stateParams', 76 | function($resource, $stateParams) { 77 | return $resource('usermessages/:username', { 78 | treeid: '@_username' 79 | }, { 80 | get: { 81 | method: 'GET', 82 | isArray: true 83 | } 84 | }); 85 | } 86 | ]) 87 | 88 | .factory('UserInfo', ['$http', 89 | function($http) { 90 | var get = function (username) { 91 | return $http({ 92 | url: '/users/' + username, 93 | method: 'GET' 94 | }); 95 | }; 96 | 97 | var post = function (username, status) { 98 | return $http({ 99 | url: '/users/' + username + '/status/', 100 | method:'POST', 101 | data: {status: status} 102 | }); 103 | }; 104 | 105 | return { 106 | get: get, 107 | post: post 108 | }; 109 | } 110 | ]); 111 | 112 | -------------------------------------------------------------------------------- /packages/articles/public/assets/css/articles.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | text-align: center 3 | } 4 | ul.articles li:not(:last-child) { 5 | border-bottom: 1px solid #ccc 6 | } 7 | 8 | .listitem{ 9 | border: 2px black solid; 10 | border-radius: 15px; 11 | } 12 | 13 | .angular-google-map-container { 14 | position: absolute; 15 | top: 0; 16 | bottom: 0; 17 | right: 0; 18 | left: 0; 19 | } 20 | 21 | .tree-in-treeview { 22 | width:115px; 23 | height: 115px; 24 | overflow:hidden; 25 | float: right; 26 | } 27 | 28 | .tree-thumb-listview { 29 | width: 100%; 30 | } 31 | 32 | .tree-row-listview { 33 | margin: 0 0 10px 0; 34 | } 35 | 36 | .species { font-size: 1.2em; } 37 | 38 | .profile-image-div { 39 | width: 300px; 40 | height: 225px; 41 | overflow: hidden; 42 | } 43 | 44 | .profile-tree-image { 45 | width: 100%; 46 | height: auto; 47 | } 48 | 49 | .profile-user-image { 50 | width: 100%; 51 | height: auto; 52 | } 53 | 54 | .navbar-inverse { 55 | /* fallback */ 56 | background-color: #9EBD2E; 57 | background: url(images/linear_bg_2.png); 58 | background-repeat: repeat-x; 59 | 60 | /* Safari 4-5, Chrome 1-9 */ 61 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#9EBD2E), to(#83857A)); 62 | 63 | /* Safari 5.1, Chrome 10+ */ 64 | background: -webkit-linear-gradient(top, #9EBD2E, #83857A); 65 | 66 | /* Firefox 3.6+ */ 67 | background: -moz-linear-gradient(top, #9EBD2E, #83857A); 68 | 69 | /* IE 10 */ 70 | background: -ms-linear-gradient(top, #9EBD2E, #83857A); 71 | 72 | /* Opera 11.10+ */ 73 | background: -o-linear-gradient(top, #9EBD2E, #83857A); 74 | } 75 | 76 | .navbar-inverse .navbar-brand, .navbar-inverse .navbar-nav > li > a { 77 | color: #fff; 78 | text-shadow: 1px 1px 2px rgba(150, 150, 150, 0.8); 79 | } 80 | 81 | .message-button { 82 | float:right; 83 | } 84 | 85 | .textarea-holder { 86 | width: 805px; 87 | } 88 | 89 | .thumb-container { height: 100%; } 90 | 91 | .well-user { 92 | min-height: 20px; 93 | padding: 0 19px 19px 19px; 94 | margin-bottom: 20px; 95 | margin-top: 10px; 96 | background-color: #f5f5f5; 97 | border: 1px solid #e3e3e3; 98 | border-radius: 4px; 99 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); 100 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); 101 | } 102 | 103 | .profile-link { 104 | color: #fff; 105 | text-shadow: 1px 1px 2px rgba(150, 150, 150, 0.8); 106 | padding: 15px; 107 | height: 100%; 108 | } 109 | 110 | .profile-link:hover, .profile-link:active, .profile-link:visited, .profile-link:focus { 111 | color: #fff; 112 | background-color: transparent; 113 | text-decoration: none; 114 | } 115 | 116 | .no-top-margin { 117 | margin-top: 0; 118 | } 119 | 120 | .tree-name { 121 | display: inline-block; 122 | margin-right: 25px; 123 | } 124 | 125 | .tree-info { 126 | margin-bottom: 5px; 127 | } 128 | -------------------------------------------------------------------------------- /packages/users/public/views/register.html: -------------------------------------------------------------------------------- 1 |
4 | TreeBook
5 | Species: {{tree.qspecies}}
14 |Plotsize: {{tree.plotsize}}
15 |Date planted: {{tree.plantdate | date:'yyyy-MM-dd'}}
16 |Caretaker: {{tree.qcaretaker}}
17 | 18 |46 | When a user posts a message on the tree profile page - 47 | 'SubmitMessage' is invoked in packages/articles/public/controllers/MessagesController.js 48 | 'SubmitMessage' uses the the 'Messages' factory in packages/articles/public/services/articles.js 49 | A post request is submitted to /usermessages 50 | Express routes the request via packages/articles/server/routes/MessagesController.js to 'postMessagesFromUser' 51 | In packages/articles/server/controllers/articles.js 'postMessagesFromUser' inserts the message into the database 52 |53 | 54 | 55 | 56 | ## Environmental Vars 57 | Create a .profile bash script that exports the following variables 58 | ``` 59 | #!/bin/sh 60 | export TBSECRET="" #Secret Key for cookies 61 | export APPLICATIONID="" #ChatBot API 62 | export POSTGRES="" #SQL DB with tree data 63 | export AZURE_STORAGE_ACCOUNT="" #Storage for image uploads 64 | export AZURE_STORAGE_ACCESS_KEY="" #Storage for image uploads 65 | export TBPASS="" #Email for reset password 66 | export TBEMAIL="" #Email for reset password 67 | export NODE_ENV="DEVELOPMENT" #For local development only 68 | ``` 69 | 70 | 71 | ## License 72 | We believe that mean should be free and easy to integrate within your existing projects so we chose [The MIT License](http://opensource.org/licenses/MIT) 73 | 74 | ## ToDo 75 | - Refactor much of the code from 'articles' to 'trees' 76 | - Build admin functionality. Mean.io has the capabilities to set admin users already. 77 | - Implement tests. Although testing is currently implemented only very basic tests have been implemented. 78 | - Move certain logic out of 'articles' folder. This folder holds a lot of excess logic that ideally would be placed elsewhere. I.e. messages functionality moved to a new 'messages' folder. 79 | - Styling improvements. 80 | - Optimizations. Currently there are a significant number of angular watchers on each profile page that could potentially be removed. -------------------------------------------------------------------------------- /packages/articles/public/controllers/MessagesController.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mean.articles') 4 | 5 | 6 | /** 7 | * Handles sumbit message and get all messages on tree profile page 8 | */ 9 | .controller('MessagesController', ['$scope', 'Messages', 'Global', 'GetMessages', 'TreeData', '$stateParams', 'UserImage', '$timeout', 10 | /** 11 | * 12 | * @param $scope 13 | * @param Messages 14 | * @param Global 15 | * @param GetMessages 16 | * @param TreeData 17 | * @param $stateParams 18 | * @param UserImage 19 | * @param $timeout 20 | */ 21 | function($scope, Messages, Global, GetMessages, TreeData, $stateParams, UserImage, $timeout) { 22 | 23 | // $scope.global is necissary to get user information 24 | $scope.global = Global; 25 | // the TreeData factory handles the basic tree data. It is in the services folder. 26 | var treeMessages = []; 27 | 28 | /** 29 | * 30 | * @param url 31 | * @param name 32 | * @param treeId 33 | */ 34 | var setParams = function(url, name, treeId) { 35 | treeMessages.forEach(function(message) { 36 | message.imageUrl = url; 37 | message.username = name; 38 | message.redirect = '#!/trees/' + treeId; 39 | }); 40 | }; 41 | 42 | $scope.tree = TreeData.getTree(function(t) { 43 | console.log(t.name); 44 | setParams(t.imageurl, t.name, t.treeid); 45 | }); 46 | 47 | 48 | /** 49 | * Post message to database from single tree profile view 50 | */ 51 | $scope.submitMessage = function() { 52 | var message = $scope.inputMessage; 53 | var username = $scope.global.user.username; 54 | var treeid = $scope.tree.treeid; 55 | var body = { 56 | message: message, 57 | username: username, 58 | treeid: treeid 59 | }; 60 | 61 | // Messages is a factory that in services/articles.js 62 | Messages.save(body, function(data) { 63 | console.log(data[0]); 64 | var newMessage = data[0]; 65 | console.log(newMessage.createdat); 66 | //change date format for each message to readable format 67 | var date = new Date(newMessage.createdat); 68 | var options = { 69 | weekday: 'long', year: 'numeric', month: 'short', 70 | day: 'numeric', hour: '2-digit', minute: '2-digit' 71 | }; 72 | newMessage.createdat = date.toLocaleDateString('en-us', options); 73 | //async load new message to DOM. Loads to end of message list 74 | $scope.messages.push(newMessage); 75 | 76 | // UserImage is a factory in services/articles.js 77 | UserImage.loadUserImage(newMessage.username, function(url) { 78 | console.log(url, 'here'); 79 | newMessage.imageUrl = url; 80 | }); 81 | 82 | $scope.inputMessage = ''; 83 | }); 84 | }; 85 | 86 | /** 87 | * get All messages for a Tree and display on tree profile page 88 | */ 89 | $scope.getMessages = function() { 90 | // GetMessage is a factory in services/articles.js 91 | GetMessages.get({treeid: $stateParams.treeId}, function(messages) { 92 | $scope.messages = messages; 93 | $scope.messages.forEach(function(message) { 94 | message.redirect = '#!/user/' + message.username; 95 | // UserImage is a factory in services/articles.js 96 | // It is called for each message to get the url of the users picture 97 | UserImage.loadUserImage(message.username, function(url) { 98 | if (url.length === 0) { 99 | // This is a treemesage 100 | message.isTree = true; 101 | treeMessages.push(message); 102 | } else { 103 | message.isTree = false; // unused 104 | } 105 | message.imageUrl = url; 106 | }); 107 | }); 108 | }); 109 | }; 110 | 111 | }]); 112 | -------------------------------------------------------------------------------- /packages/users/public/views/userProfile.html: -------------------------------------------------------------------------------- 1 |
{{message.message}}
105 | 106 |