Welcome, Guest User :: Click here to login

Logo 67272

67-272 :: Phase 5: Finishing GCPD

Overview

This phase we will finish our project to develop an online system for the GCPD. This phase will constitute 13 percent of your final course grade and is broken down into the following components:

1. Implementation of Site Design: An appropriate visual design for the site using CSS and appropriate images should be created. When users log into the application, they should go to a home page that provides all the key information a user would immediately want access to (or have access to it with just one click). An appropriate way for each type of user to navigate throughout the site must be clearly evident and allow easy transitions to other parts of the application. Even though you have been given a basic CSS as a starter, do NOT feel in any way that you have to use these settings and designs; much of this is just for the sake of people who need help from phase 3 to get up to speed. (Indeed, to get top marks on visual design, you will need to improve upon the default CSS.)

A lot of the grade this phase will be on the quality of the interactions you design for each of the users and how well you implement the design concepts discussed in class. Below is a list of high-level use cases to guide you, but if you feel a need to deviate from this list, you may do so as long as it is documented in the README file and you have discussed it in advance with Prof. H.

As last time, semi-static pages for about, contact, privacy and the like must be in place. No 'lorem ipsum' style text is accepted on any page; text should be appropriate for the page. The student's name must appear on the bottom of every page in the footer (name should be listed as webmaster or designer).

2. Authorization: Administrators, as usual, have complete authority to do whatever is needed on the site. Other actors will have restricted access as specified in abilities test included with the starter code. There are some actors specified in the use cases, but no mention of some of the limitations they may experience in the use case. (For example, use case states all major actors can edit an officer, but officers can only edit their own information and chiefs can only edit officers in the unit they supervise.) If there are any questions between the use cases and the abilities tests as to what is allowed by whom, the tests win every time.

Authorization should be implemented at both the controller and the view level. Do not show options to a user that the user does not have the authorization to act on. (By now we should know why this is the case.)

3. Testing: All unit tests (given in the starter code) must be fully working. Since you were given a solution, expect a penalty if this solution is not implemented and any unit tests fail. As for cucumber tests, there are no tests provided this phase in order to maximize your freedom to design. As a result, the weight this phase is considerably less for tests and much more on designing appropriate interactions.

4. Coding Style: All code must be appropriately organized. What that means at this stage is the following: Indentation should be used consistently to make code readable. Comments showing organization should be present and explaining difficult code should be used when/if necessary. All business logic should be in models, not views or controllers.

5. Creation of API: Using the models provided in the starter code, create an API for the Criminal, Investigation, and Officer entities. In this case, we are only looking for GET requests and authentication is not required. Below is a sample of the JSON we expect your API to generate.


Starting the project

Starter code is available for you on Github. This starter code has some additional code modules not previously given, so we strongly recommend you start with this as your base and port over styles, views, etc from phase 3 that could be helpful. To get this code, it would be best to clone the existing repository with the following command:

  git clone https://github.com/profh/GCPD_P5_Starter.git

After this, switch into the project directory and remove the reference to origin with the following:

  git remote rm origin

This will stop you from accidentally trying to push changes to Prof. H's repo (which won't be accepted). Now it is recommended that instead you set up a connection to your remote repository on darkknight soon and begin saving your code there early in your development. There is no limit on a number of times you can commit code to the remote repository and remember that committing to your local repository does not automatically mean the remote repository has been updated.

After cloning the project, run bundle install to get any gems needed. After that, populate the database with rake db:populate to get a set of realistic records in your database. (We've added rake db:drop, rake db:migrate, rake db:test:prepare to the populate script so anytime you run it, it will completely reset both your dev and test databases.)


Building the API

At the end of this phase, you will also have to build a basic API for the GCPD application. This application will be a separate repository on darkknight, but you can (and absolutely should) copy your models into this new application. We are only asking for GET requests (index actions) for the following models:

  • Officer
  • Investigation
  • Criminal

A sample of the output expected (using a reduced set of data generated from the populate script) can be found below. These endpoints must be able to generate JSON of this structure. You are also required to use Swagger Docs to document your API; as mentioned in class, an API without sufficient documentation is nearly useless. We also expect you to allow for cross-origin resource sharing (CORS).

You will be given a separate repository for the API -- do not use your main repository for phase 5 on darkknight.

You do NOT have to handle authentication in your API, allow for filtering or ordering (apart from what your endpoint provides by default), throttle requests to the API or creating versioning for the API. Again, there are also no RESTful endpoints for POST, PATCH or DELETE -- we are only handling basic GET requests for the four models listed earlier with this API.


Other notes

A few other notes students should be aware of:

  • If a table has no content, then give an appropriate message rather than displaying an empty table.
  • No 'geek dates' – format dates in a user friendly fashion and do so for an American (rather than European) audience.
  • If the computer should know the date (because it is today, for instance) then users probably shouldn't have to enter the date.
  • All tables, lists and select options must be appropriately ordered.
  • Appropriate and clear feedback for the user needs to be given to reduce misunderstanding.
  • Navigation options appropriate for each type of user should be provided.

Finishing the project

Your project will be turned in via git no later than 4:59pm on December 7, 2018. We will transfer a copy of your files from your remote git repository on darkknight-cmuis.net to the grading system on December 10th at 4:00pm. We know that everyone will turn in their applications on time, so we will not bother to check timestamps in this last phase. We will keep access open to the remote repositories and answer questions regarding the project after the due date since those things may prove helpful to students studying for the final exam. Once we start transferring files on December 10th, we will have to cut off student access to the server, so any applications missing or largely defective at that time will get a zero grade.

Again, if you have questions regarding the turn-in of this project or problems downloading any of the materials provided, please ask Prof. H or a Head TA well in advance of the turn-in date. Do not wait until 48 hours or less before it is due to get help as we may not be able to respond in a timely fashion that close to the deadline.

Additional Information. Below are links to additional files references above.

High Level Use Cases

JSON sample from API

 

Due Date: December 07, 2018

Weight: 13.0