Skip to content

E-commerce JavaScript site allows access for admin to add/remove items in store & allows consumers to add/delete items to their cart, as well as see costs of items purchased.

Notifications You must be signed in to change notification settings

dcc5235/EComm_Shop

Repository files navigation

E-commerce Site GitHub version doc GitHub last commit

HTML5, Bulma CSS, JavaScript

A responsive, application which utilizes JS to allow administrators to add, edit, and remove products from the site. It also allows users of the product site to add, remove, and view their cart total.


Installation & Technologies

  • Download the full package, select the Code button, choose the "Download ZIP" option.
  • Requires Node.js: install Node.js, current version.
  • Install dependencies: run script npm install express nodemon
    • express helps run web server
    • nodemon auto restarts web server when project file changes
  • Bulma CSS framework required

Admin Users Repository Method

Method Input Args Return Description
getAll - [user] gets a list of all users
getOne id user finds the user with the given id
getOneBy filters user finds one user with the given filters
create attributes null creates a user with the given attributes
update id, attributes null updates user with given id using the given attributes
delete id null delete the user with the given id
randomId - id generates a random id
writeAll - null writes all user to a user.json file
comparePasswords string, string boolean returns true if the passwords match

Admin Users Sign Up: http://localhost:3000/signup

  • Run script npm run dev to deploy

Products Repository Method

  • Reuse code from Admin Users Repository Method excluding the comparePasswords method
    • See repository.js for code reuse with classes

Requirements for SignUp & SignIn

Image and Upload Files

  • Middleware multer installation needed for accessing uploaded image files
    • Run script npm install multer in the command line

Shopping Cart

Product List: http://localhost:3000

  • Run script npm run dev to deploy
  • When buyers click on a product, they are redirected to their shopping cart

About

E-commerce JavaScript site allows access for admin to add/remove items in store & allows consumers to add/delete items to their cart, as well as see costs of items purchased.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published