Skip to content

E-Commerce-API/Products_API

Repository files navigation

Ratings & Reviews API for E-Commerce Website

Overview

The goal was to replace an existing API with a back end system that can support the full data set for an E-commerce site that can scale to meet the demands of production traffic.

Tech Stack

Server: Node, Express

Database: MongoDB, Mongoose

Production Deployment: 3x AWS EC2 (t2.micro) instances - 20.04 Ubuntu - 8GB SSD

Development Stress Testing: artillery.io, New Relic

Production Stress Testing: loader.io

API Reference

Get item

  GET /products/:product_id
Parameter Type Description
product_id string Required. Fetch item of product_id

Reponse

  Status: 200 OK

Get item

  GET /products/:product_id/styles
Parameter Type Description
product_id string Required. Fetch styles of product_id

Reponse

  Status: 200 OK

Get item

  GET /products/:product_id/related
Parameter Type Description
product_id string Required. Fetch related products of product_id

Reponse

  Status: 200 OK

Optimizations

Implemented MongoDB pipeline aggregation consolidating collections to a single collection reducing complicated queries.

Utilized AWS load balancer to increase traffic up to 1600 requests per second while maintaining over 99% success rate.

Environment Variables

To run this project, you will need to add the following environment variables to your .config file

LICENSE_KEY

NEW_RELIC_APP_NAME

Testing Results

Imgur

Imgur

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published