Challenge Overview
The goal of this challenge is to refactor CSFV CMS module to use AngularJS in frontend and to merge it with csfv_frontend_module.
Challenge Requirements
Required Changes
-
The current cms frontend and backend code exists in csfv_cms_module. After this challenge, this module will be deprecated, and cms code will be integrated in csfv_frontend_module and csfv_backend_module.
-
Update CMS frontend code to use AngularJS 1.4.
-
Replace CMS Jade views with AngularJS pages/partials.
-
When loading CMS pages use this angularjs loading bar
-
The bar should be displayed below menu bar.
-
-
Update CMS backend controllers to be REST API to return json data to the CMS angularjs frontend.
-
Move the controllers to csfv_frontend_module.
-
Move the services to csfv_backend_module.
-
Update all REST API routes to have /api/ prefix.
-
-
Update controllers/services 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.
-
-
Under Others tab, keep the following options, remove the rest and clean up it’s code :
-
OAuth2 Client
-
User stats
-
-
Cleanup all code that is not needed.
-
Cleanup controller and services to remove functionality not used.
-
Cleanup csfv_frontend_module and csfv_backend_module README files to list only required configurations.
-
Follow this document for AnguarJS best practices :
-
all frontend Angularjs files should be placed under /public/cms folder in csfv_frontend_module.
-
-
We are open to your creativity for refactoring the functionality.
Required Fixes
-
Searching posts/users/categories/roles, sorting and pagination should be moved to server side instead of being in done in client side.
-
Fix search so that it applies “OR”ing between values of same search field, and applies “AND”ing between all search fields.
-
Title search fields should be case insensitive, currently it is case sensitive.
-
Provided in challenge forums a UI prototype that replaces jqTransform with selectric jquery plugin for drop down select UI controls. Update all drop down select UI controls to use the new plugin.
-
UI prototype in challenge forums is provided only to get the changes for the jqTransform select UI control. Ignore other areas in the prototype as it does not match the existing CMS application UI in some areas and no requirements here to match the prototype with the cms application UI (this applies to reviewers as well during review).
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 CMS running and Frontend application 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_cms_module
-
npm install
-
Update configuration following README
-
run ‘npm install’
-
run ‘node app.js’
-
access http://csfv.com:8887
-
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/
-
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.