rrabinovitch / rails_engine_rr

ReST API for sales data
0 stars 0 forks source link

RailsEngine

About this Project: RailsEngine is a versioned, ReSTful, JSON API for sales data. It exposes record, relationship, and business intelligence endpoints for various sales-related resources.

This solo project was build for Mod3 of Turing School of Software and Design's Back-End Program.

Project premise: You are working for a company developing an E-Commerce Application. Your team is working in a service-oriented architecture, meaning the front and back ends of this application are separate and communicate via APIs. Your job is to expose the data that powers the site through an API that the front end will consume.

RailsDriver is an example (provided by Turing instructors) for how this RailsEngine API could be consumed.

*_Explore a similar project I completed for my third quarter final at Turing here_

Schema diagram

schema diagram

Local Setup

  1. Create a root directory that will house this repo and the front-end application, RailsDriver.
  2. Clone this RailsEngine repo within your root directory: git clone git@github.com:rrabinovitch/rails_engine_rr.git
  3. RailsEngine configuration + creating and seeding your database:
    • bundle install
    • rake db:{create, migrate}
    • rake seed_from_csv:all
  4. Clone RailsDriver within your root directory: git clone git@github.com:rrabinovitch/rails_driver.git
  5. RailsDriver configuration:
    • bundle install
    • rake db:{create, migrate}
    • figaro install
    • Within the config/application.yml file that this last command created, add the key-value pair RAILS_ENGINE_DOMAIN: http://localhost:3000

Testing

API Consumption

You can see this API in action through the front-end RailsDriver application, Postman, or in your browser.

Endpoint Documentation

Run in Postman