Challenge Overview

Project Overview

BrivoLabs has a beta version of a node.js/coffeescript application that is called Social Access Management (SAM) API. It uses postgres database, runs on heroku, consists of both a web and a worker process, and uses a redis-based message queue to communicate between them.

We have a web dashboard that allows a user to manage their domains in SAM. In this challenge we are adding the ability to manage aspects of an individual domain, specifically user roles and access reservations.

Competition Task Overview

You will address the following in this challenge :

  • Update 'Domain management' landinag page (/dashboard page) to have the following changes :
    • For each domain in the list, add a “manage” button that will trigger the following flow : 
      • Clicking on the button will negotiate a new OAuth token for that domain
        • Note : check how we are doing it for Login in the landing page, you will do the same thing here.
      • After the user agrees to authorize the OAuth access, navigate to back to the 'domain management' landing page
      • The page should display the name of the Domain, and the current user’s roles
        • Note : the page already implemented this logic.
      • If the user has “admin” role then display two buttons to the management features : “Manage Users” and “Download Activity Log” (that should be a new column in the domain table with two buttons), "Manage Users" will take user to new page.
        • Note : You can check use role by calling /me/domains endpoint
  • “Manage Users” page - this is a new page that has the following :
    • It includes a table that lists all users (domain accounts), including the values: account.username, account.firstName, account.lastName, and a comma-delimited list of their roles.
      • Note : You can use  "GET /domainAccounts" to get these information for all users under that domain
    • The table should be sortable by each column (using a standard javascript sortable table module)
    • The user list should also allow roles to be added and removed. This should open up a popup or page to assign/deassign roles.
      • Note : endpoints to add/remove roles are "POST /domainAccount/{:id}/role" and "DELETE /domainAccount/{:id}/role", respectively.
    • The table should also include a “manage access” button for each user/row.  Clicking this will open a separate page (create new page 'Manage User Access' ):
      • The page has table of all active (or future) Access Reservations for that user
        • For each Access Reservation, display the list of the door(s) (Access Targets : name) and the list of schedule(s) (Start and End dates)
        • Note : Use /domainAccount/:id/accessReservations/now for each user
      • Add button to allow an Access Reservation to be created. This should open up a popup or page, it should also allow the user to choose one or more Access Targets (based on a pre-populated list, by name), and define one or more schedules.
        • Note : to create use "POST /accessReservations", to update use "PUT /accessReservations", to retrieve ATs list "GET /site/:id/accessTargets", to add/remove schedules "POST /accessReservation/:id/schedules" "DELETE /accessReservation/:id/schedule/:id", respecitvely.
      • Add button in each row to allow an Access Reservation to be deleted.
        • Note : endpoint to delete is "DELETE /accessReservation/:id"
  • “Download Activity Log” should open a modal dialog box which allow start/stop dates to be input (defaulting to null, which leaves it up to SAM) which will send the resultant CSV file to the browser for download.
    • Note : endpoint to be used is "GET /events/report"
  • Application should run on Heroku.
  • Update readme file for details about deploying the application, configuring it, and testing locally or in Heroku.

General Notes

  • Use Angular.js Framework to build the pages, you also need to update "Domain Management" landinag page to be based on Angular.js.
  • You will keep using Boostrap. The pages MUST be updated to be reponsive, it should work in the 4 grid systems supported by boostrap 3.2.0 http://getbootstrap.com/css/#grid
  • Use date picker for date fields (i.e. schedule start/end date, or event report dates) http://www.eyecon.ro/bootstrap-datepicker/?utm_source=twitterfeed&utm_medium=twitter
  • Some API orchestration may be done server-side (such as creating an Access Reservation which requires multiple SAM API calls).

Development Environment

You are provided with Brivo Labs SAM API source code, you can set it up locally following the readme file included in the source code folder. If you don't want to set up SAM API you can use the following Heroku setup :

  • The API deployed to : http://brivolabs-sam-cs.herokuapp.com
  • The domain id, client id and client secret will be provided in challenge forums. You will use them to login using the provided domain id.
    • You must use the dashboard app itself to generate your own domain in -cs, for testing (which will give you 'admin' role)
  • You can access iodocs-cs heroku app to see the latest API docs, and do test calls : http://brivolabs-iodocs-cs.herokuapp.com/

Documentation Provided

Brivo Labs API Code Base and Brivo Labs Web Dashboad are provided in forums.

You can also refer to Brivo Labs Mashery portal at the "getting started" guide developer.brivolabs.com/docs



Final Submission Guidelines

 

Submission Deliverables

Below is an overview of the deliverables:

  • Fully Implemented Express.js web application of the outlied requirements above.
  • A complete and detailed deployment documented explaining how to deploy the application including configuration information.

Final Submission

For each member, the final submission should be uploaded to the Online Review Tool.

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30044496