Challenge Overview

1.    Project Overview

1.1    System Description

The client for this project has decided to build a platform that will support the sale, exchange, and redemption of gift cards between businesses and individuals.  The goal of this platform is to help small businesses expand, using both web and mobile layouts, by giving them a simple way to raise capital and acquire new customers using gift cards.

The client needs to create a high quality platform that is easy-to-use even for business owners that don’t have a lot of technical expertise.  Many business owners are not technologically sophisticated, so creating a platform that is simple to understand and navigate is also a top priority.

The main function of the platform will be to allow business to post virtual gift cards for sale on the platform.  Individual users will be able to browse and buy these gift cards, as well as resell or trade gift cards they own.  Using the mobile layout, users will be able to redeem their gift cards at the business, and the business will be able to process gift card redemption at their point of sale.

This assembly is responsible for implementing misc functionalities of the front end desktop application, including HTML5 pages, AngularJS controllers and Wordpress pages.

 

1.2    Competition Task Overview

A complete list of deliverables can be found in the TopCoder Assembly competition Tutorial at:

http://apps.topcoder.com/wiki/display/tc/Assembly+Competition+Tutorials

Note: Please read the whole Application Design Specification first. All the details not mentioned in this specification are provided in that document.

Time constraint
This project has tight time line so
1) the review phase is only 24 hours; it may be extended in reviewers' requests if there are 3+ submissions
2) we would like to avoid any timeline extension, please ask questions early

 

1.2.1    Scope

This assembly is responsible for the following parts in the Front End Desktop Class Diagram:

  • HistoryCtrl
  • ProfileCtrl
  • FeedbackCtrl
  • PaymentCtrl
  • BusinessEmployeesCtrl
  • FoundersStatusCtrl
  • ShoppingCartCtrl
  • ReportAbuseCtrl

 

Implementation details are provided at TCUML class documentations.

Related pages are also in scope.

Wordpress pages should be prepared.

