Code Monkey home page Code Monkey logo

rails_engine's Introduction

Rails Engine

Background and Description

Rails Engine is the backend for a fictitious E-Commerce application. The project is modeled after a service-oriented architecture, as a separate backend that provides information to the front end via APIs.

Requirements and Setup

Ruby/Rails

  • Ruby 2.7.2
  • Rails 5.2.6

Setup

  1. Clone this repo. On your local machine, open the terminal and enter the following command:
$ git clone [email protected]:croixk/rails_engine.git
  1. You can now enter the project directory $ cd rails_engine

  2. Now, install the required gems using $ bundle install

  3. Run database migrations with $ rails rake db:{drop,create,migrate,seed}

  4. Before consuming the APIs, you will need to start the local server $ rails s

Endpoints

This project exposes the following endpoints for a front end team

Merchants

  • get all merchants - GET /api/v1/merchants
  • get one merchant - GET /api/v1/merchants/:merchant_id
  • get all items for a given merchant ID - GET /api/v1/merchants/:merchant_id/items

Items

  • get all items - GET /api/v1/items
  • get one item - GET /api/v1/items/:item_id
  • create an item - POST /api/v1/items
  • edit an item - PATCH /api/v1/items
  • delete an item - DELETE /api/v1/items/:item_id
  • get the merchant data for a given item ID - GET /api/v1/items/:item_id/merchant

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.