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.
In this challenge we want to build asimple web application that allows a user to manage their domains in SAM.
Competition Task Overview
You will address the following in this challenge :
- Use Express.js web framework with simple responsive UI using bootstrap framework. Boostrap allows you to build simple responsive UI without much efforts, we are targeting both mobile and desktop versions for the web app.
- The application will be separated from SAM API code base and will be deployed independently.
- The UI should be simple and contains the following :
- Landing page :
- Contains a welcome banner and message.
- Button to login.
- Dashboard page :
- Welcome message with basic instructions (make these placeholders for now)
- A "generate domain" form with two text boxes and submit button :
- Text boxes are "domain name" and "mashery api key"
- Button to submit the form via ajax call.
- If the operation is successful, then form should be replaced with "Your domain has been created, ID = #{domain.id}. Click here to explore (link to io-docs documentation, should be configruable)".
- A domains listing table :
- It can includes "domain Id", "domain name", "roles" (comma seperate)
- Common Sections :
- Header - contains logo placeholder and logout button
- Footer - Simple copyright statement
- Landing page :
- The web application will provide the following functionality :
- Login to SAM : The web app will allow users to login to SAM via Salesforce or Google.
- The app will display a login button, it will take user through the OAuth 2.0 Authorization Code Grant flow provided by SAM application.
- Since OAuth flow requires a domain ID, we will use a generic predefined domain for that purpose only. The domain ID should be configurable (via heroku env variables).
- Once users login (including First Time users) they will be able to view their own domains and generate new domains.
- The exchange of access token should be done via backend. Secret key should not be stored or exposed in the client side of the web application.
- The app will display a login button, it will take user through the OAuth 2.0 Authorization Code Grant flow provided by SAM application.
- Domains Listing : The user will be able to see all the domains to which they belong (for which their account has an associated domainAccount) to including the role(s) they have for each domain.
- Use "GET /me/domains" endpoint by SAM API to get the list
- You can find the API call and how to test this endpoint by importing the postman.json provided in the SAM API application code base to Postman - Rest client application.
- Generating domains : The user can also generate new domains and have their account set with the 'admin' role for this new domain.
- Use "POST /manage/generateDomain" endpoint by SAM API to generate the domain. The input to this endpoint is "name" and mashery "apiKey"
- You can find the API call and how to test this endpoint by importing the postman.json provided in the SAM API application code base to Postman - Rest client application.
- Login to SAM : The web app will allow users to login to SAM via Salesforce or Google.
- Application should run on Heroku
- Provide a readme file for details about deploying the application, configuring it, and testing locally or in Heroku.
Folder Structure
- root
- .env_sample (this will be a sample of .env file)
- app.js
- models
- views
- controllers
- public
- css
- js
- i
- .gitignore
- config/ folder
- READ.me
- anything else needed.
Technology Overview
- NodeJS
- Express.JS
- CoffeeScript
- PostgreSQL
- AJAX
- HTML
- CSS
- Bootstrap
- Heroku
Documentation Provided
Brivo Labs API Code Base provided in forums.
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.