Skip to content

j-gens/craft-marketplace-app

 
 

Repository files navigation

weWare

Craft Marketplace App

alt arts and crafts

Overview

E-commerce app for homemade goods and wares.

Team Members

  • Julia Gens - j-gens - Photo Carousel Service
  • Djason Sylvaince - ingdjason - Reviews Service
  • Emily Meeks - minglewook - Product Details Service
  • Logan Dudley - logandudley - Checkout Service

Photo Carousel Service Contributors

  • Silin Dang - silkyh13
    • Designed and built the front-end and UI
  • Julia Gens - j-gens
    • Replaced and built out photo carousel service back end
    • Optimized PostgreSQL data schema to reduce query time latency from 3s to 4ms
    • Executed horizontal scaling with multiple EC2 instances and implemented load balancer for 200% increase in throughput while maintaining response time latency

Technologies

  • JavaScript
  • Node/Express
  • PostgreSQL
  • AWS (EC2/S3)
  • New Relic
  • Loader.io
  • k6.io

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

  1. Clone the repository onto your local machine
$ git clone https://github.com/j-gens/craft-marketplace-app.git
  1. Change directories into the craft-marketplace-app root directory
$ cd craft-marketplace-app
  1. Install the dependencies in a local node_modules folder
$ npm install
  1. Generate the data and seed the PostgreSQL database

This command will generate product data (10M entries) and image data (35M entries)

$ npm run-script seed
  1. Assemble the bundle within the public folder
$ npm run-script build
  1. Start the server on your local machine
$ npm start
  1. View in browser by going to http://localhost:3000

Testing

The legacy tests were written using Jest. Run them with the following command:

$ npm run-script test

Performance Testing

Local performance testing was done with k6 as the load testing tool.

Below is one of the k6 results printout from testing. Things to note:

  • vus = active virtual users (with vus_max being the maximum possible number of virtual users)
    • For the test below, the vus_max was set to 1000
  • http_reqs = the total number of HTTP requests that k6 generated
    • For the test below, the http_reqs was 1173/s
  • http_req_duration = the total time for the request (how long the server took to process the request and respond)
    • For the test below, the http_req_duration was an average of 129ms and max of 1.22s

alt k6 test

Performance testing of the deployed app was done with loader.io as the cloud-based load testing tool.

Below is a loader.io results printout from testing 100 requests per second.

alt 100 rps test

Below is a second loader.io results printout from testing 1000 requests per second.

alt 1000 rps test

License

This project is licensed under the MIT License - see the LICENSE file for details

About

The place to buy and sell homemade goods and wares

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.2%
  • CSS 9.8%