Angular services required by these controllers must be implemented as well (please note some of them are already there in the codebase: don't duplicate them).

The strike through text (e.g. in 1.2.7) is out of scope.

 

 

1.2.2    partials/history.html

Wireframe: Champion / “My History” tab, “Founder” / “My History” tab, PlatformEmployee / “My History” tab

Controller: HistoryCtrl

This page shows user history data. Simply show history data of $scope.actions.

1.2.3    partials/profile.html

Wireframe: Champion / “My Info” tab, “Founder” / “My Info” tab, PlatformEmployee / “My Info” tab

Controller: ProfileCtrl

This page manages user profile. When user is founder role, it can also manage its business. The “Save” button will call the save function of the controller.

Note that when user is of founder role, its business’ additional telephone, isTelephonePublic should also be managed.

When resetting password, it will call the resetPassword function.

Some tweaks:

  - for the Champion user page (Champion_MyInfo), the "ACCOUNT PAYMENT INFO" is out of scope

  - update column titles of table to be: "Type of Activity", "Date of Activity", "Amount" (duplicate "My History" page from business owner)

 

1.2.4    partials/feedback.html

Wireframe: ProvideFeedback

Controller: FeedbackCtrl

This page sends feedback to admin.

The “Send” button will trigger the send function of the controller.

 

1.2.5    partials/payment.html

Wireframe: Payment

Controller: PaymentCtrl

This page handles payment for either business or shopping cart. The “Pay” button will trigger the pay function of the controller.

The Year dropdown values should include [current-year, current-year + 15], and it can allow the user to directly enter the year value in the input.

1.2.6    partials/businessEmployees.html

Wireframe: Founder / “Employees” tab, PlatformEmployee / “Employees” tab

Controller: BusinessEmployeesCtrl

This page manages business employess.

Adding an employee triggers the add function.

Saving an employee triggers the update(id) function.

Deleting an employee triggers the delete(id) function.

1.2.7    partials/foundersStatus.html

Wireframe: PlatformEmployee / “Founders Status” tab

Controller: FoundersStatusCtrl

This page shows founders status. The page is rendered using the $scope.founders, businesses, step1, step2, step3 values.

When showing/searching activities of a founder, the showActivity is called. Then the founder activity chart is shown with data of $scope.actionRecords.

The chart is shown as line chart using NVD3 (http://nvd3.org/), this is example line chart usage: http://nvd3.org/examples/line.html

For all the action records, group them by date, the date is used as x-axis values, and the counts of records in the groups are used as y-axis values.

 

1.2.8    partials/shoppingCart.html

Wireframe: ShoppingCart

Controller: ShoppingCartCtrl

This page manages shopping cart.

It renders the page using $rootScope.shoppingCart.

When deleting an item, calls the deleteItem function.

1.2.9    partials/reportAbuse.html

Wireframe: ReportAbuse

Controller: ReportAbuseCtrl

This page sends abuse report to admin. The “Send” button will trigger the send function of the controller.

1.2.10    Wordpress Pages

After installing Wordpress, login as admin, then post articles to be used by this application. When posting articles, Permalinks (http://codex.wordpress.org/Using_Permalinks) should be used, so that static URLs should be generated for the articles. Then this application will use these URLs to point to these Wordpress managed pages.

Another appoach is ngInclude directive. Articles and blogs will be created using Wordpress site, and the wordpress generated pages will be included in the AngularJS based frontend using ngInclude directive.

Wordpress pages should be prepared for the following desktop wireframe pages:

VerifyPDFForm

FAQ

Blog

AboutUs

HowItWorks

PrivacyPolicy

TermsAndConditions

CopyRight

 

This assembly should also prepare Wordpress pages for the mobile application.  Wordpress pages should be prepared for the following mobile wireframe pages:

Privacy

Terms

PrivacyB

TermsB

TermsNoLogged

 

 

1.3. Services instructions

Angular services required by thes controllers must be implemented as well (please note some of them are already there in the codebase: don't duplicate them).

1.3.1. General Implementation Guide

The services are AngularJS services, they use $http service to communicate with the back end REST services.

During this assembly, a simple basic app.js may be implemented to run and test the services.

 

Some services require authorization, they expect a session token set in sessionStorage.sessionToken field, if not, they will call callback with error message.

 

Below we take the UserService.updateMyUserProfile as example, other services are implemented similarly.

 

angular.module('services').factory('userService',

    ['$http', '$log',

    function ($http, $log) {

        var service = {};

        service.updateMyUserProfile = function(user, callback) {

            $http({

                // it may be 'GET', 'DELETE' etc for other REST services

                method:'PUT',

                // replace this url for other REST services

                url: config.REST_SERVICE_BASE_URL + '/users/me',

                // request body may be different for other REST services

                data: JSON.stringify(user),

                // authorization header depends on REST service,

                // some needn't it,

                // some needs other authorization header, e.g. the Login

                headers: {

                    'Authorization': 'Bearer' + sessionStorage.sessionToken

                }

            }).success(function(data){

                callback(null, data);

            }).error(function(data, status, headers, config) {

                callback(data);

            });

        }

 

        ... // other functions

 

        return service;

}]);

1.3.2    Services Mapping

When implementing an AngularJS service method, see its TCUML method documentation, it provides the corresponding REST service.

Then open the REST_API_Specification.docx, locate the referred REST service. In the “Request à Syntax” section, there is HTTP method and URL for the REST service. The “Request à Request Headers” item contains authorization header details. And the Response section contains response details.

For the red methods in TCUML, these indicate new REST services, the details are just in the TCUML method documentation.

Assemblers should follow these REST contract, and follow above sample code to make the REST calls.

 

 

1.4    Technology overview

1.5    Existing Documents

  • Class Diagrams
  • Sequence Diagrams
  • Application Design Specification
  • Assembly Specification

1.6    Support period

90 days of support

 

1.7    Technical requirements

1. There must be input validation in front-end methods. There must be consistency of data type and length (e.g. strings must be limited to 1024 chars, except for rich text fields which may be up to 16K). For "range" field the range start must not be greater than the range end. Most of business parameters must be non-negative.

2. Unit tests + code coverage for the existing code as per TC standards.

3. Code must be documented as per TopCoder standards and the provided architecture

 

1.8    Testing

The submission should provide one path for desktop and another path for mobile.

Please provide enough test data for the Pages Scrolling (It will loads more data when user scroll down to the end of current view) where it is applicable.



Final Submission Guidelines

As per the TC software assembly standards:

- Working codebase

- Deployment guide

ELIGIBLE EVENTS:

2015 topcoder Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30049606