Skip to content

chidi-godwin/slashcommerce

Repository files navigation

Description

SlashCommerce - simple extensible backend for ecommerce application

Application

  • Live URL - SlashCommerce
  • API Documentation - SlashCommerce API Documentation
  • Note - slash commerce is hosted on a free spot instance that goes standby after 15 minutes of inactivity. This standby is temporary and the system would be resumed on receiving it's first request and a 30s delay to restart.

Dependencies

Installation

  • Instructions

    • setup a local database

    • create app passowrd in goolge account

    • create folder in cloudinary account and get auth details

    • create a .env file with .env.example file and put in appropriate values

    • Install dependencies

      $ yarn install
    • Migrate database

      $ yarn prisma migrate dev --name 'initial migration'

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Test

# general e2e tests
$ yarn test:e2e

# e2e test for particular modules
$ yarn test:e2e cart
$ yarn test:e2e product 

Included end to end tests

  • /POST cart/item adds a new product to cart
  • /POST cart/item adds a new product to cart should add to quantity if product already exists
  • /GET cart/total should return total price of cart
  • /GET cart/total should return discounted total if quantity is > 3
  • /POST product/store/:storeId adds a new product
  • /POST product/store/:storeId returns 403 if user is not store owner
  • /GET product fetches all added products
  • /GET product/:id fetches a single product

Stay in touch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages