/jobquest-be

JobQuest is a text-based RPG-style campaign that aids in the job search process, while making it fun!

Primary LanguagePython

Screen Shot 2021-03-03 at 7 16 18 PM

Link to Front-End repo

Table of Contents

What it does

JobQuest is a text-based RPG-style campaign that aids in the job search process, while making it fun! A user can login or create an account to track their progress through different quests to defeat fantastical monsters. There are 3 types of quests: active, passive, and supportive. Active quests require you to perform actions such as apply for a job or send out a resume in order to conquer the beast. Passive quests will have you doing things like update your resume and research potential companies in order to triumph over evil. For supportive quests, you will be helping out friends (Guild-mates coming soon!) by completing such activities as host a mock interview for them or review their solution to a coding challenge. Once you complete an action outside the game, you will then select that option to deal damage to your demon. With each new quest level, the creatures you battle will become stronger, and therefore will be tougher to defeat. By completing every quest, you shall have taken the necessary steps to obtaining a job**.

Good luck on your journey through JobQuest!

** Disclaimer: The creators of JobQuest do not in any way guarantee employment by completing this game, and thinking so is down right silly of you.

How to Install JobQuest-be

  1. git clone git@github.com:JobQuest/jobquest-be.git
  2. cd jobquest-be
  3. Run python3 -m venv ./venv, then source venv/bin/activate to activate your virtual environment
  4. Run pip3 install -r requirements.txt to install Python packages

next, create your databases and run your migrations

  1. createdb jobquest_dev & createdb jobquest_test
  2. export DATABASE_URL=postgresql://postgres:@localhost:5432/jobquest_dev
  3. python3 manage.py db migrate
  4. python3 manage.py db upgrade

upgrade the test environment as well

  1. export DATABASE_URL=postgresql://localhost:5432/jobquest_test
  2. python3 manage.py db upgrade

To shut off your virtual environment, run deactivate at a terminal where you have an active virtual environment.

API Contract

Run in Postman

POST /api/v1/users

Create New User

Create new user

GET /api/v1/users

GET All Users

POST /api/v1/users

Get User by Email

Create user by email

Unsuccessful Response: with no email in the db:

Screen Shot 2021-02-25 at 8 14 59 PM

GET /api/v1/users/1/quests/completion_status=false

User Uncompleted Quests

GET /api/v1/users/1/quests/completion_status=true

User Completed Quests

PATCH /api/v1/users/1/quests

Update User Quests

GET /api/v1/quests/1/encounters?progress=1

Get All Encounters for a Quest by Progress

Schema

Screen Shot 2021-02-25 at 10 51 19 AM

Dependencies

To install dependencies, run pip install -r requirements.txt

  • Flask v.1.1.2
  • Flask-RESTful v.0.3.8
  • Flask-SQLAlchemy v.2.4.4
  • psycopg2-binary v.2.8.6
  • SQLAlchemy v.1.3.19
  • flask_migrate v.2.5.3
  • Flask-Cors v.3.0.9
  • bleach v.3.2.1
  • flask-script v.2.0.6
  • pytest v.6.1.0
  • coverage v.5.3
  • gunicorn v.20.0.4
  • pep8 v.1.7.1
  • pycodestyle v.2.6.0

Testing

Testing coverage sits at 98%

To run tests, ensure you are in your virtual environment and that it is the test environment

  1. export DATABASE_URL=postgresql://localhost:5432/jobquest_test
  2. Run pytest

Make sure that your enviornment variable is set to testing. This is done by running env. Check that your DATABASE_URL is set to the jobquest_test database. DATABASE_URL=postgresql://localhost:5432/jobquest_test

Run pytest in the terminal to see that all tests are passing. As of the current status there are 48 passing tests. Current code coverage is 98%

Learning Goals

  • Ultimately, demonstrate knowledge you’ve gained throughout Turing
  • Use an agile process to turn well defined requirements into deployed and production ready software
  • Gain experience dividing applications into components and domains of responsibilities to facilitate multi-developer teams. Service oriented architecture concepts and patterns are highly encouraged.
  • Explore and implement new concepts, patterns, or libraries that have not been explicitly taught while at Turing
  • Practice an advanced, professional git workflow (see whole-team expectations)
  • Gain more experience using continuous integration tools to build and automate the deployment of features in various environments
  • Build applications that execute in development, test, CI, and production environments
  • Focus on communication between front-end and back-end teams in order to complete and deploy features that have been outlined by the project spec

Contact

These are the contributors with whom without their imagination, hardwork and dedication this project would not have happened. We are all really excited to talk more about our project with you! Feel free to reach out to us!

Curtis Bartell

Curtis Bartell: LinkedIn, 📬, GitHub

Shaunda Cunningham

Shaunda Cunningham: LinkedIn, 📬, GitHub

Caleb Cyphers

Caleb Cyphers: LinkedIn, 📬, GitHub

Jake Heft

Jake Heft: LinkedIn, 📬, GitHub

Carson Jardine

Carson Jardine: LinkedIn, 📬, GitHub

Olga Morgan

Olga Morgan: LinkedIn, 📬, GitHub

George Soderholm

George Soderholm: LinkedIn, 📬, GitHub

Acknowledgments

Credits: Ian Douglas