yutize / Yutong-Chen-OCAT-Intern

0 stars 0 forks source link

OCAT - ITSC Internship Project

In this project, you will have the opportunity to explore the basics of web development operations as carried out at the ITSC. You will learn about some of the core technologies we use to build web application and ecosystems such as React.js, Node.js with the Express Framework, and other libraries and tools. Below, you'll find a comprehensive list of all the technologies used in this project.

This project is a minified system of a the ORAS system, a project used by probation officers to assess the offender's likelihood of recommitting a crime (recidivism) and the factors in an offender's life that are directly related to recidivism (criminogenic needs). You'll be building a user interface to create and review assessments.

Make sure you review the Guidelines section to learn about when and how you should seek help.

Good luck!

About Web Development

At a high-level, every web application is composed of different elements:

Each one of those layers will need to communicate with the others. For example, the front-end will need to send requests to the back-end to get data from the database. The back-end will need to send requests to the database to store data. The database will need to send requests to the back-end to retrieve data. And so on.

You'll find that we need to use a number of other libraries and tools to compliment our work. For example, we will need to encrypt passwords to be able to save it securely in the database. We will need to use a version control system like Git/GitHub to keep track of our code and collaborate with others. And so on.

Technologies

Architecture

The application must be created with two "layers" using an API model (the "skeleton" for this has already been provided within the template repository you'll start with). Once the HTML page is rendered, all future communication between the client/server should be done using HTTP requests sending/receiving JSON.

🏁 Let's Get Started

Tasks/Milestones

We will need to complete the following tasks to complete the project. Each task will be broken down into smaller milestones. You will be able to track your progress using the provided Project Board template.

  1. Project Setup
  2. Setup Development Environment
  3. Build the Features

A. Project Setup

  1. Copy the Template Repository NOTE: You can name this whatever you want, just make certain that you leave it "Public" so that others can view your code
  2. Copy the Template Project Board
    • NOTE: This is something you should keep constantly up-to-date. It is how we will track your progress, and it will facilitate code review and collaboration with your OCAT internship peers.
  3. Add the Provided Issues to your Project Board

B. Setup Development Environment

Navigating the OCAT File Structure

We have created some CodeTours for you to help you understand the first couple tasks.

Make sure you have installed the recommended extensions, then see the Starting CodeTours Documentation for instructions on viewing our tours

  1. Clone your new repository
  2. Install NodeJS 16.x on your computer
  3. Duplicate the packages/api/config/default.json file to packages/api/config/local.json and update the database credentials with the ones emailed to you.
    • You can also install PostgreSQL database and setup a local database instance if you prefer. See this guide for instructions. in this case, you won't need to change the configuration.
  4. Running the project
    • Navigate into the packages/client/ directory cd packages/client/
    • npm install
    • npm start
    • Open a second terminal window and navigate into the packages/api/ directory cd packages/api/
    • npm install
    • npm start
  5. Verify that all recommended extensions are installed
  6. Start the "Task 1" CodeTour
  7. Happy Coding!

C. Features

  1. Allow Users to submit an assessment with the following information
    • NOTE: An "assessment" has a type, five questions, and two responses per question ->
    • Use the example info here: OCAT Assessment Info
      • Instrument Name (static text field)
        • this is the type of assessment that is currently being conducted -> Example: Cat Behavioral Instrument
      • Cat Name (text) -> Example: Mr. Fluffykins
      • Cat Date of Birth (date)
      • Score (integer calculated by the sum of all responses)
      • Risk Level (text - low [0-1], medium [2-3], high [4-5] determined by the calculated score)
      • Audit log of when the assessment was created/deleted (datetime with timezone)
    • Recommend using React Hook Form
  2. Implement a bootstrap style template to make your site look presentable
    • NOTE: Do not spend too much time on this. We want the application to look good but not at the risk of hindering the overall completion of your project
  3. Allow Users and Supervisors to sort/search/filter/review submitted assessments from a list
    • Should only return non-deleted assessments
    • The list should include (at minimum) cat name, cat date of birth, instrument, score, risk level, and creation date
    • Recommend using React Table
  4. Allow Supervisors to log into the system
    • This must authenticate against the database using Bcrypt
  5. Allow Supervisors to delete assessment submissions
    • This should be a soft delete in the database (a soft delete does not remove the data from the database, it sets a flag on the record so it does not show up on the front-end)
    • Soft deletes are built into Sequelize
  6. Prepare your presentation!

Guidelines

Resources

Advanced Resources