OCAT
Purpose and Context
ITSC Guidelines
- Setup
- PLEASE ask if you're having trouble setting up your project repository, project board, first branch, or development environment. The mentors are here to help you! We want to make sure you get off to a great start and this part is often the most challenging, so please don't hesitate to come to us immediately with any setup concerns!
- Hour/Day Policy
- If you've been stuck on something for two hours, ask a fellow intern!
- If you've been stuck on something for a full day, ask a mentor!
- Process for Getting Unstuck
- Search through the available resources in this document (located at the bottom of the page and throughout)
- Google! This is your most valuable resource and learning how to search the internet for your answer is going to be your most valuable skill moving forward! Forum resources like StackOverflow can be extremely helpful. In web development, there's almost always someone who has encountered your problem before. The trick lies in finding that answer!
- Ask an OCAT internship peer
- Ask an OCAT mentor
Code Review Guidelines (reference this later when doing peer review)
- Every Issue should be code reviewed by another OCAT internship-peer
- Code Review Process
- Making a Pull Request
- Create a Pull Request (PR) from your development branch (your current branch) into master (the main branch)
- Reach out to one of your fellow OCAT interns and ask them nicely to review your code. Include a link to the Pull Request you'd like them to review
- Take any suggestions with a grain of salt. Remember, this is YOUR application. Make any changes you agree with and then merge the Pull Request
- Reviewing a Pull Request (PR)
- Reviewing a Pull Request
- Go the link supplied by whichever OCAT intern has requested a review from you
- Look through their code, offering suggestions and critiques
- You should try to:
- Understand each part of the code and look for ways to improve it
- Be kind. Remember that this is someone else's work that they've spent a lot of time on
- Balance criticism with praise. It is tempting to only point out the negatives. If you see something you like, tell them!
- Feel free to ask questions. In the end, this is a learning process. Feel free to ask questions if you don't understand something in the code.
- After a Pull Request (PR) has been approved, merge it and move on
Technologies
- Version Control
- Front-End Framework
- Back-End Framework
- Database
- Package Manager (for Node.js)
- Task Runners
Architecture
The application must be architected with two "layers" using an API model and pseudo-Microservices (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.
-
API: thin layer allowing for directing of requests from the front-end to the microservices. Allows for outside integration.
-
Microservices: complex layer of services that accept requests from the API and communicate with the database.
-
The below diagram resembles what you should attempt to reproduce:
Roles
Tasks
A. Setup
- 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
- 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.
- Add the Provided Issues to your Project Board
B. Get the Application Running
- Clone your new repository
- OCAT
- Navigate into the directory
- npm install
- npm run build
- Open a second terminal
- Terminal 1
- Terminal 2
- API
- Navigate into the directory
- npm install
- npm run dev
- Database
- Verify that the config.json for both directories is correct
- Begins as config.example.json and needs to be modified to match your environment
C. Requirements
- NOTE: Please do any login-related pieces near the end. Otherwise, you may spend the entire time developing a login process and you will not have much to show come presentation time.
- NOTE: All work should be done on a separate "branch" so that it can be code reviewed. Below are instructions on how to create a new branch:
- 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 (text)
- 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
- 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
- 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
- Allow Supervisors to log into the system
- This must authenticate against the database using Bcrypt
- 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)
- Recommend using bookshelf-soft-delete
- Prepare your presentation!
Navigating the OCAT File Structure
Resources
Advanced Resources
-
Microservice Advanced Concepts
-
Design principles
-
Create a PostgreSQL Docker Container
- Steps for Windows:
- Update to latest feature update: Get the May 2020 Update
- Download Docker Desktop: Docker
- Open a terminal and run this command: docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=YOUR_PASSWORD_GOES_HERE -d postgres
- Steps for Mac:
- Download Docker Desktop: Docker
- Open a terminal and run this command: docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=YOUR_PASSWORD_GOES_HERE -d postgres
-
Functional Programming in Javascript