Skip to content

Scaled and optimized RESTful API for the front-end product component of a clothing e-tailer SPA

Notifications You must be signed in to change notification settings

sdc-cirrus/products-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atelier Products API

About

The goal of this project was to build a scalable RESTful API service for the Products component of an e-commerce website. The service was optimized by leveraging database indexing, connection pooling, and Redis caching. The server and Postgres database were containerized with Docker and scaled using Docker Swarm.

Development

  1. Clone this repo https://github.com/sdc-cirrus/products-api.git
  2. Install Docker
  3. Create a .env file in the project's root directory and provide POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB, POSTGRES_HOST and POSTGRES_PORT.
  4. In the project's root directory, run:
docker-compose up

Tech Stack

ETL

  1. Inherited legacy dataset consisting of 40M records.
  2. Used Node streams to transform data.
  3. Designed appropriate schemas for the data
  4. Leveraged Node-PG connection pools and DBeaver to load the data into the local development database and deployed database.
  5. Incorporated Docker Swarm to replicate multiple instances of the server and scale the API

Testing

Used Loader.IO and Artillery to stress test the API.

Routes

HTTP METHOD Endpoint Returns Status
GET /products/:productId/related Returns the IDs of products related to the specified product 200
GET /products/:productId/styles Returns the all styles available for the given product 200
GET /products/:productId Returns all product level information for a specified product id 200
GET /products/list Retrieves the list of products 200

About

Scaled and optimized RESTful API for the front-end product component of a clothing e-tailer SPA

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published