Challenge Overview

Trixel Challenge series

The Trixel challenge series will be a multi-part series of challenges that will eventually produce an application for tracking a users internet usage across a set of sites where trixel components exist. There are several different pieces of this application that will be developed in parallel then combined in future challenges.

Overview:

In this challenge we want to build an analytics API that will handle several GET requests for data related to users visiting websites. The Analytics API will be developed using the following AWS services: AWS Lambda(Node.js), Amazon DynamoDB, and Amazon API Gateway. Using these services we will provide a REST API for retrieving data from DynamoDB.

Scope:

  • You will configure an Amazon API Gateway with several GET methods that invokes a node.js AWS lambda endpoint. The lambda functions will retrieve the requested data from dynamoDB and return it.
  • The data stored in the db should have the following fields:
Visit Object
{
  "id": #,
  "userId": "IfAUserIdIsKnownItGoesHere",
  "cookieId": "uniqueCookieId",
  “url”: “http://whatdomain.com”,
  "viewed_at": "DateSiteWasVisited" 
}

Note that the userId is nullable. All other fields are required. You must seed your database with data that can exercise your services.

  • The response should be of type 'application/json'. It will return a list of the visit items specified above.
  • Endpoints required:
    • GET /visits: returns a summary list of visits with at minimum the fields: UserID, cookieId, firstVisitDate, LastVisitDate, Number of visits. It will group first by UserID, then by cookieId
    • GET /visits/{ID} Returns a particular visit by id. VisitObject
    • GET /visits/user/{userId} returns all visits for a particular user {visits: []}
    • GET /visits/cookie/{cookieId} returns all visits for a particular user {visits: []}
    • GET /visits/site returns summary for all visits for a particular url {sites: [{url: 'https://test.com', count: #]}, ...}
    • GET /visits/site/{url} returns all visits for a particular site. {visits: []}

REQUIREMENTS

  • Your submission should include a detailed README with instructions for configuring and deploying your code for the AWS services.
  • Add your lambda code to the repository in the src directory.
  • Your javascript should be well documented including function level descriptions.
  • Your javascript should follow standard best practices and be able to pass a jshint lint test (default configuration).

SETUP & REFERENCE:

Questions

  • Please post any questions or concerns you have to the forum. They will be addressed in a timely manner.

 



Final Submission Guidelines

SUBMISSION:

  • Upload documentation for how to run your submission
  • Include an example project or document that shows the output form the Analytic API.
  • Upload all your source code as a zip
  • Add lazybaer and gbockus as members of your forked repository
  • Provide a video overview of your submission. Please describe what you did in the video.
  • Winner will be required to submit a merge request on gitlab against the branch specified!

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30052908