---
# System prepended metadata

title: E-commerce

---

# E-commerce

## Steps

create database taskilloo;
create user taskilloo with superuser password '123456';
alter database taskilloo  owner to taskilloo;


- [x] Create File Structure 
- [x] Create Database
```sql
create database ecommerce;
create user team3 with superuser password '123456';
alter database ecommerce  owner to team3;
\c ecommerce
```
- [x] Create .env file
`Database_DEV=progress://team3:123456@localhost:5432/ecommerce`
- [x] Change the project title in index.html
- [x] Change the favicon

### Login 
- [x] Component in react - Form
- [x] Store in Local storage

### Add product
- [x] Component in react - Form
- [x] Send data to the backend - post
- [x] Create addProductController
- [x] Create addProductQuery

### Get products
- [x] Create product component in react
- [x] Send request to the backend - get
- [x] Create getProductsController
- [x] Create getProductsQuery

### Edit products
- [x] Create edit product function in react
- [x] Send request to the backend - put
- [x] Create editProductsController
- [x] Create editProductsQuery

### Delete products
- [x] Create delete product function in react
- [x] Send request to the backend - delete
- [x] Create deleteProductsController
- [x] Create deleteProductsQuery

### Filter products
- [x] Filter by price
- [x] Filter by category

### Add to Cart
- [x] Show the cart icon
- [x] Add the items to local storage
- [x] Create Cart component in react
- [x] Get the items from the local storage
- [x] Remove from Cart

## Req:
- [x] A complete figma should be designed for every page and linked it in the readme file.
- [x] Routes basically will be:
/products (get, post, delete).
- [x] Initial products will be by insert fakedata to your db.

- [x] A website lets customers view products from the main page.

- [x] The list of products is dynamically generated from an api.

- [x] There must be a products filter by price, category and search by name.

- [x] There must be a page for a specific product.


- [x] Simulate seller login and store role and data needed in localStoarge.

- [x] Cart products should be stored in localStoarge.

- [x] The customer can add products to the cart.

- [x] The user can view the cart page.

- [x] Take care of user messages, After or adding product to cart page.

- [x] The inputs must have validation.

- [x] Before deleting product display pop confirm to ensure product deletion.

- [x] App deployed to heroku.




#### [Figma Link](https://www.figma.com/file/PFeTmI73F2B40lfwuWl2V2/E-commerce?node-id=0%3A1)

#### Database
*  getProducts
*  addProduct
*  editProduct
*  deleteProduct
 
#### Local Storage
*  cart
*  login
 
 `\i C:/GSG/week-10/E-commerce-Team3/server/database/config/build.sql`

```CSS
  background: linear-gradient(to right, #D2F8BF, #FFFFFF);
```



