Skip to content

Mod4JobFinder/findjob-backend

Repository files navigation

FindJob

A platform where users can find the average salary of tech jobs in urban areas across North America, as well as search for job listings and link to their application page. This platform is the backend of a service oriented architecture built using rails api and consumes two microservices built using flask python. The app consumes the microservices on set intervals to build the backend database and send the data as a response to the user's request.

Summary

Getting Started

For Using Endpoints

Go to Endpoints and use /jobs and /salaries endpoints to recieve salary information and job listings.

Gemfile

fj-gemfile

Installing

  • Fork and clone this repo
  • Run bundle install
  • Run rails db:{create,migrate,seed}

Running the tests

  • bundle exec rspec to run the test suite

Sample of Tests Across the App

User Create Happy Path

Tests to to make sure that given valid parameters, a user is created in the backend and serialized as json to be sent to the frontend. user_happypath

User Create Sad Path

Tests that if the password and password confirmation do not match, the frontend should be returned a 400 status for bad parameters. password_sadpath

Saved Job Post Happy Path

Tests to to make sure that given valid parameters, a saved job is created in the backend and serialized as json to be sent to the frontend. saved_job_happy

Saved Job Delete Happy Path

Tests to to make sure that given valid parameters, a saved job is deleted from the backend and 'saved job destroyed' is serialized as json to be sent to the frontend. saved_job_happy_2

User Model Test

Tests that all of a User's relationships and validations are set up correctly. user_spec

Salary Service Happy Path

Tests that our API call is being made correctly to the MicroService and we are receiving data as we thought we would. salary_service

Job Facade Happy Path

Tests that given valid arguments, the method creates JobListings in the DB along with the correct attributes. job_facade

Endpoints

POST findjob-backend.herokuapp.com/api/v1/users

Creates a user in the DB as long as valid parameters are sent as the body of the request. user_create

PATCH findjob-backend.herokuapp.com/api/v1/users

Updates the user's attributes (other than email and password) in the DB as long as valid parameters are sent as the body of the request. user_patch

POST findjob-backend.herokuapp.com/api/v1/sessions

Authenticates the parameters of email and password match for a user in the DB. sessions_create

GET findjob-backend.herokuapp.com/api/v1/salaries

Returns a list of salaries for urban areas, given valid parameter of urban area. get_salaries

GET findjob-backend.herokuapp.com/api/v1/jobs

Returns a list of job listings for a given city, given valid parameter of city and/or title. get_jobs

POST findjob-backend.herokuapp.com/api/v1/saved_jobs

Creates a saved job in the database, given valid parameters of an exisiting user's ID and the job information. saved_create

DELETE findjob-backend.herokuapp.com/api/v1/saved_jobs

Destroys a saved job in the database, given valid parameters of an exisiting saved_job ID. saved_delete

Built With

  • Rails API
  • BCrypt
  • FastJsonApi
  • RSpec
  • Capybara
  • VCR
  • SimpleCov

Versioning

This is version 1 of FindJob BackEnd, for any updated versions please check back here. New versions will be linked below:

Authors

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5