Coder Social home page Coder Social logo

market-map's Introduction

MarketMap: A Turing 2110 BE Mod 3 Consultancy Projectt

languages PRs rspec simplecov All Contributors

Background & Description:

"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.

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)

Requirements and Setup (for Mac):

Ruby and Rails

  • Ruby -V 2.7.2
  • Rails -V 5.2.6

Gems Utilized

  • rspec
  • pry
  • simplecov
  • factory_bot_rails
  • faker
  • jsonapi-serializer

Setup

  1. Fork and/or Clone this Repo from GitHub.
  2. In your terminal use $ git clone <ssh or https path>
  3. Change into the cloned directory using $ cd market-map
  4. Install the gem packages using $ bundle install
  5. Database Migrations can be setup by running:
$ rails rake db:{drop,create,migrate,seed}
  1. Populate the database using $ rake import_listings_csv
  2. 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

Testing

  • Test using the terminal utilizing RSpec
$ rspec spec/<follow directory path to test specific files>

or test the whole suite with $ rspec

Database Schema

Screen Shot 2022-03-03 at 8 42 11 PM

Endpoints

Users

Create a User

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]"
}

Destroy a User

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

Listings

Search Listings

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

User/Listings

Create a userlisting

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

Further Project Information

Contributors (emoji key):


Croix (he/him)

๐Ÿ’ป ๐Ÿค” โš ๏ธ ๐Ÿ‘€

Eldridge (he/him)

๐Ÿ’ป ๐Ÿค” โš ๏ธ ๐Ÿ‘€

Jackson (he/him)

๐Ÿ’ป ๐Ÿค” โš ๏ธ ๐Ÿ‘€

Leland (he/him)

๐Ÿ’ป ๐Ÿค” โš ๏ธ ๐Ÿ‘€

Tim (he/him)

๐Ÿ’ป ๐Ÿค” โš ๏ธ ๐Ÿ‘€

Kevin (he/him)

๐Ÿ’ป ๐Ÿค” โš ๏ธ ๐Ÿ‘€

This project follows the all-contributors specification.

market-map's People

Contributors

kevingloss avatar lelandcurtis avatar croixk avatar jacksonvaldez avatar tjroeder avatar eldridge-turambi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.