) => {
45 | state.loading = false;
46 | state.error = action.payload;
47 | }
48 | );
49 | },
50 | });
51 |
52 | // Action creators are generated for each case reducer function
53 |
54 | export default productDetailsSlice;
55 |
--------------------------------------------------------------------------------
/src/redux/products/slice-list.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
2 | import toast from 'react-hot-toast';
3 | import { Product } from '../../components/product-card';
4 | import { setError } from '../../utils/error';
5 | import publicAxios from '../../utils/public-axios';
6 |
7 | export interface ProductSliceState {
8 | products: Product[];
9 | loading: boolean;
10 | error: null | object;
11 | }
12 |
13 | const products: Product[] | [] = [];
14 |
15 | const initialState: ProductSliceState = {
16 | products: products,
17 | loading: false,
18 | error: null,
19 | };
20 |
21 | export const getProducts = createAsyncThunk('products/list', async () => {
22 | try {
23 | const { data } = await publicAxios.get('/products');
24 | return data;
25 | } catch (error: any) {
26 | const message = setError(error);
27 | toast.error(message);
28 | }
29 | });
30 |
31 | export const productListSlice = createSlice({
32 | name: 'products-list',
33 | initialState,
34 | reducers: {},
35 | extraReducers: (builder) => {
36 | builder.addCase(getProducts.pending, (state) => {
37 | state.loading = true;
38 | });
39 | builder.addCase(getProducts.fulfilled, (state, action) => {
40 | state.loading = false;
41 | state.products = action.payload;
42 | });
43 | builder.addCase(getProducts.rejected, (state) => {
44 | state.loading = false;
45 | });
46 | },
47 | });
48 |
49 | export default productListSlice;
50 |
--------------------------------------------------------------------------------
/src/redux/users/login-slice.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, createAsyncThunk } from "@reduxjs/toolkit";
2 | import toast from "react-hot-toast";
3 | import { setError } from "../../utils/error";
4 | import publicAxios from "../../utils/public-axios";
5 |
6 | type User = {
7 | email: string;
8 | password: string;
9 | };
10 |
11 | type UserInfo = {
12 | _id: string;
13 | email: string;
14 | name: string;
15 | isAdmin: Boolean;
16 | createdAt: Date;
17 | };
18 |
19 | export interface UserSliceState {
20 | userInfo?: UserInfo | null;
21 | loading: boolean;
22 | error: null | object;
23 | }
24 |
25 | const initialState: UserSliceState = {
26 | userInfo: null,
27 | loading: false,
28 | error: null,
29 | };
30 |
31 | export const userLogin = createAsyncThunk(
32 | "users/login",
33 | async (user: User, thunkAPI) => {
34 | try {
35 | const res = await publicAxios.post("/users/login", user);
36 | if (res.data) {
37 | toast.success(`Bienvenue 👏 ${res.data.name}`);
38 | return res.data;
39 | }
40 | } catch (error: any) {
41 | const message = setError(error);
42 | toast.error(message);
43 | thunkAPI.rejectWithValue(message);
44 | }
45 | }
46 | );
47 |
48 | export const loginSlice = createSlice({
49 | name: "auth-login",
50 | initialState,
51 | reducers: {
52 | userLogout: (state: UserSliceState) => {
53 | state.userInfo = null;
54 | },
55 | },
56 | extraReducers: (builder) => {
57 | builder.addCase(userLogin.pending, (state) => {
58 | state.loading = true;
59 | });
60 | builder.addCase(userLogin.fulfilled, (state, action) => {
61 | state.loading = false;
62 | state.userInfo = action.payload;
63 | });
64 | builder.addCase(userLogin.rejected, (state) => {
65 | state.loading = false;
66 | });
67 | },
68 | });
69 |
70 | export const { userLogout } = loginSlice.actions;
71 |
72 | export default loginSlice;
73 |
--------------------------------------------------------------------------------
/src/redux/users/user-details.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
2 | import { User } from '../../utils/interfaces';
3 | import publicAxios from '../../utils/public-axios';
4 |
5 | interface ProductSliceState {
6 | user: User | null;
7 | loading: boolean;
8 | error: null | object;
9 | }
10 |
11 | const initialState: ProductSliceState = {
12 | user: null,
13 | loading: false,
14 | error: null,
15 | };
16 |
17 | export const getUserBydId = createAsyncThunk(
18 | 'users/:id',
19 | async (id: string | undefined) => {
20 | try {
21 | const res = await publicAxios.get(`/users/${id}`);
22 | if (res.data) {
23 | return res.data;
24 | }
25 | } catch (error) {}
26 | }
27 | );
28 |
29 | export const userDetailsSlice = createSlice({
30 | name: 'user-detail',
31 | initialState,
32 | reducers: {},
33 | extraReducers: (builder) => {
34 | builder.addCase(getUserBydId.pending, (state) => {
35 | // Add user to the state array
36 | state.loading = true;
37 | });
38 | builder.addCase(getUserBydId.fulfilled, (state, action) => {
39 | state.loading = false;
40 | state.user = action.payload;
41 | });
42 | builder.addCase(getUserBydId.rejected, (state) => {
43 | state.loading = false;
44 | });
45 | },
46 | });
47 |
48 | // Action creators are generated for each case reducer function
49 |
50 | export default userDetailsSlice;
51 |
--------------------------------------------------------------------------------
/src/redux/users/user-list.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, createAsyncThunk, PayloadAction } from "@reduxjs/toolkit";
2 | import toast from "react-hot-toast";
3 | import authAxios from "../../utils/auth-axios";
4 | import { setError } from "../../utils/error";
5 | import { User } from "../../utils/interfaces";
6 |
7 | interface ProductSliceState {
8 | users: User[];
9 | loading: boolean;
10 | error: null | object;
11 | pages: number;
12 | page: number;
13 | }
14 |
15 | const initialState: ProductSliceState = {
16 | users: [],
17 | pages: 1,
18 | page: 1,
19 | loading: false,
20 | error: null,
21 | };
22 |
23 | export const getUsersList = createAsyncThunk(
24 | "users/list",
25 | async (filter: any) => {
26 | try {
27 | const res = await authAxios.get(
28 | `/users?query=${filter.query}&page=${filter.page}`
29 | );
30 | if (res.data) {
31 | return res.data;
32 | }
33 | } catch (error: any) {
34 | const message = setError(error);
35 | toast.error(message);
36 | }
37 | }
38 | );
39 |
40 | export const userListSlice = createSlice({
41 | name: "user-list",
42 | initialState,
43 | reducers: {},
44 | extraReducers: (builder) => {
45 | builder.addCase(getUsersList.pending, (state) => {
46 | state.loading = true;
47 | });
48 | builder.addCase(getUsersList.fulfilled, (state, action) => {
49 | state.loading = false;
50 | state.users = action.payload.users;
51 | state.page = action.payload.page;
52 | state.pages = action.payload.pages;
53 | });
54 | builder.addCase(getUsersList.rejected, (state) => {
55 | state.loading = false;
56 | });
57 | },
58 | });
59 |
60 | // Action creators are generated for each case reducer function
61 |
62 | export default userListSlice;
63 |
--------------------------------------------------------------------------------
/src/utils/admin-provider.tsx:
--------------------------------------------------------------------------------
1 | import { Fragment, ReactNode } from 'react';
2 | import { Navigate } from 'react-router-dom';
3 | import { useAppSelector } from '../redux';
4 |
5 | type Props = {
6 | children: ReactNode;
7 | };
8 |
9 | const AdminProvider = ({ children }: Props) => {
10 | const { userInfo } = useAppSelector((state) => state.login);
11 |
12 | if (userInfo && userInfo.isAdmin) {
13 | return <>{children}>;
14 | } else {
15 | return (
16 |
17 |
18 |
19 | );
20 | }
21 | };
22 |
23 | export default AdminProvider;
24 |
--------------------------------------------------------------------------------
/src/utils/auth-axios.ts:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import { baseUrl } from './helper';
3 |
4 | const authAxios = axios.create({
5 | baseURL: `${baseUrl}/api`,
6 | });
7 |
8 | export const authorizationProvider = (store: any) => {
9 | authAxios.interceptors.request.use((config: any) => {
10 | const token = store.getState().login.userInfo.token;
11 | config.headers.Authorization = `Bearer ${token}`;
12 | return config;
13 | });
14 | };
15 |
16 | export default authAxios;
17 |
--------------------------------------------------------------------------------
/src/utils/auth-provider.tsx:
--------------------------------------------------------------------------------
1 | import { Fragment, ReactNode } from 'react';
2 | import { Navigate } from 'react-router-dom';
3 | import { useAppSelector } from '../redux';
4 |
5 | type Props = {
6 | children: ReactNode;
7 | };
8 |
9 | const AuthProvider = ({ children }: Props) => {
10 | const { userInfo } = useAppSelector((state) => state.login);
11 |
12 | if (!userInfo) {
13 | return (
14 |
15 |
16 |
17 | );
18 | } else {
19 | return <> {children} >;
20 | }
21 | };
22 |
23 | export default AuthProvider;
24 |
--------------------------------------------------------------------------------
/src/utils/error.ts:
--------------------------------------------------------------------------------
1 | type Error = {
2 | response?: {
3 | data?: {
4 | message: string;
5 | };
6 | };
7 | message?: string;
8 | };
9 |
10 | export const setError = (error: Error) => {
11 | const message =
12 | (error.response && error.response.data && error.response.data.message) ||
13 | error.message ||
14 | error.toString();
15 |
16 | return message;
17 | };
18 |
--------------------------------------------------------------------------------
/src/utils/helper.ts:
--------------------------------------------------------------------------------
1 | const CURRENCRY_FORMATTER = new Intl.NumberFormat(undefined, {
2 | currency: "USD",
3 | style: "currency",
4 | });
5 |
6 | export const formatCurrencry = (number: any) => {
7 | return CURRENCRY_FORMATTER.format(number);
8 | };
9 |
10 | export const getDate = (date: Date) => {
11 | return new Date(date).toLocaleDateString("en");
12 | };
13 |
14 | export const baseUrl = import.meta.env.VITE_API_URL;
15 |
--------------------------------------------------------------------------------
/src/utils/interfaces.ts:
--------------------------------------------------------------------------------
1 | import { Product } from '../components/product-card';
2 |
3 | export interface Ordertypes {
4 | _id: string;
5 | user: string;
6 | shippingAddress: {
7 | address: string;
8 | city: string;
9 | postalCode: string;
10 | country: string;
11 | };
12 | cartItems: Product[];
13 | totalPrice: number;
14 | isPaid: boolean;
15 | createdAt: Date;
16 | }
17 |
18 | export type ReviewTypes = {
19 | _id: string;
20 | createdAt: Date;
21 | rating: number;
22 | comment: string;
23 | name: string;
24 | user: string;
25 | };
26 |
27 | export type User = {
28 | _id: string;
29 | name: string;
30 | email: string;
31 | isAdmin: boolean;
32 | createdAt: Date;
33 | };
34 |
35 | export type AddressTypes = {
36 | address: string;
37 | city: string;
38 | postalCode: string;
39 | country: string;
40 | };
41 |
--------------------------------------------------------------------------------
/src/utils/public-axios.ts:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import { baseUrl } from './helper';
3 |
4 | const publicAxios = axios.create({
5 | baseURL: `${baseUrl}/api`,
6 | });
7 |
8 | export default publicAxios;
9 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/techstack.md:
--------------------------------------------------------------------------------
1 |
38 |
39 |
40 | # Tech Stack File
41 |  [hicmtrex/TypeShop-Frontend](https://github.com/hicmtrex/TypeShop-Frontend)
42 |
43 | |26
Tools used|01/05/24
Report generated|
44 | |------|------|
45 |
46 |
47 | ##
Languages (3)
48 |
49 |
50 |
51 |
52 | CSS 3
53 |
54 |
55 | |
56 |
57 |
58 |
59 |
60 | JavaScript
61 |
62 |
63 | |
64 |
65 |
66 |
67 |
68 | TypeScript
69 |
70 |
71 | |
72 |
73 |
74 |
75 |
76 | ##
Frameworks (4)
77 |
78 |
79 |
80 |
81 | Bootstrap
82 |
83 | v5.1.3
84 | |
85 |
86 |
87 |
88 |
89 | React
90 |
91 | v18.2.0
92 | |
93 |
94 |
95 |
96 |
97 | React Router
98 |
99 | v6.3.0
100 | |
101 |
102 |
103 |
104 |
105 | Redux
106 |
107 | v3.7.2
108 | |
109 |
110 |
111 |
112 |
113 | ##
Data (1)
114 |
115 |
116 |
117 |
118 | Redux Persist
119 |
120 | v6.0.0
121 | |
122 |
123 |
124 |
125 |
126 | ##
DevOps (3)
127 |
128 |
129 |
130 |
131 | Git
132 |
133 |
134 | |
135 |
136 |
137 |
138 |
139 | Vite
140 |
141 |
142 | |
143 |
144 |
145 |
146 |
147 | npm
148 |
149 |
150 | |
151 |
152 |
153 |
154 |
155 | ## Other (2)
156 |
157 |
158 |
159 |
160 | axios
161 |
162 | v0.27.2
163 | |
164 |
165 |
166 |
167 |
168 | yup
169 |
170 |
171 | |
172 |
173 |
174 |
175 |
176 |
177 | ##
Open source packages (13)
178 |
179 | ##
npm (13)
180 |
181 | |NAME|VERSION|LAST UPDATED|LAST UPDATED BY|LICENSE|VULNERABILITIES|
182 | |:------|:------|:------|:------|:------|:------|
183 | |[@fortawesome/free-solid-svg-icons](https://www.npmjs.com/@fortawesome/free-solid-svg-icons)|v5.15.4|06/29/22|Firstname Lastname |CC-BY-4.0,MIT|N/A|
184 | |[@fortawesome/react-fontawesome](https://www.npmjs.com/@fortawesome/react-fontawesome)|v0.1.18|02/03/23|Firstname Lastname |MIT|N/A|
185 | |[@types/react](https://www.npmjs.com/@types/react)|v18.0.14|02/03/23|Firstname Lastname |MIT|N/A|
186 | |[@types/react-dom](https://www.npmjs.com/@types/react-dom)|v18.0.5|02/03/23|Firstname Lastname |MIT|N/A|
187 | |[react-bootstrap](https://www.npmjs.com/react-bootstrap)|v2.4.0|02/03/23|Firstname Lastname |MIT|N/A|
188 | |[react-dom](https://www.npmjs.com/react-dom)|v18.2.0|02/03/23|Firstname Lastname |MIT|N/A|
189 | |[react-error-boundary](https://www.npmjs.com/react-error-boundary)|v3.1.4|02/03/23|Firstname Lastname |N/A|N/A|
190 | |[react-helmet](https://www.npmjs.com/react-helmet)|v6.1.0|02/03/23|Firstname Lastname |MIT|N/A|
191 | |[react-icons](https://www.npmjs.com/react-icons)|v4.4.0|02/03/23|Firstname Lastname |MIT|N/A|
192 | |[react-redux](https://www.npmjs.com/react-redux)|v8.0.2|02/03/23|Firstname Lastname |MIT|N/A|
193 | |[react-router-dom](https://www.npmjs.com/react-router-dom)|v6.3.0|02/03/23|Firstname Lastname |MIT|N/A|
194 | |[vite](https://www.npmjs.com/vite)|v2.9.12|07/04/22|Firstname Lastname |N/A|[CVE-2023-34092](https://github.com/advisories/GHSA-353f-5xf4-qw67) (High)
[CVE-2022-35204](https://github.com/advisories/GHSA-mv48-hcvh-8jj8) (Moderate)|
195 | |[yup](https://www.npmjs.com/yup)|v0.32.11|06/29/22|Firstname Lastname |MIT|N/A|
196 |
197 |
198 |
199 |
200 | Generated via [Stack File](https://github.com/marketplace/stack-file)
201 |
--------------------------------------------------------------------------------
/techstack.yml:
--------------------------------------------------------------------------------
1 | repo_name: hicmtrex/TypeShop-Frontend
2 | report_id: ffe31342850035f1657c88fc916329c4
3 | version: 0.1
4 | repo_type: Public
5 | timestamp: '2024-01-05T08:17:44+00:00'
6 | requested_by: hicmtrex
7 | provider: github
8 | branch: main
9 | detected_tools_count: 26
10 | tools:
11 | - name: CSS 3
12 | description: The latest evolution of the Cascading Style Sheets language
13 | website_url: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS3
14 | open_source: true
15 | hosted_saas: false
16 | category: Languages & Frameworks
17 | sub_category: Languages
18 | image_url: https://img.stackshare.io/service/6727/css.png
19 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend
20 | detection_source: Repo Metadata
21 | - name: JavaScript
22 | description: Lightweight, interpreted, object-oriented language with first-class
23 | functions
24 | website_url: https://developer.mozilla.org/en-US/docs/Web/JavaScript
25 | open_source: true
26 | hosted_saas: false
27 | category: Languages & Frameworks
28 | sub_category: Languages
29 | image_url: https://img.stackshare.io/service/1209/javascript.jpeg
30 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package.json
31 | detection_source: package.json
32 | last_updated_by: Firstname Lastname
33 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
34 | - name: TypeScript
35 | description: A superset of JavaScript that compiles to clean JavaScript output
36 | website_url: http://www.typescriptlang.org
37 | license: Apache-2.0
38 | open_source: true
39 | hosted_saas: false
40 | category: Languages & Frameworks
41 | sub_category: Languages
42 | image_url: https://img.stackshare.io/service/1612/bynNY5dJ.jpg
43 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend
44 | detection_source: Repo Metadata
45 | - name: Bootstrap
46 | description: Simple and flexible HTML, CSS, and JS for popular UI components and
47 | interactions
48 | website_url: http://getbootstrap.com/
49 | version: 5.1.3
50 | license: MIT
51 | open_source: true
52 | hosted_saas: false
53 | category: Languages & Frameworks
54 | sub_category: Front-End Frameworks
55 | image_url: https://img.stackshare.io/service/1101/C9QJ7V3X.png
56 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
57 | detection_source: package.json
58 | last_updated_by: Firstname Lastname
59 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
60 | - name: React
61 | description: A JavaScript library for building user interfaces
62 | website_url: https://reactjs.org/
63 | version: 18.2.0
64 | license: MIT
65 | open_source: true
66 | hosted_saas: false
67 | category: Libraries
68 | sub_category: Javascript UI Libraries
69 | image_url: https://img.stackshare.io/service/1020/OYIaJ1KK.png
70 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
71 | detection_source: package.json
72 | last_updated_by: Firstname Lastname
73 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
74 | - name: React Router
75 | description: A complete routing solution for React.js
76 | website_url: https://github.com/rackt/react-router
77 | version: 6.3.0
78 | license: MIT
79 | open_source: true
80 | hosted_saas: false
81 | category: Libraries
82 | sub_category: JavaScript Framework Components
83 | image_url: https://img.stackshare.io/service/3350/8261421.png
84 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
85 | detection_source: package.json
86 | last_updated_by: Firstname Lastname
87 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
88 | - name: Redux
89 | description: Predictable state container for JavaScript apps
90 | website_url: https://redux.js.org/
91 | version: 3.7.2
92 | open_source: true
93 | hosted_saas: false
94 | category: Libraries
95 | sub_category: State Management Library
96 | image_url: https://img.stackshare.io/service/4074/13142323.png
97 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
98 | detection_source: package.json
99 | last_updated_by: Firstname Lastname
100 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
101 | - name: Redux Persist
102 | description: A library to persist and rehydrate a redux store
103 | website_url: https://github.com/rt2zz/redux-persist
104 | version: 6.0.0
105 | license: MIT
106 | open_source: true
107 | hosted_saas: false
108 | category: Data Stores
109 | sub_category: Javascript Utilities & Libraries
110 | image_url: https://img.stackshare.io/service/6740/no-img-open-source.png
111 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
112 | detection_source: package.json
113 | last_updated_by: Firstname Lastname
114 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
115 | - name: Git
116 | description: Fast, scalable, distributed revision control system
117 | website_url: http://git-scm.com/
118 | open_source: true
119 | hosted_saas: false
120 | category: Build, Test, Deploy
121 | sub_category: Version Control System
122 | image_url: https://img.stackshare.io/service/1046/git.png
123 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend
124 | detection_source: Repo Metadata
125 | - name: Vite
126 | description: Native-ESM powered web dev build tool
127 | website_url: https://vitejs.dev/
128 | license: MIT
129 | open_source: true
130 | hosted_saas: false
131 | category: Build, Test, Deploy
132 | sub_category: JS Build Tools / JS Task Runners
133 | image_url: https://img.stackshare.io/service/21547/default_1aeac791cde11ff66cc0b20dcc6144eeb185c905.png
134 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package.json
135 | detection_source: package.json
136 | last_updated_by: Firstname Lastname
137 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
138 | - name: npm
139 | description: The package manager for JavaScript.
140 | website_url: https://www.npmjs.com/
141 | open_source: false
142 | hosted_saas: false
143 | category: Build, Test, Deploy
144 | sub_category: Front End Package Manager
145 | image_url: https://img.stackshare.io/service/1120/lejvzrnlpb308aftn31u.png
146 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package.json
147 | detection_source: package.json
148 | last_updated_by: Firstname Lastname
149 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
150 | - name: axios
151 | description: Promise based HTTP client for the browser and node.js
152 | website_url: https://github.com/mzabriskie/axios
153 | version: 0.27.2
154 | license: MIT
155 | open_source: true
156 | hosted_saas: false
157 | category: Libraries
158 | sub_category: Javascript Utilities & Libraries
159 | image_url: https://img.stackshare.io/no-img-open-source.png
160 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
161 | detection_source: package.json
162 | last_updated_by: Firstname Lastname
163 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
164 | - name: yup
165 | website_url: https://github.com/jquense/yup
166 | open_source: false
167 | hosted_saas: false
168 | image_url: https://img.stackshare.io/service/10756/339286.png
169 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package.json
170 | detection_source: package.json
171 | last_updated_by: Firstname Lastname
172 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
173 | - name: "@fortawesome/free-solid-svg-icons"
174 | description: The iconic font, CSS, and SVG framework
175 | package_url: https://www.npmjs.com/@fortawesome/free-solid-svg-icons
176 | version: 5.15.4
177 | license: CC-BY-4.0,MIT
178 | open_source: true
179 | hosted_saas: false
180 | category: Libraries
181 | sub_category: npm Packages
182 | image_url: https://img.stackshare.io/package/16683/default_6dad4e42e12d47cc6edfbdea036dae12f91abebb.png
183 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
184 | detection_source: package.json
185 | last_updated_by: Firstname Lastname
186 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
187 | - name: "@fortawesome/react-fontawesome"
188 | description: Official React component for Font Awesome 5
189 | package_url: https://www.npmjs.com/@fortawesome/react-fontawesome
190 | version: 0.1.18
191 | license: MIT
192 | open_source: true
193 | hosted_saas: false
194 | category: Libraries
195 | sub_category: npm Packages
196 | image_url: https://img.stackshare.io/package/16936/default_277303773c2bdb575ee8f4bfe869f0a33d6755b2.png
197 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
198 | detection_source: package.json
199 | last_updated_by: Firstname Lastname
200 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
201 | - name: "@types/react"
202 | description: TypeScript definitions for React
203 | package_url: https://www.npmjs.com/@types/react
204 | version: 18.0.14
205 | license: MIT
206 | open_source: true
207 | hosted_saas: false
208 | category: Libraries
209 | sub_category: npm Packages
210 | image_url: https://img.stackshare.io/package/15894/default_1d65e37e65b7f80761374f0202776043277d505d.png
211 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
212 | detection_source: package.json
213 | last_updated_by: Firstname Lastname
214 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
215 | - name: "@types/react-dom"
216 | description: TypeScript definitions for React
217 | package_url: https://www.npmjs.com/@types/react-dom
218 | version: 18.0.5
219 | license: MIT
220 | open_source: true
221 | hosted_saas: false
222 | category: Libraries
223 | sub_category: npm Packages
224 | image_url: https://img.stackshare.io/package/15946/default_54b691c123fc8979741e800e4dcd3936c0f3b246.png
225 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
226 | detection_source: package.json
227 | last_updated_by: Firstname Lastname
228 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
229 | - name: react-bootstrap
230 | description: Bootstrap 3 components built with React
231 | package_url: https://www.npmjs.com/react-bootstrap
232 | version: 2.4.0
233 | license: MIT
234 | open_source: true
235 | hosted_saas: false
236 | category: Libraries
237 | sub_category: npm Packages
238 | image_url: https://img.stackshare.io/package/16383/default_92302d1bbf4c0f67b862869662b4f69002c94aad.png
239 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
240 | detection_source: package.json
241 | last_updated_by: Firstname Lastname
242 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
243 | - name: react-dom
244 | description: React package for working with the DOM
245 | package_url: https://www.npmjs.com/react-dom
246 | version: 18.2.0
247 | license: MIT
248 | open_source: true
249 | hosted_saas: false
250 | category: Libraries
251 | sub_category: npm Packages
252 | image_url: https://img.stackshare.io/package/15808/default_14fd11531839d935f920b6d55bd6f3528c890ad7.png
253 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
254 | detection_source: package.json
255 | last_updated_by: Firstname Lastname
256 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
257 | - name: react-error-boundary
258 | description: Simple reusable React error boundary component
259 | package_url: https://www.npmjs.com/react-error-boundary
260 | version: 3.1.4
261 | open_source: false
262 | hosted_saas: false
263 | category: Build, Test, Deploy
264 | sub_category: Package Managers
265 | image_url: https://img.stackshare.io/package/npm/image.png
266 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
267 | detection_source: package.json
268 | last_updated_by: Firstname Lastname
269 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
270 | - name: react-helmet
271 | description: A document head manager for React
272 | package_url: https://www.npmjs.com/react-helmet
273 | version: 6.1.0
274 | license: MIT
275 | open_source: true
276 | hosted_saas: false
277 | category: Libraries
278 | sub_category: npm Packages
279 | image_url: https://img.stackshare.io/package/16513/default_4e3259350c525d1d859fa80a938000081d7c9db8.png
280 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
281 | detection_source: package.json
282 | last_updated_by: Firstname Lastname
283 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
284 | - name: react-icons
285 | description: SVG React icons of popular icon packs using ES6 imports
286 | package_url: https://www.npmjs.com/react-icons
287 | version: 4.4.0
288 | license: MIT
289 | open_source: true
290 | hosted_saas: false
291 | category: Libraries
292 | sub_category: npm Packages
293 | image_url: https://img.stackshare.io/package/16909/default_7b9968788548874538c601457e8dcd9c74bd2051.png
294 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
295 | detection_source: package.json
296 | last_updated_by: Firstname Lastname
297 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
298 | - name: react-redux
299 | description: Official React bindings for Redux
300 | package_url: https://www.npmjs.com/react-redux
301 | version: 8.0.2
302 | license: MIT
303 | open_source: true
304 | hosted_saas: false
305 | category: Libraries
306 | sub_category: npm Packages
307 | image_url: https://img.stackshare.io/package/15984/default_f49d4c116f8ea0155f4d92673b084378bba02760.png
308 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
309 | detection_source: package.json
310 | last_updated_by: Firstname Lastname
311 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
312 | - name: react-router-dom
313 | description: DOM bindings for React Router
314 | package_url: https://www.npmjs.com/react-router-dom
315 | version: 6.3.0
316 | license: MIT
317 | open_source: true
318 | hosted_saas: false
319 | category: Libraries
320 | sub_category: npm Packages
321 | image_url: https://img.stackshare.io/package/16025/default_e25d1fbb04a118c79fb444294461417342bd03bf.png
322 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
323 | detection_source: package.json
324 | last_updated_by: Firstname Lastname
325 | last_updated_on: 2023-02-03 15:16:02.000000000 Z
326 | - name: vite
327 | description: Native-ESM powered web dev build tool
328 | package_url: https://www.npmjs.com/vite
329 | version: 2.9.12
330 | open_source: false
331 | hosted_saas: false
332 | category: Build, Test, Deploy
333 | sub_category: Package Managers
334 | image_url: https://img.stackshare.io/package/npm/image.png
335 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
336 | detection_source: package.json
337 | last_updated_by: Firstname Lastname
338 | last_updated_on: 2022-07-04 00:57:11.000000000 Z
339 | vulnerabilities:
340 | - name: Vite Server Options (server.fs.deny) can be bypassed using double forward-slash
341 | (//)
342 | cve_id: CVE-2023-34092
343 | cve_url: https://github.com/advisories/GHSA-353f-5xf4-qw67
344 | detected_date: Nov 23
345 | severity: high
346 | first_patched: 2.9.16
347 | - name: Vitejs Vite before v2.9.13 vulnerable to directory traversal via crafted
348 | URL to victim's service
349 | cve_id: CVE-2022-35204
350 | cve_url: https://github.com/advisories/GHSA-mv48-hcvh-8jj8
351 | detected_date: Nov 23
352 | severity: moderate
353 | first_patched: 2.9.13
354 | - name: yup
355 | description: Dead simple Object schema validation
356 | package_url: https://www.npmjs.com/yup
357 | version: 0.32.11
358 | license: MIT
359 | open_source: true
360 | hosted_saas: false
361 | category: Libraries
362 | sub_category: npm Packages
363 | image_url: https://img.stackshare.io/package/17215/default_37d9ccc57ae4d32e7ff46614e4f8bb2c4ddc7964.png
364 | detection_source_url: https://github.com/hicmtrex/TypeShop-Frontend/blob/main/package-lock.json
365 | detection_source: package.json
366 | last_updated_by: Firstname Lastname
367 | last_updated_on: 2022-06-29 16:20:27.000000000 Z
368 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "useDefineForClassFields": true,
5 | "lib": ["DOM", "DOM.Iterable", "ESNext"],
6 | "allowJs": false,
7 | "skipLibCheck": true,
8 | "esModuleInterop": false,
9 | "allowSyntheticDefaultImports": true,
10 | "strict": true,
11 | "forceConsistentCasingInFileNames": true,
12 | "module": "ESNext",
13 | "moduleResolution": "Node",
14 | "resolveJsonModule": true,
15 | "isolatedModules": true,
16 | "noEmit": true,
17 | "jsx": "react-jsx"
18 | },
19 | "include": ["src"],
20 | "references": [{ "path": "./tsconfig.node.json" }]
21 | }
22 |
--------------------------------------------------------------------------------
/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "module": "esnext",
5 | "moduleResolution": "node"
6 | },
7 | "include": ["vite.config.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()]
7 | })
8 |
--------------------------------------------------------------------------------