Skip to content

Rails Engine is an E-Commerce Application using a service-oriented architecture. The front and back ends of this application are separate and communicate via APIs. The main objective of this project is to expose the data that powers the site through various API endpoints that the front end will consume.

Notifications You must be signed in to change notification settings

dcoleman21/rails-engine

Repository files navigation

Contributors LinkedIn

Rails Engine

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Database Schema
  5. Testing
  6. Contact

About The Project

Rails Engine is an E-Commerce Application using a service-oriented architecture. The front and back ends of this application are separate and communicate via APIs. The main objective of this project is to expose the data that powers the site through various API endpoints that the front end will consume.

Learning Goals

  • Expose an API
  • Test API exposure
  • Use serializers to format JSON responses
  • Compose advanced ActiveRecord queries to analyze information stored in SQL databases
  • Write SQL statements without the assistance of an ORM

Built With

Getting Started

  • In your terminal, create a directory called rails-engine
    mkdir rails-engine
  • Next you will want to cd into this new directory
cd rails-engine

Installation

  1. Fork this repo and put it into your rails-engine directory
    git clone [email protected]:github_username/rails-engine.git
    • cd into your forked repo and open up atom
    • You will then run bundle install to load all of the gems
    • Then you will need to run:
    • rake db:{create,migrate,seed}; This will create, migrate and seed your database
  2. You will also need to put the Front end portion of this project (Rails Driver) into the rails-engine directory you created
git clone [email protected]:github_username/rails_driver.git
  • cd into your forked repo and open up atom
  • follow the set up instructions located in the README
  1. Since this is using service-oriented architecture, you will need to run both of these simultaneously. I found that having four separate tabs open in my terminal helps with this. So you will have your rails-engine running in one tab, you will then run rails s in another tab. You will want to have rails_driver open in another tab and in your final tab you will run rails s -p 3001.
rails-engine -> rails s
rails_driver -> rails s -p 3001

Usage

In this project you will be building multiple endpoints for merchants and items. To see what these endpoints should look like and implement them, you can refere to the rails-engine-postman_collection.json file located in the file tree and import that into Postman.

Database Schema

Below you will see a diagaram showing the relationships for all of the tables

rails-engine

Testing

For this project you will need to run the tests for both your rails-engine and also run the spec harness tests for rails_driver. The tests for rails-engine will be written by you using OOP, encapsulation and abstraction. We want to make sure that we are using SRP.

rails-engine will use rails s

The tests for rails_driver have already been written.

rails_driver will use rails s -p 3001

Both consoles will be running simultaneously. You will use the following command to run the tests:

bundle exec rspec

rails-engine test coverage

Contact

Dani Coleman - LinkedIn

Project Link: Rails Engine

About

Rails Engine is an E-Commerce Application using a service-oriented architecture. The front and back ends of this application are separate and communicate via APIs. The main objective of this project is to expose the data that powers the site through various API endpoints that the front end will consume.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published