developers manual - oronsa/shoulder2shoulder GitHub Wiki

#Developers Manual

##Source code View source code - Developed in MEAN Stack.

##License All the source code is publicly open via Git-Hub, under the authority of the [Azrieli, Jerusalem College of Engineering] (http://www.jce.ac.il/)

##Project code work flow The code is managed on 'GitHub'

Server side

Files Included:

  1. bin/www - database configuration and server's port setting up.

  2. app.js - all the application required libraries needed during run-time, including setting up the HTTP server

  3. routes/

  • authentication.js - routing functions for the authentication functionality.
  • database.js - general routing simple database operations functions.
  • session.js - setting up the user's session routing and functionality, with a verification for each action in the app.
  1. utils/
  • mongoUtils.js - general database functionality.
  • email.js - handling email sending
  • authUtils.js - authentication functionality with consideration of the current user's requests by his role
  • clientUtils.js - responses to the sender
  1. Miscellaneous
  • config.json - environment variables:
    1 - COLLECTIONS - naming our objects in the database.
    2 - ROLES - defining users roles and hierarchy.
    3 - APP_ETRIES - first page after the session is created, for each user.
    4 - PATHS - defining the paths for the app regarding users roles.
  • package.json - Node.js script and app dependencies.

User Roles & Hierarchy

1 - guest
2 - admin
3 - superAdmin

Compilation & Running

  • Make sure MongoDB server is running
  • Use npm start to start the server

Client side

Files Included:

  1. index.html - the application entry page

  2. js/app.js - UI providers, app constants, and 'run' function which is responsible for the entire app input validation and user's sessions client-side security (find documentation within).

  3. js/utils/

  • date.js - moment object handling functions
  • drawing.js - functions that will draw the pies and doughnuts over the canvas
  • filter.js - filtering generic lists by generic properties
  • validate.js - input validation tools
  1. js/ & modules/user/ & modules/admin
  • controllers/ - folders that contains the pages functionality files
  • directives/ - folders that contains the the directives displayed in the main view as the navigation bars;
    each user is authenticated on every page which will present the correct navigation bar by the user's role
  • routes/ - folders that contain the application states/pages presented to the user; each state is resolved by the user's authentication server side verification.
  • templates/ - folders that contains the html code files
  • services/ - folders that contains the functions which sends and resolves the promises to and from the server side

Bugs

For bugs you can open an issue through Issues board

⚠️ **GitHub.com Fallback** ⚠️