Skip to content

Instantly share code, notes, and snippets.

@AhmedAbouelkher
Created September 16, 2022 13:27
Show Gist options
  • Save AhmedAbouelkher/dc9d9892cc4731affc654904fb40528c to your computer and use it in GitHub Desktop.
Save AhmedAbouelkher/dc9d9892cc4731affc654904fb40528c to your computer and use it in GitHub Desktop.

E-Commerce

Deadline: 17/09/2022 - 8PM

Features

Auth

  • user can login, register, get his data, and logout.
  • use JWT as and authorization token.
  • user should has only one token at atime.
  • user model should have email, phone number and name.
  • validate user's email and phone number as an Egyptian number.

    HINT: use regex.

Products

  • user can add, update, delete the product.
  • product model should have name, slug, price, price string (ex: 100 EGP) and description.
  • each product should contain a list of images as a seperet model.

HINT: use one-to-many relationship.

Orders

  • user can order multiple products at atime.
  • order model should have products, address, total price and delivery date.
  • user can view his order and delete it (soft deleted).

HINT: Create a shopping cart for every user and empty it when creating new order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment