/IVA

Primary LanguageJavaScript

IVA - Front End System 🚘

OVERVIEW

The IVA is a front end system built on the MEAN stack as an interface to collect, analyze, and visualize vehicle data. Before installing the IVA consult the training section to be able to fully understand and work with the system.

FUNDAMENTAL TRAINING

1️⃣ Git

2️⃣ HTML/Javascript

  • These are the two fundamental tools that the MEAN stack builds upon. Make sure you have a good understanding of these before moving forward.

  • http://nodeschool.io/ (javascript)

MEAN STACK TRAINING

1️⃣ MongoDB

2️⃣ Express

3️⃣ AngularJs

4️⃣ NodeJs

  • Node allows us to use javascript outside of the browser
  • http://nodeschool.io/ is the best resource to learn the basics of Nodejs

5️⃣ MEAN.io vs. MEAN.js

EXTRA RESOURCES

1️⃣ Bower http://bower.io/

  • What is Bower? A package manager for the web.
  • Bower is included in the system.

2️⃣ Grunt http://gruntjs.com/

  • What is Grunt? A JavaScript Task Runner.

3️⃣ Jade http://jade-lang.com/

INSTALLATION GUIDE ON MAC

1️⃣ install WebstormIDE. https://www.jetbrains.com/webstorm/

2️⃣ install Github desktop version. https://desktop.github.com/

3️⃣ clone IVA directory to local folder or you can pull from within in webstorm, click install project from git: address is: https://github.com/JoeRaetano/IVA.

4️⃣ Install or Uninstall Nodejs

  1. First change teh owner of "/usr/local" with the following command: sudo chown -R $USER /usr/local

  2. Install latest version of XQuartz http://xquartz.macosforge.org/landing/

  3. install or update Xcode with command line tools

  • sudo chown -R $USER /usr/local and any other files/folders that homebrew complains about.
  1. in a terminal window run: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" if homebrew is already installed, "brew update" then "brew list" to show what you have installed, "brew info package", "brew uninstall package", "brew install package", "brew outdated", "brew upgrade", you may not want to upgrade a package such as mongodb so, "brew pin mongodb", later you can "brew unpin mongodb" finally run "brew doctor" to ensure your brew installs will go smoothly

Installing Node.js and NPM is pretty straightforward using Homebrew. Homebrew handles downloading, unpacking and installing Node and NPM on your system. The whole process (after you have XCode and Homebrew installed) should only take you a few minutes.

  1. Open the Terminal app and type "brew install node". Sit back and wait. Homebrew downloads some files and installs them. And that’s it. To make sure you have Node and NPM installed, run two simple commands to see what version of each is installed:

  2. To see if Node is installed, type node -v in Terminal. This should print the version number so you’ll see something like this v4.2.1

  3. To see if NPM is installed, type npm -v in Terminal. This should print the version number so you’ll see something like this 2.14.7

5️⃣ Install MongoDB

  1. follow these instructions: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/

  2. in a terminal window type "brew update", "brew install mongodb", or "brew upgrade mongodb"

  3. To have launchd start mongodb at login: ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

  4. Then to load mongodb now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

  5. Or, if you don't want/need launchctl, you can just run: mongod --config /usr/local/etc/mongod.conf

  6. Once you have Mongo installed, create a data folder next to the IVA folder, run mongod --dbpath ../data

6️⃣ Install Robomongo to manage your MongoDB http://robomongo.org/ connect to the mongo db that you just started to ensure it's running

7️⃣ Install bower

  1. npm install -g bower
  2. bower update

you may need to place the below code into the .bowerrc file

{ "directory": "app/bower_components", "proxy": "http://PROXYSERVER:PORT", "https-proxy": "https://PROXYSERVER:PORT", "strict-ssl": false }

8️⃣ Install grunt

  1. npm install -g grunt
  2. npm install -g grunt-cli

9️⃣

Update all things! npm install npm-check-updates -g ncu ncu -u

run 'npm test' in the IVA directory to determine issues

Setup/Learning Notes

:bowtie: UTK students go to: https://oit.utk.edu/Training/online-training/lynda/Pages/default.aspx for free training. Search and complete Lynda training for (MongoDB, Expressjs, Angularjs, Nodejs (MEAN Stack)), Git, GitHub, Webprogramming HTML5, CSS, javascript.

1️⃣ GitHub https://github.com/

2️⃣ Webstorm IDE https://www.jetbrains.com/webstorm/

  • What is Webstorm? WebStorm is a lightweight yet powerful IDE, perfectly equipped for complex client-side development and server-side development with Node.js.
  • Install updated IDEA (webstorm) editor (free for students)
  • Learn Webstorm

3️⃣ Nodejs https://nodejs.org

  • What is Nodejs? Node.js® is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
  • Install nodejs

4️⃣ Node Package Manager (NPM) allows you to install/update all node packages comes installed with nodejs automatically - Learn about npm - https://www.npmjs.com/ - update node (if you already have node installed) - cd into IVA - sudo npm cache clean -f - sudo npm install -g n - sudo n stable - node -v (0.12.2) - update package dependencies (or install if needed) - sudo npm update -g

5️⃣ MongoDB -Download and extract mongo

  • cd ~/Downloads/mongodb-osx-x86_64-2.6.6/bin/
  • start mongo daemon
    • ./mongod --dbpath=../data

6️⃣ Bower

  • Ensure you have bower installed
    • sudo npm install -g bower
  • update bower packages
    • bower update
  • (NOTICE: On Mac) When you execute the install command bower will ask you to install a version of the package angular. There were 4 different versions to choose from. Choose the second version offered, angular#1.4.0.

7️⃣ Grunt

  • Ensure you have grunt installed

8️⃣ Bower http://bower.io/

  • What is Bower? A package manager for the web.
    • Ensure you have bower installed
      • sudo npm install -g bower
      • (NOTICE: On Mac) When you execute the above command bower will ask you to install a version of the package angular. There were 4 different versions to choose from. Choose the second version offered, angular#1.4.0.
    • update bower packages
      • bower update

9️⃣ MongoDB https://www.mongodb.org/

  • What is MongoDB? MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling.
  • Download and extract mongo
    • cd ~/Downloads/mongodb-osx-x86_64-2.6.6/bin/
    • start mongo daemon
      • ./mongod --dbpath=../data
  • Learn MongoDB
  • Download and run Robomongo http://robomongo.org/

1️⃣ 0️⃣ Grunt http://gruntjs.com/

  • What is Grunt? A JavaScript Task Runner.

    • Ensure you have grunt installed
      • sudo npm install -g grunt-cli
  • cd into IVA Repo

    • run grunt by running "grunt serve"
    • additionally, make sure MongoDB is running along side Grunt
    • you should see grunt script running
    • check your web browser

1️⃣ 1️⃣ Admin

Admin

  • ensure you have a gravatar account (gravatar.com)
    • modify /server/config/seed.js (bottom) to add a dev/test acct as needed (match email used for gravatar)
    • Value found in cloning https://github.com/almasaeed2010/AdminLTE and browsing locally / leveraging code
  • node/site
  • site template
  • core authentication (local only)
  • Account Management (user-level)
    • change password
    • update profile (i.e. title, first name, last name)
  • Account Management (admin-level)
    • List, create, update, delete
    • update: set password, change first name, last name, title, email)
    • assign to role/roles
  • Groups/Roles
    • create / list / update / delete
    • add / remove users from roles