"MarketMap" is a group project built over the course of two weeks in Turing's module 3 backend program. This project is a branch of Turing's Consultancy project. We pitched a rough concept of creating an application that would let a user search for cars and enable them to know if they were getting a good deal based on several factors. See below for more details on the backend features.
- Exposing internal APIs for Market Map's Frontend.
- Import simulated db with a CSV file (could also be replaced by consuming a third party API)
- Build a project with Service Oriented Architecture (SOA)
- Ruby -V 2.7.2
- Rails -V 5.2.6
- rspec
- pry
- simplecov
- factory_bot_rails
- faker
- jsonapi-serializer
- Fork and/or Clone this Repo from GitHub.
- In your terminal use
$ git clone <ssh or https path>
- Change into the cloned directory using
$ cd market-map
- Install the gem packages using
$ bundle install
- Database Migrations can be setup by running:
$ rails rake db:{drop,create,migrate,seed}
- Populate the database using
$ rake import_listings_csv
- Startup and Access require the server to be running locally and a web browser opened.
- Start Server
$ rails s
- Open Web Broswer and visit http://localhost:3000/
- Please visit below endpoints to see JSON data being exposed
- Test using the terminal utilizing RSpec
$ rspec spec/<follow directory path to test specific files>
or test the whole suite with $ rspec
This endpoint will:
- Check to see if the user exists in the db or not
- It will find or create a record and render a JSON representation of the User record
- Endpoint is
POST /api/v1/users
- accept the following JSON body with only the following fields:
{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]"
}
This endpoint will:
- Destroy the corresponding record (if found) and any associated data
- NOT return any JSON body at all, and should return a 204 HTTP status code
This endpoint will:
- Find all listings that match the given params.
- Endpoint is
GET /api/v1/listings/search
- Accept the params of
{min_year: 2001, max_year: 2004, make: "Toyota", model: "Camry"}
- Response
This endpoint will:
- Save a listing to a users account.
- It will create a record and render a JSON representation of the UserListing record
- Endpoint is
POST /api/v1/users/1/listings
- Turing Project Details
- Heroku Base URL (Must add on the rest of the url to see example JSON)
- Frontend Heroku Market Map Repo
Contributors (emoji key):
This project follows the all-contributors specification.