Skip to content

SzyJar/e-shop-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue.js NodeJS Express.js MongoDB

Shop site

Explore assortment of the internet shop, add products to your shop cart and apply discount. Log in and add new items to store database.

Functionality

  • User can access store information and explore product assortment
  • Shopping cart is saved in browser cache, user can freely add and remove items from shopping cart
  • User can log in or create account, after login it is possible to add new items to store database
  • User authentication is done via JSON web token

image Home page

API's Endpoints

Login

  • Method: POST
  • Endpoint: https://e-shop.redglimmer.repl.co/login
{
  "name": "your_username",
  "password": "your_password"
}

Register new user

  • Method: POST
  • Endpoint: https://e-shop.redglimmer.repl.co/signup
{
  "name": "your_username",
  "password": "your_password"
}

Logout

  • Method: POST
  • Endpoint: https://e-shop.redglimmer.repl.co/logout

Include the JWT in the Authorization header

Get all products data

  • Method: GET
  • Endpoint: https://e-shop.redglimmer.repl.co/product

Get one product data

  • Method: GET
  • Endpoint: https://e-shop.redglimmer.repl.co/product/:productname

Add product to the database

  • Method: POST
  • Endpoint: https://e-shop.redglimmer.repl.co/product/:productname

Include the JWT in the Authorization header

{
    "image": "product_image_link",
    "description": "product_description",
    "releaseDate": "product_date",
    "company": "company_name",
    "price": "product_price"
}

Modify product

Requires administrator account

  • Method: PUT
  • Endpoint: https://e-shop.redglimmer.repl.co/product/:productname

Include the JWT in the Authorization header

{
    "image": "product_image_link",
    "description": "product_description",
    "releaseDate": "product_date",
    "company": "company_name",
    "price": "product_price"
}

Remove product

Requires administrator account

  • Method: DELETE
  • Endpoint: https://e-shop.redglimmer.repl.co/product/:productname

Include the JWT in the Authorization header