├── dashboard ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── images │ │ ├── 1.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── 9.png │ │ ├── logo.png │ │ ├── user.png │ │ ├── favicon.png │ │ ├── product.png │ │ ├── static.png │ │ └── not-found.png │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── index.js │ ├── components │ │ ├── LoadingError │ │ │ ├── Error.js │ │ │ ├── Loading.js │ │ │ └── Toast.js │ │ ├── Categories │ │ │ ├── MainCategories.js │ │ │ ├── CreateCategory.js │ │ │ └── CategoriesTable.js │ │ ├── Home │ │ │ ├── SalesStatistics.js │ │ │ ├── ProductsStatistics.js │ │ │ ├── Main.js │ │ │ ├── LatestOrder.js │ │ │ └── TopTotal.js │ │ ├── products │ │ │ ├── Product.js │ │ │ └── MainProducts.js │ │ ├── orders │ │ │ ├── OrderMain.js │ │ │ ├── OrderDetailInfo.js │ │ │ ├── Orders.js │ │ │ ├── OrderDetailProducts.js │ │ │ └── OrderDetailmain.js │ │ ├── Header.js │ │ ├── sidebar.js │ │ └── users │ │ │ └── UserComponent.js │ ├── screens │ │ ├── HomeScreen.js │ │ ├── OrderScreen.js │ │ ├── UsersScreen.js │ │ ├── AddProduct.js │ │ ├── productScreen.js │ │ ├── CategoriesScreen.js │ │ ├── OrderDetailScreen.js │ │ ├── ProductEditScreen.js │ │ ├── NotFound.js │ │ └── LoginScreen.js │ ├── Redux │ │ ├── Constants │ │ │ ├── UserContants.js │ │ │ ├── OrderConstants.js │ │ │ └── ProductConstants.js │ │ ├── Reducers │ │ │ ├── userReducers.js │ │ │ ├── OrderReducres.js │ │ │ └── ProductReducers.js │ │ ├── store.js │ │ └── Actions │ │ │ ├── userActions.js │ │ │ ├── OrderActions.js │ │ │ └── ProductActions.js │ ├── PrivateRouter.js │ ├── App.js │ ├── responsive.css │ └── data │ │ └── Products.js ├── .gitignore ├── package.json └── README.md ├── client frontend ├── public │ ├── robots.txt │ ├── favicon.png │ ├── images │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── 9.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── logo.png │ │ ├── user.png │ │ └── not-found.png │ ├── logo22.png │ ├── manifest.json │ └── index.html ├── src │ ├── components │ │ ├── LoadingError │ │ │ ├── Error.js │ │ │ ├── Loading.js │ │ │ └── Toast.js │ │ ├── homeComponents │ │ │ ├── CalltoActionSection.js │ │ │ ├── pagination.js │ │ │ ├── ContactInfo.js │ │ │ ├── Rating.js │ │ │ └── ShopSection.js │ │ ├── Footer.js │ │ └── profileComponents │ │ │ ├── Orders.js │ │ │ └── ProfileTabs.js │ ├── Redux │ │ ├── Constants │ │ │ ├── CartConstants.js │ │ │ ├── ProductConstants.js │ │ │ ├── OrderConstants.js │ │ │ └── UserContants.js │ │ ├── Reducers │ │ │ ├── CartReducers.js │ │ │ ├── ProductReducers.js │ │ │ ├── userReducers.js │ │ │ └── OrderReducres.js │ │ ├── Actions │ │ │ ├── cartActions.js │ │ │ ├── ProductActions.js │ │ │ ├── OrderActions.js │ │ │ └── userActions.js │ │ └── store.js │ ├── index.js │ ├── PrivateRouter.js │ ├── screens │ │ ├── HomeScreen.js │ │ ├── NotFound.js │ │ ├── PaymentScreen.js │ │ ├── Login.js │ │ ├── ShippingScreen.js │ │ ├── Register.js │ │ ├── ProfileScreen.js │ │ └── CartScreen.js │ ├── App.js │ ├── data │ │ └── Products.js │ └── responsive.css ├── .gitignore ├── package.json └── README.md ├── server ├── utils │ └── generateToken.js ├── data │ ├── users.js │ └── Products.js ├── .gitignore ├── config │ └── MongoDb.js ├── Middleware │ ├── Errors.js │ └── AuthMiddleware.js ├── package.json ├── DataImport.js ├── server.js ├── Models │ ├── UserModel.js │ ├── ProductModel.js │ └── OrderModel.js └── Routes │ ├── orderRoutes.js │ ├── UserRoutes.js │ └── ProductRoutes.js └── SourceCode.md /dashboard/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /client frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /dashboard/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/favicon.ico -------------------------------------------------------------------------------- /dashboard/public/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/1.png -------------------------------------------------------------------------------- /dashboard/public/images/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/10.png -------------------------------------------------------------------------------- /dashboard/public/images/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/11.png -------------------------------------------------------------------------------- /dashboard/public/images/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/12.png -------------------------------------------------------------------------------- /dashboard/public/images/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/13.png -------------------------------------------------------------------------------- /dashboard/public/images/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/14.png -------------------------------------------------------------------------------- /dashboard/public/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/2.png -------------------------------------------------------------------------------- /dashboard/public/images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/3.png -------------------------------------------------------------------------------- /dashboard/public/images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/4.png -------------------------------------------------------------------------------- /dashboard/public/images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/5.png -------------------------------------------------------------------------------- /dashboard/public/images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/6.png -------------------------------------------------------------------------------- /dashboard/public/images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/7.png -------------------------------------------------------------------------------- /dashboard/public/images/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/8.png -------------------------------------------------------------------------------- /dashboard/public/images/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/9.png -------------------------------------------------------------------------------- /dashboard/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/logo192.png -------------------------------------------------------------------------------- /dashboard/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/logo512.png -------------------------------------------------------------------------------- /dashboard/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/logo.png -------------------------------------------------------------------------------- /dashboard/public/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/user.png -------------------------------------------------------------------------------- /client frontend/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/favicon.png -------------------------------------------------------------------------------- /client frontend/public/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/1.png -------------------------------------------------------------------------------- /client frontend/public/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/2.png -------------------------------------------------------------------------------- /client frontend/public/images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/3.png -------------------------------------------------------------------------------- /client frontend/public/images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/4.png -------------------------------------------------------------------------------- /client frontend/public/images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/5.png -------------------------------------------------------------------------------- /client frontend/public/images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/6.png -------------------------------------------------------------------------------- /client frontend/public/images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/7.png -------------------------------------------------------------------------------- /client frontend/public/images/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/8.png -------------------------------------------------------------------------------- /client frontend/public/images/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/9.png -------------------------------------------------------------------------------- /client frontend/public/logo22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/logo22.png -------------------------------------------------------------------------------- /dashboard/public/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/favicon.png -------------------------------------------------------------------------------- /dashboard/public/images/product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/product.png -------------------------------------------------------------------------------- /dashboard/public/images/static.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/static.png -------------------------------------------------------------------------------- /client frontend/public/images/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/10.png -------------------------------------------------------------------------------- /client frontend/public/images/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/11.png -------------------------------------------------------------------------------- /client frontend/public/images/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/12.png -------------------------------------------------------------------------------- /client frontend/public/images/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/13.png -------------------------------------------------------------------------------- /client frontend/public/images/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/14.png -------------------------------------------------------------------------------- /dashboard/public/images/not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/dashboard/public/images/not-found.png -------------------------------------------------------------------------------- /client frontend/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/logo.png -------------------------------------------------------------------------------- /client frontend/public/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/user.png -------------------------------------------------------------------------------- /client frontend/public/images/not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MERN-Folk/Full-SorceCode-ShoeShop-Ecommerce-Web/HEAD/client frontend/public/images/not-found.png -------------------------------------------------------------------------------- /server/utils/generateToken.js: -------------------------------------------------------------------------------- 1 | import jwt from "jsonwebtoken"; 2 | 3 | const generateToken = (id) => { 4 | return jwt.sign({ id }, process.env.JWT_SECRET, { 5 | expiresIn: "30d", 6 | }); 7 | }; 8 | 9 | export default generateToken; 10 | -------------------------------------------------------------------------------- /client frontend/src/components/LoadingError/Error.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Message = ({ variant, children }) => { 4 | return
15 |
20 | Sign up free and get the latest tips.
12 | 16 |
17 |
22 | 0736 230 063
14 |Arusha Njiro Pepsi
23 |0736 230 063
32 |
18 |
24 | | 23 | {order.user.name} 24 | | 25 |{order.user.email} | 26 |${order.totalPrice} | 27 |28 | {order.isPaid ? ( 29 | 30 | Paid At {moment(order.paidAt).format("MMM Do YY")} 31 | 32 | ) : ( 33 | 34 | Not Paid 35 | 36 | )} 37 | | 38 |{moment(order.createdAt).calendar()} | 39 |40 | 41 | 42 | 43 | | 44 |
15 | {order.user.name}
16 | {order.user.email}
17 |
29 | Shipping: {order.shippingAddress.country}
Pay method:{" "}
30 | {order.paymentMethod}
31 |
43 | Address: {order.shippingAddress.city}
44 |
45 | {order.shippingAddress.address}
46 |
{order.shippingAddress.postalCode}
47 |
| ID | 35 |STATUS | 36 |DATE | 37 |TOTAL | 38 |
|---|---|---|---|
| 49 | 50 | {order._id} 51 | 52 | | 53 |{order.isPaid ? <>Paid> : <>Not Paid>} | 54 |55 | {order.isPaid 56 | ? moment(order.paidAt).calendar() 57 | : moment(order.createdAt).calendar()} 58 | | 59 |${order.totalPrice} | 60 |
| Name | 12 |Total | 14 |Paid | 15 |Date | 16 |Status | 17 |18 | Action 19 | | 20 ||
|---|---|---|---|---|---|---|
| 26 | {order.user.name} 27 | | 28 |{order.user.email} | 29 |${order.totalPrice} | 30 |31 | {order.isPaid ? ( 32 | 33 | Paid At {moment(order.paidAt).format("MMM Do YY")} 34 | 35 | ) : ( 36 | 37 | Not Paid 38 | 39 | )} 40 | | 41 |{moment(order.createdAt).format("MMM Do YY")} | 42 |43 | {order.isDelivered ? ( 44 | Delivered 45 | ) : ( 46 | Not delivered 47 | )} 48 | | 49 |50 | 51 | 52 | 53 | | 54 |
| 60 | Velcro Sneakers For Boys & Girls (Blue) 61 | | 62 |user@example.com | 63 |$45,789 | 64 |65 | Not paid 66 | | 67 |Dec 12 2021 | 68 |69 | Not Delivered 70 | | 71 |72 | 73 | 74 | 75 | | 76 |
| Product | 23 |Unit Price | 24 |Quantity | 25 |26 | Total 27 | | 28 |
|---|---|---|---|
|
34 |
35 |
36 |
43 | {item.name}
44 |
45 | |
46 | ${item.price} | 47 |{item.qty} | 48 |${item.qty * item.price} | 49 |
54 |
|
83 | |||
49 | 50 | {product.name} 51 | 52 |
53 | 54 ||
11 |
12 |
13 |
14 | |
15 | ID | 16 |Name | 17 |Description | 18 |Action | 19 |
|---|---|---|---|---|
|
25 |
26 |
27 |
28 | |
29 | 1 | 30 |31 | Men clothes 32 | | 33 |Men clothes | 34 |
35 |
36 |
41 |
42 |
43 |
52 |
44 |
45 | Edit info
46 |
47 |
48 | Delete
49 |
50 |
51 | |
53 |
|
56 |
57 |
58 |
59 | |
60 | 2 | 61 |62 | Women fashion 63 | | 64 |Fashions for Women | 65 | 66 |
67 |
68 |
73 |
74 |
75 |
84 |
76 |
77 | Edit info
78 |
79 |
80 | Delete
81 |
82 |
83 | |
85 |
|
88 |
89 |
90 |
91 | |
92 | 3 | 93 |94 | Kids clothes 95 | | 96 |Clothes for kids | 97 | 98 |
99 |
100 |
105 |
106 |
107 |
116 |
108 |
109 | Edit info
110 |
111 |
112 | Delete
113 |
114 |
115 | |
117 |
36 | Admin
79 | ) : ( 80 |Customer
81 | )} 82 | 83 |84 | {user.email} 85 |
86 |