HireUp aims to minimize bias in the hiring process, and reduce efforts required of job applicants to produce application materials and of employers to read through piles of those materials. Job seekers can create anonymous applicant profiles that highlight their skills and values, and employers can browse through those anonymous profiles and message applicants they believe would be a good fit for their open roles.
This repo is the back-end service for HireUp and is consumed by our front-end application. The front-end GitHub repo can be found here and the deployed site here.
pyenv
, Python3, or Pip3 installed, follow these instructions.git clone git@github.com:HireUp-Turing/HireUp_backend.git
$ python3 -m venv ./venv
pyenv
you probably can run python
instead of python3
at the beginning of that command.$ source venv/bin/activate
(Run $ deactivate
to deactivate the virtual environment when done working with the app)$ pip install -r requirements.txt
$ createdb hireup_dev # creates your dev database
$ createdb hireup_test # creates your test database
$ export DATABASE_URL=postgresql://localhost:5432/hireup_dev # connects you to your dev database in order to run the following commands
$ python manage.py db migrate # generates new migration files from any changes made to models.py
$ python manage.py db upgrade # runs migrations on your dev database
$ python manage.py db_seed # seed data in dev database
$ export DATABASE_URL=postgresql://localhost:5432/hireup_test # connects you to your test database in order to run the following commands
$ python manage.py db upgrade # runs migrations on your test database
$ export DATABASE_URL=postgresql://localhost:5432/hireup_dev
again to reset DATABASE_URL to the development database for any future work.$ export FLASK_ENV=development
$ flask run
$ python run.py
to run server on localhost:5000
(_If you get errors concerning the FLASK_APP
environment not being set, try $ export FLASK_APP=manage.py
_)$ python manage.py routes
returns available routes$ python manage.py db_seed
drops all tables, creates all tables, and seeds whichever database is currently set to DATABASE_URL
environment variable.$ pytest -v
$ pytest --cov
$ coverage html
$ open coverage_html_report/index.html
localhost:5000
to explore endpoints with local server and hireup-be.herokuapp.com
to explore the endpoints via the live Heroku app/api/v1/applicants
{
"success": true,
"data": [
{
"id": 1,
"username": "Anonymous Giraffe",
"email": "gaby@hireup.com",
"bio": "Noodle's mom!",
"skills": [
{
"attribute": "flask"
},
{
"attribute": "rails"
},
],
"values": [
{
"attribute": "creativity"
},
{
"attribute": "mentorship"
}
]
},
{
"id": 2,
"username": "Famous Hippo",
"email": "ruthie@hireup.com",
"bio": "Noodle's mom's accountabilabuddy!",
"skills": [
{
"attribute": "flask"
},
{
"attribute": "rails"
},
],
"values": [
{
"attribute": "creativity"
},
{
"attribute": "mentorship"
}
]
}
]
}
/api/v1/applicants/:applicant_id
{
"success": true,
"data": {
"id": 1,
"username": "Fancy Chipmunk",
"email": "greyson@hireup.com",
"bio": "I'm the best one you could possibly hire",
"skills": [
{
"attribute": "flask"
},
{
"attribute": "rails"
},
],
"values": [
{
"attribute": "creativity"
},
{
"attribute": "mentorship"
}
]
}
}
/api/v1/applicants/
{
"first_name": "Greyson",
"last_name": "Johns",
"bio": "I'm the best one you could possibly hire",
"username": "Chipmunk",
"skills": [2, 3],
"values": [2]
}
{
"success": true,
"data": {
"id": 6,
"username": "Chipmunk",
"email": "greyson@google.com",
"bio": "I'm the best one you could possibly hire",
"skills": [
{
"attribute": "flask"
},
{
"attribute": "rails"
},
],
"values": [
{
"attribute": "creativity"
},
{
"attribute": "mentorship"
}
],
}
}
Example erroneous request:
{
"first_name": "Greyson",
"last_name": "Johns",
"bio": "I'm the best one you could possibly hire",
"email": "greyson@google.com",
"username": "Chipmunk",
"skills": [2, 3]
}
# missing "values" array
Error message response:
{
"success": false,
"error": 400,
"errors": [
"required 'values' parameter is missing"
]
}
/api/v1/applicants/search-options
{
"success": true,
"data": [
{
"skills": [
{
"id": 2,
"attribute": "flask"
},
{
"id": 1,
"attribute": "rails"
},
{
"id": 3,
"attribute": "ruby"
}
],
"values": [
{
"id": 1,
"attribute": "creativity"
},
{
"id": 2,
"attribute": "mentorship"
}
]
}
]
}
/api/v1/applicants/search
{
"skills": [2, 4],
"values": [3]
}
{
"success": true,
"data": [
{
"id": 1,
"username": "Chipmunk",
"email": "gaby@hireup.com",
"bio": "Noodle's mom!",
"skills": [
{
"attribute": "rails"
},
{
"attribute": "ruby"
}
],
"values": [
{
"attribute": "creativity"
}
]
},
{
"id": 2,
"username": "Anonymous Giraffe",
"email": "ruthie@hireup.com",
"bio": "Noodle's mom's accountabilabuddy!",
"skills": [
{
"attribute": "rails"
},
{
"attribute": "flask"
}
],
"values": [
{
"attribute": "creativity"
},
{
"attribute": "mentorship"
}
]
}
]
}
Example erroneous request:
{
"skills": [],
"values": []
}
# missing skills and values ids
Error message response:
{
"success": false,
"error": 400,
"errors": "At least one skill or value id must be specified in order to filter applicant search results."
}
/api/v1/messages?applicant_id=<applicant_id>
{
"success": true,
"data": [
{
"id": 1,
"applicant_id": 2,
"employer_name": "Google",
"employer_email": "info@turing.com",
"body": "We know you'll rock our world as CEO of Google - please interview with us.",
"read_status": false,
"created_at": "2020-11-01 14:11:53.212912-07:00"
},
{
"id": 2,
"applicant_id": 2,
"employer_name": "Aerion Inc",
"employer_email": "aerioninc@email.com",
"body": "Come work for us. Pretty please.",
"read_status": true,
"created_at": "2020-11-01 14:11:53.212912-07:00"
}
]
}
/api/v1/messages
applicant_id
(referencing the message recipient), employer_name
, employer_email
, and a message body
. read_status
defaults to false
and should not be included in the request body.{
"applicant_id": 1,
"employer_name": "Turing",
"employer_email" : "info@turing.com",
"body" : "We're interested in interviewing you for our Back-End Instructor role. You'll rock our students' worlds!"
}
{
"success": true,
"data": {
"id": 3,
"applicant_id": 1,
"employer_name": "Blop",
"employer_email": "careers@blop.com",
"body": "We're desperate to hire you at Blop Corp. Will you interview with us this Friday?",
"read_status": false,
"created_at": "2020-11-02 02:10:15.909406-07:00",
"success": true
}
}
/api/v1/skills
{
"success": true,
"data": [
{
"id": 1,
"attribute": "rails"
},
{
"id": 2,
"attribute": "flask"
},
{
"id": 3,
"attribute": "ruby"
},
{
"id": 4,
"attribute": "java"
},
...
]
}
/api/v1/values
{
"success": true,
"data": [
{
"id": 1,
"attribute": "creativity"
},
{
"id": 2,
"attribute": "mentorship"
},
{
"id": 3,
"attribute": "engages with community"
},
...
]
}
Feel free to explore our list of open issues and our project board to learn about what our team has in mind for future iterations of HireUp