SlashCommerce - simple extensible backend for ecommerce 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.
- yarn - Yarn package manager
- postgres - Postgres
- cloudinary account - Cloudinary
- google account setup with an app password for google smtp - Google App Password Help
-
-
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'
-
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
# general e2e tests
$ yarn test:e2e
# e2e test for particular modules
$ yarn test:e2e cart
$ yarn test:e2e product
- /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
- Author - Chidiebere Nwachukwu
- Website - https://www.linkedin.com/in/chidi-godwin/
- Twitter - @chidi_godwn