Challenge Overview

The goal of this challenge is to refactor CSFV forums module to use AngularJS in frontend.

You can see current forums in our staging server : https://verigames.org/forums

Challenge Requirements

Required Changes

  • Update Forums frontend js code to use AngularJS 1.4.

  • Replace Forums Jade views with AngularJS pages/partials.

  • When loading forums pages use this angularjs loading bar

    • The bar should be displayed below black menu bar.

  • Update Forums backend controller to be REST API to return json data to the forums angularjs frontend.

    • Move the controller to csfv_backend_module.

    • Update all REST API routes to have /api/ prefix.

  • Update backend to use middlewares for the following :

    • Logging. So you don’t need to add entry and exit logging in each controller function.

    • User initialization, right now we call _setModel to set user instance, instead set req.user in the middleware using req.session.userId, you need to use userService to lookup the user object from userId (from session).

    • Error handling.

  • Cleanup all code that is not needed.

  • Cleanup controller and services to remove functionality not used.

  • Cleanup csfv_backend_module and csfv_frontend_module README files to list only required configurations.

  • Follow this document for AnguarJS best practices :

    • all frontend anguarjs files should be placed under /public/forums folder in csfv_frontend_module.

  • We are open to your creativity for refactoring the functionality. i.e. you can move breadcrumb generation to frontend.

  • The controllers code of forums module exist in csfv_forums_module. you will move it to csfv_backend_module.

  • The services/models of forums exist in csfv_backend_module.

  • The frontend code (jade/js/css/images) of forums exist in csfv_frontend_module.

  • By end of this challenge, csfv_forums_module will be deprecated and deleted. Meaning it will no more be a dependency for csfv applications.

Testing

You are provided with test scenario document that help you testing the functionality after refactoring. Reviewers are expected to use it to simplify reviewing the refactored functionality.

Documentation Provided

  • The deployment guide of the CSFV website located in the github private repos, in README file. Ask questions in challenge forums. if you have troubles deploying the websites.

Source Code

You will use refactor_2015 branch for all CSFV modules in this challenge.

Source code exists in private github repo https://github.com/topcoderinc/

If you get 404 then you need permission to access it. Request it in challenge forums, copilot will add you to the repository and you should receive email about you being added to github. Post your *github* account name when requesting access.

Get Started

You need to run the following to get forums pages up :

  • Checkout csfv_test_data_generator

  • Checkout branch refactor_2015.

  • Update db configuration in config/development.js, you don’t need to change it if you are using localhost in default port, and no username/password.

  • Run ‘npm install’

  • Run ‘node app.js’

  • Kill the app when you see ‘generation done’

  • Checkout csfv_frontend_module

  • Checkout branch refactor_2015.

  • Update configuration following README.

  • run ‘npm install’

  • run ‘node app-sockets.js’

  • run ‘node app.js’

  • access http://csfv.com:8889/forums

    • You might need to configure your hosts file to point csfv.com to 127.0.0.1

 

 


Final Submission Guidelines

Submission Deliverables

Below is an overview of the deliverables:

  • Patch file of changes.

  • Deployment document with verification screens for reviewers.

  • Updated csfv_test_data_generator module if needed.

Final Submission

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

ELIGIBLE EVENTS:

2015 topcoder Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30050311