Underdog Devs is a group of software developers supporting the formerly incarcerated & disadvantaged in their transition into the software industry.
Getting Started
The base technologies are JavaScript, HTML and CSS. The frontend leverages React, the backend uses Express and PostgreSQL, the server runs on Heroku, and the authentication workflow runs on Okta.
Developer Instructions
From the backend directory, in your terminal:
Create an environment file (.env) and populate the environment variables (Migrate/Seed your local database)
In addition, create a 'test' database (for use in integration testing), and set the TESTING_DATABASE_URL environment variable, following the format of the DATABASE_URL variable, inside of your .env file to configure your connection to it. For reference this format is: postgresql://USERNAME:PASSWORD@localhost:8080/DATABASE_NAME
Download the server dependencies by running npm install
Migrate your tables by running npm run knex migrate:latest
Seed your tables by running npm run knex seed:run
Start up the server by running npm run watch:dev
From the frontend directory in your terminal:
Download the frontend dependencies by running npm install
Resource tickets is the management system for Mentors/Admin to communicate about a specific resource. (Requests, Recommendations, etc.)
Resource Ticket schema:
{
"resource_ticket_id": 1,
"created_at": "2021-11-12T19:50:44.916Z",
"updated_at": "2021-11-12T19:50:44.916Z",
"submitted_by": "7",
"pertains_to": "Elon Musk",
"message": "Elon deserves to have the 2020 MacBook Pro. Of all the mentees I have, I think he has the most potential."
}
Method
Endpoint
Required Request Body
Returns
User Auth
GET
/resource-tickets
-
get all resource tickets
Admin
GET
/resource-tickets/:resource_ticket_id
-
get a ticket by it id
Admin
GET
/resource-tickets/mytickets
-
get all the current user's tickets
POST
/resource-tickets
message
create a new ticket
Mentor
PUT
/resource-tickets/:resource_id
message
update a ticket by resource_ticket_id,
Mentor
DELETE
/resource-tickets/:resource_id
-
delete a ticket by resource_id from db
Mentor
Actions Tickets schema:
{
"action_ticket_id": 2,
"submitted_by": "11",
"subject_id": "00u13oned0U8XP8Mb4x7",
"issue": "My mentor isn't really helping me learn, could I seek reassignment?",
"comments": null,
"pending": true,
"resolved": true,
"strike": false,
"created_at": "2021-12-07T17:08:00.987Z",
"updated_at": "2021-12-07T17:08:00.987Z"
}
Method
Endpoint
Required Request Body
Returns
User Auth
GET
/actions
-
get all actions tickets
-
GET
/actions/:actions_id
-
get an actions ticket by id
-
POST
/actions
submitted_by, subject_id, issue
create a new actions ticket
-
PUT
/actions/:actions_id
-
update an actions ticket
-
Roles schema:
{
"profile_id": 2,
"role_id": 4 (from 2 to 5)
}
Method
Endpoint
Required Request Body
Returns
User Auth
GET
/roles
-
get all available roles
admin
GET
/roles/:profile_id
-
get a specific profile's role_id
-
PUT
/roles/:profile_id
role_id
update a profile's role
admin
Role Ticket Schema:
{
"role_ticket_id": 1,
"submitted_by": "00ulthapbErVUwVJy4x6",
"subject_id": "00ulthapbErVUwVJy4x6",
"requested_role": 1,
"approved_by": "00ulthapbErVUwVJy4x6",
"comments": "This is my 1st dummy data comment",
"pending": true,
"resolved": false,
"created_at": "2022-01-25T20:33:26.119Z",
"updated_at": "2022-01-25T20:33:26.119Z"
}
Method
Endpoint
Required Request Body
Returns
User Auth
GET
/role-tickets
-
get all role tickets
admin
GET
/role-tickets/:role_ticket_id
-
get a specific role ticket
admin
POST
/role-tickets
submitted_by, subject_id, requested_role
create a new role ticket
PUT
/role-tickets/:role_ticket_id
-
updates a role ticket by id
DELETE
/role-tickets/:role_ticket_id
-
delete a role ticket by id
Progress schema:
{
"profile_id": 2,
"progress_id": 4 (from 1 to 5)
}
Method
Endpoint
Required Request Body
Returns
User Auth
GET
/progress
-
get all available progress tags
mentor
GET
/progress/:profile_id
-
get a specific profile's current progress
-
PUT
/progress/:profile_id
progress_id
update a profile's progress
admin
Notes schema:
{
"note_id": 1 (PK, integer, automatically generated),
"created_by": profile_id of note creator(FK),
"content_type": type here,
"status": ["in progress", "resolved", "no action needed", "escalated"]
"content": note text,
"level": low medium or high,
"visible_to_admin": true,
"visible_to_mentor": true,
"visible_to_mentee": false,
"mentor_id": profile_id of mentor(FK),
"mentee_id": profile_id of mentee(FK),
"created_at": timestamp with time zone (automatically generated),
"updated_at": timestamp with time zone (automatically generated)
}