├── backend ├── .gitignore ├── config │ ├── index.js │ └── passport.js ├── libs │ └── db-connection.js ├── README.md ├── server.js ├── package.json ├── validation │ ├── login.js │ ├── update.js │ └── register.js └── models │ └── User.js └── frontend ├── public ├── _redirects ├── assets │ ├── preview.jpg │ ├── transparent.png │ ├── images │ │ ├── covers │ │ │ ├── cover_1.jpg │ │ │ ├── cover_2.jpg │ │ │ ├── cover_3.jpg │ │ │ ├── cover_4.jpg │ │ │ ├── cover_5.jpg │ │ │ ├── cover_6.jpg │ │ │ ├── cover_7.jpg │ │ │ ├── cover_8.jpg │ │ │ ├── cover_9.jpg │ │ │ ├── cover_10.jpg │ │ │ ├── cover_11.jpg │ │ │ ├── cover_12.jpg │ │ │ ├── cover_13.jpg │ │ │ ├── cover_14.jpg │ │ │ ├── cover_15.jpg │ │ │ ├── cover_16.jpg │ │ │ ├── cover_17.jpg │ │ │ ├── cover_18.jpg │ │ │ ├── cover_19.jpg │ │ │ ├── cover_20.jpg │ │ │ ├── cover_21.jpg │ │ │ ├── cover_22.jpg │ │ │ ├── cover_23.jpg │ │ │ └── cover_24.jpg │ │ ├── avatars │ │ │ ├── avatar_1.jpg │ │ │ ├── avatar_2.jpg │ │ │ ├── avatar_3.jpg │ │ │ ├── avatar_4.jpg │ │ │ ├── avatar_5.jpg │ │ │ ├── avatar_6.jpg │ │ │ ├── avatar_7.jpg │ │ │ ├── avatar_8.jpg │ │ │ ├── avatar_9.jpg │ │ │ ├── avatar_10.jpg │ │ │ ├── avatar_11.jpg │ │ │ ├── avatar_12.jpg │ │ │ ├── avatar_13.jpg │ │ │ ├── avatar_14.jpg │ │ │ ├── avatar_15.jpg │ │ │ ├── avatar_16.jpg │ │ │ ├── avatar_17.jpg │ │ │ ├── avatar_18.jpg │ │ │ ├── avatar_19.jpg │ │ │ ├── avatar_20.jpg │ │ │ ├── avatar_21.jpg │ │ │ ├── avatar_22.jpg │ │ │ ├── avatar_23.jpg │ │ │ ├── avatar_24.jpg │ │ │ └── avatar_default.jpg │ │ └── products │ │ │ ├── product_1.jpg │ │ │ ├── product_10.jpg │ │ │ ├── product_11.jpg │ │ │ ├── product_12.jpg │ │ │ ├── product_13.jpg │ │ │ ├── product_14.jpg │ │ │ ├── product_15.jpg │ │ │ ├── product_16.jpg │ │ │ ├── product_17.jpg │ │ │ ├── product_18.jpg │ │ │ ├── product_19.jpg │ │ │ ├── product_2.jpg │ │ │ ├── product_20.jpg │ │ │ ├── product_21.jpg │ │ │ ├── product_22.jpg │ │ │ ├── product_23.jpg │ │ │ ├── product_24.jpg │ │ │ ├── product_3.jpg │ │ │ ├── product_4.jpg │ │ │ ├── product_5.jpg │ │ │ ├── product_6.jpg │ │ │ ├── product_7.jpg │ │ │ ├── product_8.jpg │ │ │ └── product_9.jpg │ ├── illustrations │ │ ├── illustration_avatar.png │ │ └── illustration_login.png │ ├── icons │ │ ├── shape-avatar.svg │ │ ├── ic_flag_fr.svg │ │ ├── navbar │ │ │ ├── ic_disabled.svg │ │ │ ├── ic_user.svg │ │ │ ├── ic_blog.svg │ │ │ ├── ic_lock.svg │ │ │ ├── ic_cart.svg │ │ │ └── ic_analytics.svg │ │ ├── ic_flag_en.svg │ │ ├── ic_flag_de.svg │ │ ├── ic_notification_mail.svg │ │ ├── ic_notification_shipping.svg │ │ ├── ic_notification_chat.svg │ │ └── ic_notification_package.svg │ ├── placeholder.svg │ └── logo.svg ├── favicon │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ └── android-chrome-512x512.png ├── manifest.json └── index.html ├── src ├── components │ ├── label │ │ ├── index.js │ │ ├── Label.js │ │ └── styles.js │ ├── logo │ │ ├── index.js │ │ └── Logo.js │ ├── iconify │ │ ├── index.js │ │ └── Iconify.js │ ├── nav-section │ │ ├── index.js │ │ └── styles.js │ ├── scrollbar │ │ ├── index.js │ │ ├── styles.js │ │ └── Scrollbar.js │ ├── svg-color │ │ ├── index.js │ │ └── SvgColor.js │ ├── scroll-to-top │ │ ├── index.js │ │ └── ScrollToTop.js │ ├── color-utils │ │ ├── index.js │ │ ├── ColorSinglePicker.js │ │ ├── ColorPreview.js │ │ ├── ColorMultiPicker.js │ │ └── Icon.js │ └── chart │ │ ├── index.js │ │ └── styles.js ├── layouts │ ├── simple │ │ ├── index.js │ │ └── SimpleLayout.js │ └── dashboard │ │ ├── index.js │ │ ├── nav │ │ └── config.js │ │ ├── DashboardLayout.js │ │ └── header │ │ ├── index.js │ │ ├── Searchbar.js │ │ ├── LanguagePopover.js │ │ └── AccountPopover.js ├── sections │ ├── Error │ │ ├── Error.css │ │ └── Error.jsx │ ├── auth │ │ └── login │ │ │ ├── index.js │ │ │ └── login.js │ └── @dashboard │ │ ├── user │ │ ├── index.js │ │ ├── UserListHead.js │ │ └── UserListToolbar.js │ │ ├── blog │ │ ├── index.js │ │ ├── BlogPostsSort.js │ │ └── BlogPostsSearch.js │ │ ├── products │ │ ├── index.js │ │ ├── ProductList.js │ │ ├── ProductCartWidget.js │ │ ├── ProductSort.js │ │ └── ProductCard.js │ │ └── app │ │ ├── index.js │ │ ├── AppTrafficBySite.js │ │ ├── AppWebsiteVisits.js │ │ ├── AppConversionRates.js │ │ ├── AppWidgetSummary.js │ │ ├── AppCurrentSubject.js │ │ ├── AppOrderTimeline.js │ │ ├── AppNewsUpdate.js │ │ └── AppCurrentVisits.js ├── pages │ ├── style.css │ ├── ProductsPage.js │ ├── BlogPage.js │ ├── Page404.js │ ├── ProfilePage.js │ ├── LoginPage.js │ ├── RegisterPage.js │ ├── styles │ │ └── styles.css │ └── EditPage.js ├── style.css ├── utils │ ├── setAuthToken.js │ ├── formatTime.js │ ├── formatNumber.js │ └── cssStyles.js ├── _mock │ ├── account.js │ ├── Dashboards.js │ ├── user.js │ ├── blog.js │ └── products.js ├── redux │ ├── actions │ │ ├── types.js │ │ └── authActions.js │ ├── reducers │ │ ├── errorReducer.js │ │ ├── getReducer.js │ │ ├── updateReducer.js │ │ ├── checkedReducer.js │ │ ├── authReducer.js │ │ └── index.js │ └── store.js ├── theme │ ├── overrides │ │ ├── Autocomplete.js │ │ ├── Paper.js │ │ ├── Table.js │ │ ├── Tooltip.js │ │ ├── Typography.js │ │ ├── Backdrop.js │ │ ├── index.js │ │ ├── Card.js │ │ ├── Button.js │ │ └── Input.js │ ├── index.js │ ├── customShadows.js │ ├── globalStyles.js │ ├── palette.js │ ├── typography.js │ └── shadows.js ├── reportWebVitals.js ├── index.js ├── App.js ├── hooks │ └── useResponsive.js └── routes.js ├── .prettierrc ├── jsconfig.json ├── .gitignore ├── LICENSE.md ├── CHANGELOG.md ├── README.md ├── .eslintrc └── package.json /backend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /frontend/public/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 -------------------------------------------------------------------------------- /frontend/src/components/label/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './Label'; 2 | -------------------------------------------------------------------------------- /frontend/src/components/logo/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './Logo'; 2 | -------------------------------------------------------------------------------- /frontend/src/components/iconify/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './Iconify'; 2 | -------------------------------------------------------------------------------- /frontend/src/layouts/simple/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './SimpleLayout'; 2 | -------------------------------------------------------------------------------- /frontend/src/components/nav-section/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './NavSection'; 2 | -------------------------------------------------------------------------------- /frontend/src/components/scrollbar/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './Scrollbar'; 2 | -------------------------------------------------------------------------------- /frontend/src/components/svg-color/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './SvgColor'; 2 | -------------------------------------------------------------------------------- /frontend/src/layouts/dashboard/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './DashboardLayout'; 2 | -------------------------------------------------------------------------------- /frontend/src/components/scroll-to-top/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './ScrollToTop'; 2 | -------------------------------------------------------------------------------- /frontend/src/sections/Error/Error.css: -------------------------------------------------------------------------------- 1 | .Error-Output { 2 | color: red; 3 | font-size: 12px; 4 | padding: 3px 15px; 5 | } -------------------------------------------------------------------------------- /backend/config/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | MONGO_URL: "mongodb://localhost:27017/tmp", 3 | jwtSecret: "abc123", 4 | }; 5 | -------------------------------------------------------------------------------- /frontend/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "trailingComma": "es5", 5 | "tabWidth": 2 6 | } 7 | -------------------------------------------------------------------------------- /frontend/public/assets/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/preview.jpg -------------------------------------------------------------------------------- /frontend/public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/favicon/favicon.ico -------------------------------------------------------------------------------- /frontend/public/assets/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/transparent.png -------------------------------------------------------------------------------- /frontend/src/pages/style.css: -------------------------------------------------------------------------------- 1 | html, body, #root, #root > div { 2 | height: 100%; 3 | margin: 0; 4 | box-sizing: border-box; 5 | } -------------------------------------------------------------------------------- /frontend/public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /frontend/public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /frontend/public/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_1.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_2.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_3.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_4.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_5.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_6.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_7.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_8.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_9.jpg -------------------------------------------------------------------------------- /frontend/src/sections/auth/login/index.js: -------------------------------------------------------------------------------- 1 | export { default as LoginForm } from './LoginForm'; 2 | export { default as RegisterForm } from './RegisterForm'; 3 | -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_1.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_2.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_3.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_4.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_5.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_6.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_7.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_8.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_9.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_10.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_11.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_12.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_13.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_14.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_15.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_16.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_17.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_18.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_19.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_20.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_21.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_22.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_23.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/covers/cover_24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/covers/cover_24.jpg -------------------------------------------------------------------------------- /frontend/public/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /frontend/public/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_10.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_11.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_12.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_13.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_14.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_15.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_16.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_17.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_18.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_19.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_20.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_21.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_22.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_23.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_24.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_1.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_10.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_11.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_12.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_13.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_14.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_15.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_16.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_17.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_18.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_19.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_2.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_20.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_21.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_22.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_23.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_24.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_3.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_4.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_5.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_6.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_7.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_8.jpg -------------------------------------------------------------------------------- /frontend/public/assets/images/products/product_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/products/product_9.jpg -------------------------------------------------------------------------------- /frontend/src/style.css: -------------------------------------------------------------------------------- 1 | html, body, #root, #root > div { 2 | height: 100%; 3 | margin: 0; 4 | box-sizing: border-box; 5 | background-repeat: repeat; 6 | } -------------------------------------------------------------------------------- /frontend/src/sections/@dashboard/user/index.js: -------------------------------------------------------------------------------- 1 | export { default as UserListHead } from './UserListHead'; 2 | export { default as UserListToolbar } from './UserListToolbar'; 3 | -------------------------------------------------------------------------------- /frontend/public/assets/images/avatars/avatar_default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/images/avatars/avatar_default.jpg -------------------------------------------------------------------------------- /frontend/public/assets/illustrations/illustration_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/illustrations/illustration_avatar.png -------------------------------------------------------------------------------- /frontend/public/assets/illustrations/illustration_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/Social_Dashboard/master/frontend/public/assets/illustrations/illustration_login.png -------------------------------------------------------------------------------- /frontend/src/sections/Error/Error.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './Error.css'; 3 | 4 | const Error = props =>
{ props.children }
; 5 | 6 | export default Error; 7 | -------------------------------------------------------------------------------- /frontend/src/sections/@dashboard/blog/index.js: -------------------------------------------------------------------------------- 1 | export { default as BlogPostCard } from './BlogPostCard'; 2 | export { default as BlogPostsSearch } from './BlogPostsSearch'; 3 | export { default as BlogPostsSort } from './BlogPostsSort'; 4 | -------------------------------------------------------------------------------- /frontend/src/components/color-utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as ColorPreview } from './ColorPreview'; 2 | export { default as ColorMultiPicker } from './ColorMultiPicker'; 3 | export { default as ColorSinglePicker } from './ColorSinglePicker'; 4 | -------------------------------------------------------------------------------- /frontend/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "baseUrl": "." 6 | }, 7 | "include": [ 8 | "src/**/*" 9 | ], 10 | "exclude": [ 11 | "node_modules" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /frontend/src/utils/setAuthToken.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const setAuthToken = (token) => { 4 | if (token) axios.defaults.headers.common.Authorization = token; 5 | else delete axios.defaults.headers.common.Authorization; 6 | }; 7 | 8 | export default setAuthToken; 9 | -------------------------------------------------------------------------------- /frontend/src/_mock/account.js: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------- 2 | 3 | const account = { 4 | displayName: 'Jaydon Frankie', 5 | email: 'demo@minimals.cc', 6 | photoURL: '/assets/images/avatars/avatar_default.jpg', 7 | }; 8 | 9 | export default account; 10 | -------------------------------------------------------------------------------- /frontend/src/redux/actions/types.js: -------------------------------------------------------------------------------- 1 | export const TEST_DISPATCH = 'TEST_DISPATCH'; 2 | export const GET_ERRORS = 'GET_ERRORS'; 3 | export const SET_CURRENT_USER = 'SET_CURRENT_USER'; 4 | export const CHECKED_USER = 'CHECKED_USER'; 5 | export const UPDATE_USER = 'UPDATE_USER'; 6 | export const GET_USER = 'GET_USER'; -------------------------------------------------------------------------------- /frontend/src/components/chart/index.js: -------------------------------------------------------------------------------- 1 | import Chart from 'react-apexcharts'; 2 | 3 | // ---------------------------------------------------------------------- 4 | 5 | export { default as StyledChart } from './styles'; 6 | 7 | export { default as useChart } from './useChart'; 8 | 9 | export default Chart; 10 | -------------------------------------------------------------------------------- /frontend/public/assets/icons/shape-avatar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/redux/reducers/errorReducer.js: -------------------------------------------------------------------------------- 1 | import { GET_ERRORS } from "../actions/types"; 2 | 3 | const initialState = {}; 4 | 5 | export default (state = initialState, action) => { 6 | switch (action.type) { 7 | case GET_ERRORS: 8 | return action.payload; 9 | default: 10 | return state; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /frontend/src/sections/@dashboard/products/index.js: -------------------------------------------------------------------------------- 1 | export { default as ProductCard } from './ProductCard'; 2 | export { default as ProductList } from './ProductList'; 3 | export { default as ProductSort } from './ProductSort'; 4 | export { default as ProductCartWidget } from './ProductCartWidget'; 5 | export { default as ProductFilterSidebar } from './ProductFilterSidebar'; 6 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/Autocomplete.js: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------- 2 | 3 | export default function Autocomplete(theme) { 4 | return { 5 | MuiAutocomplete: { 6 | styleOverrides: { 7 | paper: { 8 | boxShadow: theme.customShadows.z20, 9 | }, 10 | }, 11 | }, 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /frontend/src/redux/store.js: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit'; 2 | import thunk from 'redux-thunk'; 3 | import rootReducer from './reducers'; 4 | 5 | const store = configureStore({ 6 | reducer: rootReducer, 7 | middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(thunk), 8 | devTools: process.env.NODE_ENV !== 'production', 9 | }); 10 | 11 | export default store; 12 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/Paper.js: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------- 2 | 3 | export default function Paper() { 4 | return { 5 | MuiPaper: { 6 | defaultProps: { 7 | elevation: 0, 8 | }, 9 | styleOverrides: { 10 | root: { 11 | backgroundImage: 'none', 12 | }, 13 | }, 14 | }, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/src/redux/reducers/getReducer.js: -------------------------------------------------------------------------------- 1 | import { GET_USER } from '../actions/types'; 2 | 3 | const initialState = { 4 | user: {}, 5 | }; 6 | 7 | export default (state = initialState, action) => { 8 | switch (action.type) { 9 | case GET_USER: 10 | return { 11 | ...state, 12 | user: action.payload, 13 | }; 14 | default: 15 | return state; 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/Table.js: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------- 2 | 3 | export default function Table(theme) { 4 | return { 5 | MuiTableCell: { 6 | styleOverrides: { 7 | head: { 8 | color: theme.palette.text.secondary, 9 | backgroundColor: theme.palette.background.neutral, 10 | }, 11 | }, 12 | }, 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /frontend/src/components/scroll-to-top/ScrollToTop.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | import { useLocation } from 'react-router-dom'; 3 | 4 | // ---------------------------------------------------------------------- 5 | 6 | export default function ScrollToTop() { 7 | const { pathname } = useLocation(); 8 | 9 | useEffect(() => { 10 | window.scrollTo(0, 0); 11 | }, [pathname]); 12 | 13 | return null; 14 | } 15 | -------------------------------------------------------------------------------- /frontend/public/assets/placeholder.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = (onPerfEntry) => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/Tooltip.js: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------- 2 | 3 | export default function Tooltip(theme) { 4 | return { 5 | MuiTooltip: { 6 | styleOverrides: { 7 | tooltip: { 8 | backgroundColor: theme.palette.grey[800], 9 | }, 10 | arrow: { 11 | color: theme.palette.grey[800], 12 | }, 13 | }, 14 | }, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/Typography.js: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------- 2 | 3 | export default function Typography(theme) { 4 | return { 5 | MuiTypography: { 6 | styleOverrides: { 7 | paragraph: { 8 | marginBottom: theme.spacing(2), 9 | }, 10 | gutterBottom: { 11 | marginBottom: theme.spacing(1), 12 | }, 13 | }, 14 | }, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /frontend/src/redux/reducers/updateReducer.js: -------------------------------------------------------------------------------- 1 | import { UPDATE_USER } from '../actions/types'; 2 | 3 | // const currentUser = await axios.get('http://localhost:5000/api/users/register'); 4 | 5 | const initialState = {} 6 | 7 | export default (state = initialState, action) => { 8 | switch (action.type) { 9 | case UPDATE_USER: 10 | return { 11 | user: action.payload 12 | }; 13 | default: 14 | return state; 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /backend/libs/db-connection.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const { MONGO_URL } = require('../config/index'); 3 | // Allow Promises 4 | mongoose.Promise = global.Promise; 5 | // Connection 6 | mongoose.connect(MONGO_URL, { useNewUrlParser: true }); 7 | // Validation 8 | mongoose.connection 9 | .on('open', () => console.info('Database connected!')) 10 | .on('error', err => console.info('Create a database and put the link into config/index.js/MONGO_URL')); -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | /.env 17 | /.env.local 18 | /.env.development.local 19 | /.env.test.local 20 | /.env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | .eslintcache 27 | -------------------------------------------------------------------------------- /frontend/public/assets/icons/ic_flag_fr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/redux/reducers/checkedReducer.js: -------------------------------------------------------------------------------- 1 | import { CHECKED_USER } from "../actions/types"; 2 | 3 | const initialState = { 4 | checked: false, 5 | password: '', 6 | }; 7 | 8 | export default (state = initialState, action) => { 9 | switch (action.type) { 10 | case CHECKED_USER: 11 | return { 12 | ...state, 13 | checked: action.payload.result, 14 | password: action.payload.pwd, 15 | }; 16 | default: 17 | return state; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/Backdrop.js: -------------------------------------------------------------------------------- 1 | import { alpha } from '@mui/material/styles'; 2 | 3 | // ---------------------------------------------------------------------- 4 | 5 | export default function Backdrop(theme) { 6 | return { 7 | MuiBackdrop: { 8 | styleOverrides: { 9 | root: { 10 | backgroundColor: alpha(theme.palette.grey[800], 0.8), 11 | }, 12 | invisible: { 13 | background: 'transparent', 14 | }, 15 | }, 16 | }, 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /frontend/src/redux/reducers/authReducer.js: -------------------------------------------------------------------------------- 1 | import { SET_CURRENT_USER } from '../actions/types'; 2 | 3 | const initialState = { 4 | isAuthenticated: false, 5 | user: {}, 6 | }; 7 | 8 | export default (state = initialState, action) => { 9 | switch (action.type) { 10 | case SET_CURRENT_USER: 11 | return { 12 | ...state, 13 | isAuthenticated: Object.keys(action.payload).length > 0, 14 | user: action.payload, 15 | }; 16 | default: 17 | return state; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /frontend/src/redux/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import authReducer from './authReducer'; 3 | import errorReducer from './errorReducer'; 4 | import checkedReducer from './checkedReducer'; 5 | import updateReducer from './updateReducer'; 6 | import getReducer from './getReducer'; 7 | 8 | const rootReducer = combineReducers({ 9 | auth: authReducer, 10 | checked: checkedReducer, 11 | errors: errorReducer, 12 | update: updateReducer, 13 | get: getReducer, 14 | }); 15 | 16 | export default rootReducer; -------------------------------------------------------------------------------- /frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Minimal App", 3 | "name": "React Material Minimal UI Kit", 4 | "icons": [ 5 | { 6 | "src": "favicon/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "favicon/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": ".", 17 | "display": "standalone", 18 | "theme_color": "#000000", 19 | "background_color": "#ffffff" 20 | } 21 | -------------------------------------------------------------------------------- /frontend/src/_mock/Dashboards.js: -------------------------------------------------------------------------------- 1 | const Dashboards = { 2 | "dashboards": [ 3 | { 4 | "name": "facebook", 5 | "favorite": true, 6 | }, 7 | { 8 | "name": "Google", 9 | "favorite": true, 10 | }, 11 | { 12 | "name": "Google Analytics", 13 | "favorite": false, 14 | }, 15 | { 16 | "name": "Instagram", 17 | "favorite": false, 18 | }, 19 | { 20 | "name": "twitter", 21 | "favorite": false, 22 | }, 23 | ] 24 | }; 25 | 26 | export default Dashboards; -------------------------------------------------------------------------------- /frontend/src/sections/@dashboard/app/index.js: -------------------------------------------------------------------------------- 1 | export { default as AppTasks } from './AppTasks'; 2 | export { default as AppNewsUpdate } from './AppNewsUpdate'; 3 | export { default as AppCurrentVisits } from './AppCurrentVisits'; 4 | export { default as AppOrderTimeline } from './AppOrderTimeline'; 5 | export { default as AppTrafficBySite } from './AppTrafficBySite'; 6 | export { default as AppWebsiteVisits } from './AppWebsiteVisits'; 7 | export { default as AppWidgetSummary } from './AppWidgetSummary'; 8 | export { default as AppCurrentSubject } from './AppCurrentSubject'; 9 | export { default as AppConversionRates } from './AppConversionRates'; 10 | -------------------------------------------------------------------------------- /frontend/src/sections/@dashboard/blog/BlogPostsSort.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | // @mui 3 | import { MenuItem, TextField } from '@mui/material'; 4 | 5 | // ---------------------------------------------------------------------- 6 | 7 | BlogPostsSort.propTypes = { 8 | options: PropTypes.array, 9 | onSort: PropTypes.func, 10 | }; 11 | 12 | export default function BlogPostsSort({ options, onSort }) { 13 | return ( 14 | 15 | {options.map((option) => ( 16 | 17 | {option.label} 18 | 19 | ))} 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/sections/@dashboard/products/ProductList.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | // @mui 3 | import { Grid } from '@mui/material'; 4 | import ShopProductCard from './ProductCard'; 5 | 6 | // ---------------------------------------------------------------------- 7 | 8 | ProductList.propTypes = { 9 | products: PropTypes.array.isRequired, 10 | }; 11 | 12 | export default function ProductList({ products, ...other }) { 13 | return ( 14 | 15 | {products.map((product) => ( 16 | 17 | 18 | 19 | ))} 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /backend/README.md: -------------------------------------------------------------------------------- 1 | # MERN Authentication System 2 | 3 | 🔐 Authentication System with JWT using the MERN Stack: MongoDB, Express.js, Reactjs & Node.js 4 | 5 | ## Installation 6 | 7 | ```bash 8 | # Install dependencies for server 9 | npm install 10 | 11 | # Install dependencies for client 12 | npm run client-install 13 | 14 | # Run the client & server with concurrently 15 | npm run dev 16 | 17 | # Run the Express server only 18 | npm run server 19 | 20 | # Run the React client only 21 | npm run client 22 | 23 | # Server runs on http://localhost:5000 and client on http://localhost:3000 24 | ``` 25 | 26 | ## Author 27 | 28 | **germancutraro** 29 | 30 | ## Why 31 | 32 | * Practice 33 | * Reuse code, earn time 34 | * MERN Lover 35 | -------------------------------------------------------------------------------- /frontend/src/components/iconify/Iconify.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import { forwardRef } from 'react'; 3 | // icons 4 | import { Icon } from '@iconify/react'; 5 | // @mui 6 | import { Box } from '@mui/material'; 7 | 8 | // ---------------------------------------------------------------------- 9 | 10 | const Iconify = forwardRef(({ icon, width = 20, sx, ...other }, ref) => ( 11 | 12 | )); 13 | 14 | Iconify.propTypes = { 15 | sx: PropTypes.object, 16 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), 17 | icon: PropTypes.oneOfType([PropTypes.element, PropTypes.string]), 18 | }; 19 | 20 | export default Iconify; 21 | -------------------------------------------------------------------------------- /frontend/public/assets/icons/navbar/ic_disabled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/index.js: -------------------------------------------------------------------------------- 1 | // 2 | import Card from './Card'; 3 | import Paper from './Paper'; 4 | import Input from './Input'; 5 | import Table from './Table'; 6 | import Button from './Button'; 7 | import Tooltip from './Tooltip'; 8 | import Backdrop from './Backdrop'; 9 | import Typography from './Typography'; 10 | import Autocomplete from './Autocomplete'; 11 | 12 | // ---------------------------------------------------------------------- 13 | 14 | export default function ComponentsOverrides(theme) { 15 | return Object.assign( 16 | Card(theme), 17 | Table(theme), 18 | Input(theme), 19 | Paper(theme), 20 | Button(theme), 21 | Tooltip(theme), 22 | Backdrop(theme), 23 | Typography(theme), 24 | Autocomplete(theme) 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /frontend/src/utils/formatTime.js: -------------------------------------------------------------------------------- 1 | import { format, getTime, formatDistanceToNow } from 'date-fns'; 2 | 3 | // ---------------------------------------------------------------------- 4 | 5 | export function fDate(date, newFormat) { 6 | const fm = newFormat || 'dd MMM yyyy'; 7 | 8 | return date ? format(new Date(date), fm) : ''; 9 | } 10 | 11 | export function fDateTime(date, newFormat) { 12 | const fm = newFormat || 'dd MMM yyyy p'; 13 | 14 | return date ? format(new Date(date), fm) : ''; 15 | } 16 | 17 | export function fTimestamp(date) { 18 | return date ? getTime(new Date(date)) : ''; 19 | } 20 | 21 | export function fToNow(date) { 22 | return date 23 | ? formatDistanceToNow(new Date(date), { 24 | addSuffix: true, 25 | }) 26 | : ''; 27 | } 28 | -------------------------------------------------------------------------------- /frontend/src/layouts/dashboard/nav/config.js: -------------------------------------------------------------------------------- 1 | // component 2 | import SvgColor from '../../../components/svg-color'; 3 | 4 | // ---------------------------------------------------------------------- 5 | 6 | const icon = (name) => ; 7 | 8 | const navConfig = [ 9 | { 10 | title: 'teams', 11 | path: '/user', 12 | icon: icon('ic_user'), 13 | }, 14 | { 15 | title: 'Setting', 16 | path: '/edit', 17 | icon: icon('ic_cart'), 18 | }, 19 | { 20 | title: 'Sign Out', 21 | path: '/login', 22 | icon: icon('ic_lock'), 23 | }, 24 | { 25 | title: 'Not found', 26 | path: '/404', 27 | icon: icon('ic_disabled'), 28 | }, 29 | ]; 30 | 31 | export default navConfig; 32 | -------------------------------------------------------------------------------- /frontend/src/components/nav-section/styles.js: -------------------------------------------------------------------------------- 1 | // @mui 2 | import { styled } from '@mui/material/styles'; 3 | import { ListItemIcon, ListItemButton } from '@mui/material'; 4 | 5 | // ---------------------------------------------------------------------- 6 | 7 | export const StyledNavItem = styled((props) => )(({ theme }) => ({ 8 | ...theme.typography.body2, 9 | height: 48, 10 | position: 'relative', 11 | textTransform: 'capitalize', 12 | color: theme.palette.text.secondary, 13 | borderRadius: theme.shape.borderRadius, 14 | })); 15 | 16 | export const StyledNavItemIcon = styled(ListItemIcon)({ 17 | width: 22, 18 | height: 22, 19 | color: 'inherit', 20 | display: 'flex', 21 | alignItems: 'center', 22 | justifyContent: 'center', 23 | }); 24 | -------------------------------------------------------------------------------- /backend/config/passport.js: -------------------------------------------------------------------------------- 1 | const JwtStrategy = require('passport-jwt').Strategy, 2 | ExtractJwt = require('passport-jwt').ExtractJwt; 3 | const mongoose = require('mongoose'); 4 | 5 | const User = require('../models/User'); 6 | const { jwtSecret } = require('./index'); 7 | 8 | const opts = {}; 9 | opts.jwtFromRequest = ExtractJwt.fromAuthHeaderAsBearerToken(); 10 | opts.secretOrKey = jwtSecret; 11 | 12 | module.exports = passport => { 13 | passport.use( 14 | new JwtStrategy(opts, (jwt_payload, done) => { 15 | User.findById(jwt_payload.id) 16 | .then(user => { 17 | if (user) { 18 | return done(null, user); 19 | } 20 | return done(null, false); 21 | }) 22 | .catch(err => console.log(err)); 23 | }) 24 | ); 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /frontend/src/_mock/user.js: -------------------------------------------------------------------------------- 1 | import { faker } from '@faker-js/faker'; 2 | import { sample } from 'lodash'; 3 | 4 | // ---------------------------------------------------------------------- 5 | 6 | const users = [...Array(24)].map((_, index) => ({ 7 | id: faker.datatype.uuid(), 8 | avatarUrl: `/assets/images/avatars/avatar_${index + 1}.jpg`, 9 | name: faker.name.fullName(), 10 | company: faker.company.name(), 11 | isVerified: faker.datatype.boolean(), 12 | status: sample(['active', 'banned']), 13 | role: sample([ 14 | 'Leader', 15 | 'Hr Manager', 16 | 'UI Designer', 17 | 'UX Designer', 18 | 'UI/UX Designer', 19 | 'Project Manager', 20 | 'Backend Developer', 21 | 'Full Stack Designer', 22 | 'Front End Developer', 23 | 'Full Stack Developer', 24 | ]), 25 | })); 26 | 27 | export default users; 28 | -------------------------------------------------------------------------------- /frontend/src/components/svg-color/SvgColor.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import { forwardRef } from 'react'; 3 | // @mui 4 | import { Box } from '@mui/material'; 5 | 6 | // ---------------------------------------------------------------------- 7 | 8 | const SvgColor = forwardRef(({ src, sx, ...other }, ref) => ( 9 | 24 | )); 25 | 26 | SvgColor.propTypes = { 27 | src: PropTypes.string, 28 | sx: PropTypes.object, 29 | }; 30 | 31 | export default SvgColor; 32 | -------------------------------------------------------------------------------- /frontend/src/layouts/simple/SimpleLayout.js: -------------------------------------------------------------------------------- 1 | import { Outlet } from 'react-router-dom'; 2 | // @mui 3 | import { styled } from '@mui/material/styles'; 4 | // components 5 | import Logo from '../../components/logo'; 6 | 7 | // ---------------------------------------------------------------------- 8 | 9 | const StyledHeader = styled('header')(({ theme }) => ({ 10 | top: 0, 11 | left: 0, 12 | lineHeight: 0, 13 | width: '100%', 14 | position: 'absolute', 15 | padding: theme.spacing(3, 3, 0), 16 | [theme.breakpoints.up('sm')]: { 17 | padding: theme.spacing(5, 5, 0), 18 | }, 19 | })); 20 | 21 | // ---------------------------------------------------------------------- 22 | 23 | export default function SimpleLayout() { 24 | return ( 25 | <> 26 | 27 | 28 | 29 | 30 | 31 | 32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import ReactDOM from 'react-dom/client'; 2 | import { Provider } from 'react-redux'; 3 | import App from './App'; 4 | import store from './redux/store'; 5 | import "./style.css"; 6 | import * as serviceWorker from './serviceWorker'; 7 | import reportWebVitals from './reportWebVitals'; 8 | 9 | // ---------------------------------------------------------------------- 10 | 11 | const root = ReactDOM.createRoot(document.getElementById('root')); 12 | 13 | root.render( 14 | 15 | 16 | 17 | ); 18 | 19 | // If you want to enable client cache, register instead. 20 | serviceWorker.unregister(); 21 | 22 | // If you want to start measuring performance in your app, pass a function 23 | // to log results (for example: reportWebVitals(console.log)) 24 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 25 | reportWebVitals(); 26 | -------------------------------------------------------------------------------- /frontend/src/components/scrollbar/styles.js: -------------------------------------------------------------------------------- 1 | import SimpleBar from 'simplebar-react'; 2 | // @mui 3 | import { alpha, styled } from '@mui/material/styles'; 4 | 5 | // ---------------------------------------------------------------------- 6 | 7 | export const StyledRootScrollbar = styled('div')(() => ({ 8 | flexGrow: 1, 9 | height: '100%', 10 | overflow: 'hidden', 11 | })); 12 | 13 | export const StyledScrollbar = styled(SimpleBar)(({ theme }) => ({ 14 | maxHeight: '100%', 15 | '& .simplebar-scrollbar': { 16 | '&:before': { 17 | backgroundColor: alpha(theme.palette.grey[600], 0.48), 18 | }, 19 | '&.simplebar-visible:before': { 20 | opacity: 1, 21 | }, 22 | }, 23 | '& .simplebar-track.simplebar-vertical': { 24 | width: 10, 25 | }, 26 | '& .simplebar-track.simplebar-horizontal .simplebar-scrollbar': { 27 | height: 6, 28 | }, 29 | '& .simplebar-mask': { 30 | zIndex: 'inherit', 31 | }, 32 | })); 33 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/Card.js: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------- 2 | 3 | export default function Card(theme) { 4 | return { 5 | MuiCard: { 6 | styleOverrides: { 7 | root: { 8 | boxShadow: theme.customShadows.card, 9 | borderRadius: Number(theme.shape.borderRadius) * 2, 10 | position: 'relative', 11 | zIndex: 0, // Fix Safari overflow: hidden with border radius 12 | }, 13 | }, 14 | }, 15 | MuiCardHeader: { 16 | defaultProps: { 17 | titleTypographyProps: { variant: 'h6' }, 18 | subheaderTypographyProps: { variant: 'body2' }, 19 | }, 20 | styleOverrides: { 21 | root: { 22 | padding: theme.spacing(3, 3, 0), 23 | }, 24 | }, 25 | }, 26 | MuiCardContent: { 27 | styleOverrides: { 28 | root: { 29 | padding: theme.spacing(3), 30 | }, 31 | }, 32 | }, 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /frontend/src/utils/formatNumber.js: -------------------------------------------------------------------------------- 1 | import numeral from 'numeral'; 2 | 3 | // ---------------------------------------------------------------------- 4 | 5 | export function fNumber(number) { 6 | return numeral(number).format(); 7 | } 8 | 9 | export function fCurrency(number) { 10 | const format = number ? numeral(number).format('$0,0.00') : ''; 11 | 12 | return result(format, '.00'); 13 | } 14 | 15 | export function fPercent(number) { 16 | const format = number ? numeral(Number(number) / 100).format('0.0%') : ''; 17 | 18 | return result(format, '.0'); 19 | } 20 | 21 | export function fShortenNumber(number) { 22 | const format = number ? numeral(number).format('0.00a') : ''; 23 | 24 | return result(format, '.00'); 25 | } 26 | 27 | export function fData(number) { 28 | const format = number ? numeral(number).format('0.0 b') : ''; 29 | 30 | return result(format, '.0'); 31 | } 32 | 33 | function result(format, key = '.00') { 34 | const isInteger = format.includes(key); 35 | 36 | return isInteger ? format.replace(key, '') : format; 37 | } 38 | -------------------------------------------------------------------------------- /backend/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const bodyParser = require('body-parser'); 3 | const path = require('path'); 4 | const passport = require('passport'); 5 | const morgan = require('morgan'); 6 | 7 | const app = express(); 8 | 9 | const PORT = process.env.PORT || 5000; 10 | 11 | // Middlewares 12 | app.use(require('cors')()); 13 | app.use(require('helmet')()); 14 | app.use(morgan('dev')); 15 | app.use(bodyParser.urlencoded({ extended: false })); 16 | app.use(bodyParser.json()); 17 | app.use(passport.initialize()); 18 | // DB Connection 19 | require('./libs/db-connection'); 20 | // Passport 21 | require('./config/passport')(passport); 22 | 23 | // Routes 24 | app.use('/api/users', require('./routes/users')); 25 | 26 | // Production 27 | if (process.env.NODE_ENV === 'production') { 28 | // Set static folder 29 | app.use(express.static('client/build')); 30 | 31 | app.get('*', (req, res) => { 32 | res.sendfile(path.resolve(__dirname, 'client', 'build', 'index.html')); 33 | }); 34 | } 35 | 36 | app.listen(PORT, () => console.log(`Server Running on port ${PORT}`)); -------------------------------------------------------------------------------- /frontend/src/components/scrollbar/Scrollbar.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import { memo } from 'react'; 3 | // @mui 4 | import { Box } from '@mui/material'; 5 | // 6 | import { StyledRootScrollbar, StyledScrollbar } from './styles'; 7 | 8 | // ---------------------------------------------------------------------- 9 | 10 | Scrollbar.propTypes = { 11 | sx: PropTypes.object, 12 | children: PropTypes.node, 13 | }; 14 | 15 | function Scrollbar({ children, sx, ...other }) { 16 | const userAgent = typeof navigator === 'undefined' ? 'SSR' : navigator.userAgent; 17 | 18 | const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent); 19 | 20 | if (isMobile) { 21 | return ( 22 | 23 | {children} 24 | 25 | ); 26 | } 27 | 28 | return ( 29 | 30 | 31 | {children} 32 | 33 | 34 | ); 35 | } 36 | 37 | export default memo(Scrollbar); 38 | -------------------------------------------------------------------------------- /frontend/public/assets/icons/navbar/ic_user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/src/components/color-utils/ColorSinglePicker.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import { forwardRef } from 'react'; 3 | // @mui 4 | import { Radio, RadioGroup } from '@mui/material'; 5 | // 6 | import Icon from './Icon'; 7 | 8 | // ---------------------------------------------------------------------- 9 | 10 | const ColorSinglePicker = forwardRef(({ colors, ...other }, ref) => ( 11 | 12 | {colors.map((color) => { 13 | const whiteColor = color === '#FFFFFF' || color === 'white'; 14 | 15 | return ( 16 | } 21 | checkedIcon={} 22 | sx={{ 23 | color, 24 | '&:hover': { opacity: 0.72 }, 25 | '& svg': { width: 12, height: 12 }, 26 | }} 27 | /> 28 | ); 29 | })} 30 | 31 | )); 32 | 33 | ColorSinglePicker.propTypes = { 34 | colors: PropTypes.arrayOf(PropTypes.string), 35 | }; 36 | 37 | export default ColorSinglePicker; 38 | -------------------------------------------------------------------------------- /backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MERN-Auth-System", 3 | "version": "1.0.0", 4 | "description": "Authentication System", 5 | "main": "server.js", 6 | "scripts": { 7 | "client-install": "cd client && npm install", 8 | "start": "nodemon server.js", 9 | "server": "nodemon server.js", 10 | "client": "npm start --prefix client", 11 | "dev": "concurrently \"npm run server\" \"npm run client\"", 12 | "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "ISC", 17 | "dependencies": { 18 | "bcrypt": "^5.0.0", 19 | "body-parser": "^1.18.3", 20 | "classnames": "^2.2.6", 21 | "concurrently": "^3.6.0", 22 | "cors": "^2.8.4", 23 | "express": "^4.16.3", 24 | "gravatar": "^1.6.0", 25 | "helmet": "^3.12.2", 26 | "joi": "^13.4.0", 27 | "jsonwebtoken": "^8.3.0", 28 | "mongoose": "^5.2.3", 29 | "morgan": "^1.10.0", 30 | "passport": "^0.4.0", 31 | "passport-jwt": "^4.0.0", 32 | "validator": "^10.4.0" 33 | }, 34 | "devDependencies": { 35 | "nodemon": "^1.18.2" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /backend/validation/login.js: -------------------------------------------------------------------------------- 1 | const Validator = require('validator'); 2 | 3 | const lengthInput = function (inputName, min, max, errorMessage) { 4 | if (!Validator.isLength(inputName, { min, max })) 5 | return errorMessage; 6 | } 7 | 8 | const loginValidation = data => { 9 | 10 | const { email, password } = data; 11 | let errors = {}; 12 | 13 | // Length input value validation 14 | errors.email = lengthInput(email, 5, 100, 'The email field must be greater than 5 characters'); 15 | errors.password = lengthInput(password, 5, 1024, 'The password field must be greater than 5 characters'); 16 | // Email validate format 17 | if (!Validator.isEmail(email)) errors.email = 'Email format is incorrect'; 18 | // Empty validation 19 | if (Validator.isEmpty(email)) errors.email = 'Email field is required'; 20 | if (Validator.isEmpty(password)) errors.password = 'Password field is required'; 21 | 22 | // if each key of errors is undefined, we must empty the objects 23 | if (!errors.email && !errors.password) 24 | errors = {}; 25 | 26 | return { 27 | errors, 28 | isValid: Object.keys(errors).length 29 | } 30 | 31 | }; 32 | 33 | module.exports = loginValidation; -------------------------------------------------------------------------------- /frontend/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Minimal UI ([https://minimals.cc/](https://minimals.cc/)) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /frontend/public/assets/icons/ic_flag_en.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/models/User.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | //import mongoose from 'mongoose'; 3 | const { Schema } = mongoose; 4 | 5 | const userSchema = new Schema({ 6 | firstName: { 7 | type: String, 8 | required: true, 9 | trim: true, 10 | minlength: 3, 11 | maxlength: 30, 12 | }, 13 | lastName: { 14 | type: String, 15 | required: true, 16 | trim: true, 17 | minlength: 3, 18 | maxlength: 30, 19 | }, 20 | email: { 21 | type: String, 22 | required: true, 23 | unique: true, 24 | trim: true, 25 | minlength: 5, 26 | maxlength: 100, 27 | }, 28 | company: { 29 | type: String, 30 | required: true, 31 | trim: true, 32 | }, 33 | company_size: { 34 | type: String, 35 | required: true, 36 | enum: ['Self-employed', '1-10 employees', '11-50 employees', '51-200 employees', '201-500 employees', '501-1000 employees', '1001-5000 employees', '5001-10000 employees', '10001+ employees'], 37 | default: '11-50 employees' 38 | }, 39 | avatar: { 40 | type: String, 41 | }, 42 | password: { 43 | type: String, 44 | required: true, 45 | minlength: 5, 46 | maxlength: 1024, 47 | }, 48 | }); 49 | 50 | module.exports = mongoose.model("User", userSchema); 51 | -------------------------------------------------------------------------------- /frontend/public/assets/icons/ic_flag_de.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/src/theme/overrides/Button.js: -------------------------------------------------------------------------------- 1 | import { alpha } from '@mui/material/styles'; 2 | 3 | // ---------------------------------------------------------------------- 4 | 5 | export default function Button(theme) { 6 | return { 7 | MuiButton: { 8 | styleOverrides: { 9 | root: { 10 | '&:hover': { 11 | boxShadow: 'none', 12 | }, 13 | }, 14 | sizeLarge: { 15 | height: 48, 16 | }, 17 | containedInherit: { 18 | color: theme.palette.grey[800], 19 | boxShadow: theme.customShadows.z8, 20 | '&:hover': { 21 | backgroundColor: theme.palette.grey[400], 22 | }, 23 | }, 24 | containedPrimary: { 25 | boxShadow: theme.customShadows.primary, 26 | }, 27 | containedSecondary: { 28 | boxShadow: theme.customShadows.secondary, 29 | }, 30 | outlinedInherit: { 31 | border: `1px solid ${alpha(theme.palette.grey[500], 0.32)}`, 32 | '&:hover': { 33 | backgroundColor: theme.palette.action.hover, 34 | }, 35 | }, 36 | textInherit: { 37 | '&:hover': { 38 | backgroundColor: theme.palette.action.hover, 39 | }, 40 | }, 41 | }, 42 | }, 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /frontend/public/assets/icons/navbar/ic_blog.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/src/theme/index.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import { useMemo } from 'react'; 3 | // @mui 4 | import { CssBaseline } from '@mui/material'; 5 | import { ThemeProvider as MUIThemeProvider, createTheme, StyledEngineProvider } from '@mui/material/styles'; 6 | // 7 | import palette from './palette'; 8 | import shadows from './shadows'; 9 | import typography from './typography'; 10 | import GlobalStyles from './globalStyles'; 11 | import customShadows from './customShadows'; 12 | import componentsOverride from './overrides'; 13 | 14 | // ---------------------------------------------------------------------- 15 | 16 | ThemeProvider.propTypes = { 17 | children: PropTypes.node, 18 | }; 19 | 20 | export default function ThemeProvider({ children }) { 21 | const themeOptions = useMemo( 22 | () => ({ 23 | palette, 24 | shape: { borderRadius: 6 }, 25 | typography, 26 | shadows: shadows(), 27 | customShadows: customShadows(), 28 | }), 29 | [] 30 | ); 31 | 32 | const theme = createTheme(themeOptions); 33 | theme.components = componentsOverride(theme); 34 | 35 | return ( 36 | 37 | 38 | 39 | 40 | {children} 41 | 42 | 43 | ); 44 | } 45 | -------------------------------------------------------------------------------- /frontend/src/components/color-utils/ColorPreview.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | // @mui 3 | import { alpha } from '@mui/material/styles'; 4 | import { Box, Typography, Stack } from '@mui/material'; 5 | 6 | // ---------------------------------------------------------------------- 7 | 8 | ColorPreview.propTypes = { 9 | sx: PropTypes.object, 10 | limit: PropTypes.number, 11 | colors: PropTypes.arrayOf(PropTypes.string), 12 | }; 13 | 14 | export default function ColorPreview({ colors, limit = 3, sx }) { 15 | const showColor = colors.slice(0, limit); 16 | 17 | const moreColor = colors.length - limit; 18 | 19 | return ( 20 | 21 | {showColor.map((color, index) => ( 22 | `solid 2px ${theme.palette.background.paper}`, 30 | boxShadow: (theme) => `inset -1px 1px 2px ${alpha(theme.palette.common.black, 0.24)}`, 31 | bgcolor: color, 32 | }} 33 | /> 34 | ))} 35 | 36 | {colors.length > limit && {`+${moreColor}`}} 37 | 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /frontend/src/layouts/dashboard/DashboardLayout.js: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | import { Outlet } from 'react-router-dom'; 3 | // @mui 4 | import { styled } from '@mui/material/styles'; 5 | // 6 | import Header from './header'; 7 | import Nav from './nav'; 8 | 9 | // ---------------------------------------------------------------------- 10 | 11 | const APP_BAR_MOBILE = 64; 12 | const APP_BAR_DESKTOP = 92; 13 | 14 | const StyledRoot = styled('div')({ 15 | display: 'flex', 16 | minHeight: '100%', 17 | overflow: 'hidden', 18 | }); 19 | 20 | const Main = styled('div')(({ theme }) => ({ 21 | flexGrow: 1, 22 | overflow: 'auto', 23 | minHeight: '100%', 24 | paddingTop: APP_BAR_MOBILE + 24, 25 | paddingBottom: theme.spacing(10), 26 | [theme.breakpoints.up('lg')]: { 27 | paddingTop: APP_BAR_DESKTOP + 24, 28 | paddingLeft: theme.spacing(2), 29 | paddingRight: theme.spacing(2), 30 | }, 31 | })); 32 | 33 | // ---------------------------------------------------------------------- 34 | 35 | export default function DashboardLayout() { 36 | const [open, setOpen] = useState(false); 37 | 38 | return ( 39 | 40 |
setOpen(true)} /> 41 | 42 |