Challenge Overview

Project Overview

NASA need to develop a software version of the Solution Mechanism Guide so that users can navigate a search form to a filtered subset of solution mechanisms that are a best fit for their specific needs based on the criteria they input (experience similar to finding a car rental or airline ticket online but more fun and NASA-y).

In this challenge we will build the application models, controllers (API endpoints).

Competition Task Overview

You will address the following in this challenge :

  • Models :
    • 'SMG' model :
      • Represents the main object in this application
      • The fields are : name, description, example
      • It has one to many relation with 'Charecterstic' model, it will has several charecterstic fields
      • It has one to many relation with 'Example' model
    • 'Example' model :
      • The frontend will have two ways to retrieve examples, eithe by viewing 'SMG' or via a sperate page that list all examples.
      • It has name field, description field (CkEditor) field
      • An example can be used exactly by one 'SMG'
    • 'Charecterstic' model :
      • Represents the SMG characterstic
      • It should have the fields : id name, description, type, sort
      • a field can be associated with one ore more 'SMG' model
    • 'CharectersticType' model :
      • Each characterstic corresponds a web component (picklist, textfield, checkobx, ..etc), we use this association information to decide which component to render in frontend
      • The fields : id, name, description, defaultValueId
      • It has oneToMany association with 'Charecterstic' model
      • It has one-to-one association with 'CharectersticTypeValue' used by defaultValueId field
    • 'CharectersticTypeValue' model :
      • Represents the values of 'CharectersticType'
      • Fields are : name, description, value
      • It has oneToMany association with 'CharectersticType', means that charecteristic type might have many values (i.e. pick list can have multiple 2 values)
    • 'SearchForm' model :
      • Represents the search form component definition used in frontend, it will store the information about fields that will render in the form. The fields are simply 'characterstics'. The form will be used to search the SMG records
      • The fields are : name, description, active flag (there will be exactly one record who has flag set to true)
    • 'SearchFormField' model :
      • Store association between 'SearchForm' and 'Characterstic' models
      • In addition it will have 'sort' field to display order of fields in the form
      • It has one to many association with 'SearchForm'
    • 'SearchFormFieldValue' model : 
      • As some of 'characterstic' types has predefined value, we want to control which of these values are displayed in the search form
      • It store association between 'SearchFormField' and 'CharactersticTypeValues'
    • 'HelpTopic' Model :
      • Represents the help topics in the SMG.
      • It has fields : name, description (as ckeditor content), image file.
    • Use https://github.com/dresende/node-orm2
  • Controllers
    • Use winston module for logging, log method entries, exits, input params and errors
    • Implement input parameter validations
    • Implement validation between callbacks
    • The controllers will directly use the node-orm2 module CRUD mothods to perform CRUD operations and searching on the models
    • Each model should have the following API endpoints :
      • create (should support single or batch)
      • update (should support single or batch)
      • retrieve (should support retrieve all or by id)
        • Child entities should be included in the response
        • For 'Example' model : it should include a method to return examples by 'SMG' id
      • delete (should support delete by id or batch of ids)
      • For Models with child entities : add/update/remove child entities should be supported as separate endpoints and via the above methods that manipulate the parent object
    • Add search method to SMG API controller : the input parameter is search criteria which is a json object of set of (SearchFormField : SearchFormFieldValue) pairs
  • Use expressjs module
  • All input/output should be in json format
  • MySQL is the target database
  • Create postman file for the API, check here for more information
  • We are using github and git as version control for the soruce code
  • The application structure can be like this :
    • /root
      • .gitignore file : should ignore production files and some other folders/files
      • .env_sample (we will use .env file but it should be excluded from the .git repo) : this file store the configuration attributes
      • app.js
      • config.js
      • config/
        • configuration.js
      • sql
        •  .. store the db scripts
      • model folder
      • controller folder
      • helper folder
      • docs folder
      • what else .. ?
  • Attached in forums the Wireframe of the application, it will give you better idea of the flow and how the api will be used
  • The application will be an HTML5 website hosted in sharepoint, the API will be used via Ajax in the hosted web app, so everything should be in json format

Testing

postman rest api client will be used to test the api.

Technology Overview:

  • Node.js
  • MySQL
  • Express.js
  • Rest
  • Postman

Documentation Provided

Wireframes provided in forums.



Final Submission Guidelines

Submission Deliverables

Below is an overview of the deliverables:

  • Fully Implemented REST API
  • A complete and detailed deployment readme file
  • Postman.json with all end points used by the API

Final Submission

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

ELIGIBLE EVENTS:

2014 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30040901