├── public
├── favicon.ico
└── index.html
├── src
├── assets
│ └── logo.png
├── views
│ ├── AboutView.vue
│ ├── payment
│ │ ├── FailedView.vue
│ │ └── SuccessView.vue
│ ├── AdminView.vue
│ ├── Product
│ │ ├── ProductView.vue
│ │ ├── WishList.vue
│ │ ├── AddProduct.vue
│ │ ├── EditProduct.vue
│ │ ├── ShowDetails.vue
│ │ └── CartView.vue
│ ├── Category
│ │ ├── CategoryView.vue
│ │ ├── ListProducts.vue
│ │ ├── AddCategory.vue
│ │ └── EditCategory.vue
│ ├── SignIn.vue
│ ├── HomeView.vue
│ ├── Checkout
│ │ └── CheckOut.vue
│ └── SignUp.vue
├── main.js
├── components
│ ├── ProductBox.vue
│ ├── Category
│ │ └── CategoryBox.vue
│ ├── FooterOne.vue
│ └── NavbarOne.vue
├── App.vue
└── router
│ └── index.js
├── babel.config.js
├── vue.config.js
├── .gitignore
├── jsconfig.json
├── README.md
└── package.json
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/neto112/ecommerce-ui/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/neto112/ecommerce-ui/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/src/views/AboutView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
This is an about page
4 |
5 |
6 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | const { defineConfig } = require('@vue/cli-service')
2 | module.exports = defineConfig({
3 | transpileDependencies: true
4 | })
5 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | import router from './router'
4 |
5 | createApp(App).use(router).mount('#app')
6 |
--------------------------------------------------------------------------------
/src/views/payment/FailedView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Failed
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/views/payment/SuccessView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Success
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "esnext",
5 | "baseUrl": "./",
6 | "moduleResolution": "node",
7 | "paths": {
8 | "@/*": [
9 | "src/*"
10 | ]
11 | },
12 | "lib": [
13 | "esnext",
14 | "dom",
15 | "dom.iterable",
16 | "scripthost"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ecommerce-ui
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/src/views/AdminView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/src/views/Product/ProductView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Our Products
6 |
7 |
8 |
9 |
10 |
11 |
21 |
22 |
23 |
24 |
31 |
32 |
--------------------------------------------------------------------------------
/src/views/Category/CategoryView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Our Categories
6 |
7 |
8 |
9 |
10 |
11 |
20 |
21 |
22 |
37 |
--------------------------------------------------------------------------------
/src/components/ProductBox.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
![Card image cap]()
9 |
10 |
11 |
12 | {{ product.name }}
13 |
14 |
{{ product.description.substring(0, 65) }}...
15 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ecommerce-ui",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "axios": "^0.27.2",
12 | "core-js": "^3.8.3",
13 | "stripe": "^9.14.0",
14 | "sweetalert": "^2.1.2",
15 | "vue": "^3.2.13",
16 | "vue-router": "^4.0.3"
17 | },
18 | "devDependencies": {
19 | "@babel/core": "^7.12.16",
20 | "@babel/eslint-parser": "^7.12.16",
21 | "@vue/cli-plugin-babel": "~5.0.0",
22 | "@vue/cli-plugin-eslint": "~5.0.0",
23 | "@vue/cli-plugin-router": "~5.0.0",
24 | "@vue/cli-service": "~5.0.0",
25 | "eslint": "^7.32.0",
26 | "eslint-plugin-vue": "^8.0.3"
27 | },
28 | "eslintConfig": {
29 | "root": true,
30 | "env": {
31 | "node": true
32 | },
33 | "extends": [
34 | "plugin:vue/vue3-essential",
35 | "eslint:recommended"
36 | ],
37 | "parserOptions": {
38 | "parser": "@babel/eslint-parser"
39 | },
40 | "rules": {}
41 | },
42 | "browserslist": [
43 | "> 1%",
44 | "last 2 versions",
45 | "not dead",
46 | "not ie 11"
47 | ]
48 | }
49 |
--------------------------------------------------------------------------------
/src/components/Category/CategoryBox.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
![Category Image]()
9 |
10 |
11 |
12 | {{ category.categoryName }}
13 |
14 |
15 | {{ category.description.substring(0, 65) }}...
16 |
17 |
22 | Edit
23 |
24 |
25 |
26 |
27 |
28 |
42 |
43 |
--------------------------------------------------------------------------------
/src/views/Product/WishList.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Your Wishlist
6 |
7 |
8 |
9 |
10 |
19 |
20 |
21 |
22 |
52 |
53 |
--------------------------------------------------------------------------------
/src/views/Category/ListProducts.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
{{ category.categoryName }}
6 | {{ msg }}
7 |
8 |
9 |
10 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
13 |
14 |
15 |
16 |
66 |
67 |
72 |
--------------------------------------------------------------------------------
/src/views/SignIn.vue:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
57 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Demo Eccomerce App
9 |
10 |
11 |
17 |
18 |
19 |
23 |
27 |
28 |
29 |
36 |
37 |
38 |
39 |
44 |
49 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/src/views/Category/AddCategory.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Add Category
6 |
7 |
8 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/views/Category/EditCategory.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Edit Category
6 |
7 |
8 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/views/HomeView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 | Demo Ecommerce
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
Top Categories
19 |
20 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
Top Products
34 |
35 |
36 |
37 |
38 |
44 |
45 |
46 |
47 |
48 |
67 |
68 |
82 |
--------------------------------------------------------------------------------
/src/views/Checkout/CheckOut.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
You will be redirected to payment page
4 |
5 | While making payment use card number 4242 4242 4242 4242 and enter random
6 | date and cvv (3 digit)
7 |
8 |
9 |
10 |
11 |
12 |
72 |
73 |
--------------------------------------------------------------------------------
/src/views/Product/AddProduct.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Add New Product
6 |
7 |
8 |
47 |
48 |
49 |
50 |
87 |
88 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import { createRouter, createWebHistory } from 'vue-router'
2 | import HomeView from '../views/HomeView.vue'
3 | import AddCategory from '../views/Category/AddCategory.vue'
4 | import CategoryView from '../views/Category/CategoryView.vue'
5 | import ProductView from '../views/Product/ProductView.vue'
6 | import AdminView from '../views/AdminView.vue'
7 | import AddProduct from '../views/Product/AddProduct.vue'
8 | import EditCategory from '../views/Category/EditCategory.vue'
9 | import EditProduct from '../views/Product/EditProduct.vue'
10 | import ListProducts from '../views/Category/ListProducts.vue'
11 | import ShowDetails from '../views/Product/ShowDetails.vue'
12 | import WishList from '../views/Product/WishList.vue'
13 | import SignUp from '../views/SignUp.vue'
14 | import SignIn from '../views/SignIn.vue'
15 | import CartView from '../views/Product/CartView.vue'
16 | import SuccessView from '../views/payment/SuccessView.vue'
17 | import FailedView from '../views/payment/FailedView.vue'
18 | import CheckOut from '../views/Checkout/CheckOut.vue'
19 |
20 | const routes = [
21 | {
22 | path: '/',
23 | name: 'Home',
24 | component: HomeView
25 | },
26 | {
27 | path: '/category/show/:id',
28 | name: 'ListProducts',
29 | component: ListProducts
30 | },
31 | {
32 | path: '/admin/category/add',
33 | name: 'AddCategory',
34 | component: AddCategory
35 | },
36 | {
37 | path: '/admin/category',
38 | name: 'Category',
39 | component: CategoryView
40 | },
41 | {
42 | path: '/admin/category/:id',
43 | name: 'EditCategory',
44 | component: EditCategory
45 | },
46 | {
47 | path: '/admin',
48 | name: 'Admin',
49 | component: AdminView
50 | },
51 | {
52 | path: '/admin/product',
53 | name: 'AdminProduct',
54 | component: ProductView
55 | },
56 | {
57 | path: '/admin/product/new',
58 | name: 'AddProduct',
59 | component: AddProduct
60 | },
61 | {
62 | path: '/admin/product/:id',
63 | name: 'EditProduct',
64 | component: EditProduct
65 | },
66 | {
67 | path: '/product/show/:id',
68 | name: 'ShowDetails',
69 | component: ShowDetails
70 | },
71 | {
72 | path: '/signup',
73 | name: 'Signup',
74 | component: SignUp
75 | },
76 | {
77 | path: '/signin',
78 | name: 'Signin',
79 | component: SignIn
80 | },
81 | {
82 | path: '/wishlist',
83 | name: 'WishList',
84 | component: WishList
85 | },
86 | {
87 | path: '/cart',
88 | name: 'Cart',
89 | component: CartView
90 | },
91 | {
92 | path: '/payment/success',
93 | name: 'PaymentSuccess',
94 | component: SuccessView
95 | },
96 | {
97 | path: '/payment/failed',
98 | name: 'PaymentFailed',
99 | component: FailedView
100 | },
101 | {
102 | path: '/checkout',
103 | name: 'Checkout',
104 | component: CheckOut
105 | },
106 | ]
107 |
108 | const router = createRouter({
109 | history: createWebHistory(process.env.BASE_URL),
110 | routes
111 | })
112 |
113 | export default router
114 |
--------------------------------------------------------------------------------
/src/views/Product/EditProduct.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Edit Product
6 |
7 |
8 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/src/components/FooterOne.vue:
--------------------------------------------------------------------------------
1 |
2 |
77 |
78 |
79 |
82 |
83 |
--------------------------------------------------------------------------------
/src/views/SignUp.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
77 |
78 |
79 |
80 |
81 |
128 |
--------------------------------------------------------------------------------
/src/views/Product/ShowDetails.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
![]()
7 |
8 |
9 |
{{ product.name }}
10 |
{{ category.categoryName }}
11 |
$ {{ product.price }}
12 |
{{ product.description }}
13 |
14 |
20 |
21 |
24 |
25 |
26 |
27 |
Features
28 |
29 | - Lorem ipsum dolor sit amet consectetur adipisicing elit.
30 | - Officia quas, officiis eius magni error magnam voluptatem
31 | - nesciunt quod! Earum voluptatibus quaerat dolorem doloribus
32 | - molestias ipsum ab, ipsa consectetur laboriosam soluta et
33 | - ut doloremque dolore corrupti, architecto iusto beatae.
34 |
35 |
36 |
43 |
44 |
45 |
46 |
47 |
48 |
129 |
130 |
--------------------------------------------------------------------------------
/src/views/Product/CartView.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Shopping cart
6 |
7 |
8 |
9 |
14 |
15 |
16 |
17 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | {{ cartItem.product.name }}
33 |
34 |
35 |
36 | $ {{ cartItem.product.price }} per unit
37 |
38 |
39 | Quantity:
40 |
49 |
50 |
51 | Total Price:
52 |
53 | $ {{ cartItem.product.price * cartItem.quantity }}
55 |
56 |
Remove from cart
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
Total: ${{ totalcost.toFixed(2) }}
68 |
76 |
77 |
78 |
79 |
80 |
145 |
146 |
--------------------------------------------------------------------------------
/src/components/NavbarOne.vue:
--------------------------------------------------------------------------------
1 |
2 |
143 |
144 |
145 |
172 |
173 |
--------------------------------------------------------------------------------