Skip to content

afandiaziz/final-project-gigih

Repository files navigation

Logo

Family Catering - Final Project Backend

Web API berdasarkan 7 user story problem statement. Web API ini dibangun menggunakan framework Ruby on Rails dan database SQLite3. API tersebut diantaranya

Customers

  GET /customers
  GET /customers/${id}
Parameter Type Description
id integer Optional
  POST /customers
Parameter Type Description
name string Required
email string Required
phone string Required
  PUT /customers/${id}
Parameter Type Description
id integer Required
name string Optional
email string Optional
phone string Optional
  DELETE /customers/${id}
Parameter Type Description
id integer Required

Categories

  GET /categories
  GET /categories/${id}
Parameter Type Description
id integer Optional
  POST /categories
Parameter Type Description
name string Required
  PUT /categories/${id}
Parameter Type Description
id integer Required
name string Optional
  DELETE /categories/${id}
Parameter Type Description
id integer Required

Menu Item Categories

  GET /item_categories
  GET /item_categories/${id}
Parameter Type Description
id integer Optional
  POST /item_categories
Parameter Type Description
category_id integer Required
item_id integer Required
  PUT /item_categories/${id}
Parameter Type Description
id integer Required
category_id integer Optional
item_id integer Optional
  DELETE /item_categories/${id}
Parameter Type Description
id integer Required

Menu Items

  GET /menu_items
  GET /menu_items/${id}
Parameter Type Description
id integer Optional
  POST /menu_items
Parameter Type Description
name string Required
price float Required
description string Optional
  PUT /menu_items/${id}
Parameter Type Description
id integer Required
name string Optional
price float Optional
description string Optional
  DELETE /menu_items/${id}
Parameter Type Description
id integer Required

Orders

  GET /orders
  GET /orders/${id}
Parameter Type Description
id integer Optional
  POST /orders
Parameter Type Description
customer_id integer Required
  PUT /orders/${id}
Parameter Type Description
id integer Required
status string Optional

Order Details

  GET /order_details
  GET /order_details/${id}
Parameter Type Description
id integer Optional
  POST /order_details
Parameter Type Description
order_id integer Required
menu_item_id integer Required
quantity integer Required
price float Required

Report

  GET /report
Parameter Type Description
date_start date Optional
date_end date Optional
price float Optional
email string Optional

Orders Exceed the Limit

  PUT /orders-exceed-limit

Run in Postman

Serta terdapat Unit Testing Models dan Requests dengan 139 Test Case

Finished in 10.67 seconds (files took 7.5 seconds to load)
139 examples, 0 failures

Installation

To run this project

bundle install
ruby bin/rails server

Don't forget to migrate and seeds

rails db:migrate
rails db:seed

Run Unit Testing

bundle exec rspec -fd

linkedin