This application was made to support the frontend of an online retail store. The goal of this project is to replace the existing API with a backend system that can support the full data set for the project and can scale to meet the demands of production traffic.
Each member of the team was responsible for implementing different services of the application for a faster turnaround following the microservices architecture pipeline.
- Sabrina Gortz: Customer Q&A API
- Trevor Edwards: Customer Review API
- Will Atwood: Products Catalog and Storage API
This RESTful API handles questions and answers submitted by the customers about a specific product being displayed on the page. It also handles uploads of photos by users when answering questions, as well as keeping track of helpfulness votes and being able to report a question or an answer, which in this case deletes the entry from the database.
The database schema are contained in /database
The node server is contained entirely in /server
It enters on index.js
and follows the MVC pattern until interaction with the database.
npm start
Returns a list questions available for a specific product
Parameter | Type | Description |
---|---|---|
page | Integer | Selects the page of results to return. Default 1. |
page_size | Integer | Specifies how many results per page to return. Default 5. |
Returns all answers written by users to a specific question relating to the current product displayed.
Parameter | Type | Description |
---|---|---|
question_id | Integer | Required ID of current product's question for which data should be returned. |
Inserts a new question to the database for the given product.
Parameter | Type | Description |
---|---|---|
product_id | Integer | Required ID of the product for the question to be submitted |
201 Created
Inserts a new answer to the database for the given question of the display product.
Parameter | Type | Description |
---|---|---|
question_id | Integer | Required ID of the product's question for the answer to be submitted |
201 Created