Challenge Overview

Welcome to the IBM Castle Strongloop Messaging API contest with CouchDB. IBM is building a versatile, extensible Mail and Calendaring interface on top of their existing infrastructure.  As part of this contest, you will make use of Strongloop’s Loopback Framework to create an API server and expose multiple API endpoints.  These endpoints will be used by an Angular application and native mobile clients to be built in subsequent challenges.

 

This challenge is part of the *IBM Castle* Challenge Series.  Competitors who win challenges in this series will compete in a leaderboard of points for additional prizes. We have lots of contests coming in this series so it is best that you participate early and frequently.

 

Project Overview

This project is the foundation for a complex, enterprise email, calendaring, and messaging system.  We will be building a robust REST API to allow multiple frontend clients to connect to many different services, including multiple mail server backends.

 

Contest Overview

We ran a contest earlier where we interfaced with a Proxy API and built the endpoints to login and create a message. For this contest, we would like you to use CouchDB and mock the Proxy API calls.

 

We will share the following with you:

  1. A document describing the different models you need to create

  2. A document describing the different endpoints in scope for the current contest

  3. The code base

 

Note that the code base contains implementations for the endpoints /login and /messages. However, these interact with a third party proxy API that we would like you to remove completely. You will need to now interact with a database and for this, you can use loopback-connector-couch and follow the official documentation on the topic.

 

Points to Note

  1. There is no login for the app. You can simply expose the endpoints directly

  2. Remove the existing /login and /messages endpoints and other references to the same, including any tests.

  3. You need to create Unit Tests for the application. No POSTMAN files allowed.

  4. You need to provide a Test Data generator script for the application. See the models defined in the document to decide on the type of data to generate. The test data needs to be directly stored in CouchDB which will be subsequently used during testing of your submission.

  5. As part of the mock API, you don’t have to actually send email messages. However, you do need to fake sending in emails where the “to” attribute is an email id generated using your test data generator -  in which case, simply create a copy of the sent message and update its associated type and profile_id before storing it again in the database. In case the “to” attribute is an email that does not exist in the system, simply return a success message (if the message creation was indeed successful).

 

Additionally, note the following too:

  1. You need to use AirBnb’s ESLinter for both javascript code style and checks. This already exists in the existing code base. Make sure that you verify that your submission is free from any warnings and errors.

  2. Your solution should compulsorily use Strongloop’s Loopback framework.


Final Submission Guidelines

Kindly make sure that before uploading your submission, it:

  1. Meets the specification documents shared

  2. Passes all the lint checks using the ESLint rules that we mentioned

  3. Includes Unit Tests. POSTMAN extension based imports are NOT allowed

  4. Implements all the endpoints requested


Once you are ready, create a .zip file of the submission and upload this through the Submit and Review tool for this contest.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30053367