├── .gitignore ├── API Design.md ├── Model Design.md ├── README.md ├── client ├── .env ├── .env.template ├── .gitignore ├── LICENSE.md ├── README.md ├── package-lock.json ├── package.json ├── postcss.config.js ├── public │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── assets │ │ ├── avatars │ │ │ ├── 668412781664e859963a7068.135434950.jpeg │ │ │ ├── 66b4024cbaf1712da9855432.14.webp │ │ │ ├── ava.png │ │ │ ├── avatar-10.jpg │ │ │ ├── avatar-12.jpg │ │ │ ├── avatar-14.jpg │ │ │ ├── avatar-17.jpg │ │ │ ├── avatar.jpg │ │ │ └── default.jpg │ │ └── images │ │ │ ├── background_outrun.png │ │ │ ├── default.jpg │ │ │ └── logo.png │ ├── default.jpg │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── index.html │ ├── intro.png │ ├── logo.jpg │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ │ ├── Avatar.jsx │ │ ├── Button.jsx │ │ ├── CalendarView │ │ │ ├── index.js │ │ │ └── util.js │ │ ├── Cards │ │ │ └── TitleCard.js │ │ ├── Input │ │ │ ├── BigInputText.js │ │ │ ├── Input.js │ │ │ ├── InputText.js │ │ │ ├── Inputdisabled.js │ │ │ ├── SearchBar.js │ │ │ ├── SelectBox.js │ │ │ ├── SelectBoxBig.js │ │ │ ├── SelectBoxSmall.js │ │ │ ├── StanSearchBar.js │ │ │ ├── TextAreaInput.js │ │ │ └── ToogleInput.js │ │ ├── Logo.jsx │ │ └── Typography │ │ │ ├── ErrorText.js │ │ │ ├── HelperText.js │ │ │ ├── Subtitle.js │ │ │ └── Title.js │ ├── containers │ │ ├── Header.js │ │ ├── Layout.js │ │ ├── LeftSidebar.js │ │ ├── ModalLayout.js │ │ ├── PageContent.js │ │ ├── RightSidebar.js │ │ ├── SidebarSubmenu.js │ │ └── SuspenseContent.js │ ├── features │ │ ├── charts │ │ │ ├── components │ │ │ │ ├── BarChart.js │ │ │ │ ├── DoughnutChart.js │ │ │ │ ├── LineChart.js │ │ │ │ ├── PieChart.js │ │ │ │ ├── ScatterChart.js │ │ │ │ └── StackBarChart.js │ │ │ └── index.js │ │ ├── common │ │ │ ├── components │ │ │ │ ├── ConfirmationModalBody.js │ │ │ │ └── NotificationBodyRightDrawer.js │ │ │ ├── headerSlice.js │ │ │ ├── modalSlice.js │ │ │ └── rightDrawerSlice.js │ │ ├── dashboard │ │ │ ├── components │ │ │ │ ├── AmountStats.js │ │ │ │ ├── ArticleCard.js │ │ │ │ ├── BarChart.js │ │ │ │ ├── DashboardStats.js │ │ │ │ ├── DashboardTopBar.js │ │ │ │ ├── DoughnutChart.js │ │ │ │ ├── LineChart.js │ │ │ │ ├── PageStats.js │ │ │ │ ├── Toolbar.js │ │ │ │ └── UserChannels.js │ │ │ └── index.js │ │ ├── integration │ │ │ └── index.js │ │ ├── leads │ │ │ ├── components │ │ │ │ └── AddLeadModalBody.js │ │ │ ├── index.js │ │ │ └── leadSlice.js │ │ ├── profile │ │ │ ├── components │ │ │ │ ├── ProfileInfo.jsx │ │ │ │ └── Repositories.js │ │ │ └── index.jsx │ │ ├── settings │ │ │ ├── changepassword │ │ │ │ └── index.js │ │ │ ├── profilesettings │ │ │ │ └── index.js │ │ │ └── team │ │ │ │ └── index.js │ │ ├── transactions │ │ │ └── index.js │ │ └── user │ │ │ ├── ForgotPassword.js │ │ │ ├── LandingIntro.js │ │ │ ├── Login.js │ │ │ └── components │ │ │ └── TemplatePointers.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── pages │ │ ├── Admin │ │ │ ├── Category │ │ │ │ ├── components │ │ │ │ │ ├── InputCategory.js │ │ │ │ │ └── TableCategory.js │ │ │ │ └── index.jsx │ │ │ └── UserManage │ │ │ │ ├── EditAccount │ │ │ │ ├── EditManage │ │ │ │ │ └── index.jsx │ │ │ │ └── index.jsx │ │ │ │ ├── UserManagePanel │ │ │ │ ├── TopSideButtons │ │ │ │ │ └── index.js │ │ │ │ └── index.jsx │ │ │ │ └── index.jsx │ │ ├── Article │ │ │ ├── AllArticle.jsx │ │ │ ├── AnswerArticle.jsx │ │ │ ├── Draft.jsx │ │ │ ├── FavouriteArticle.jsx │ │ │ ├── MyArticle.jsx │ │ │ ├── NewArticle.jsx │ │ │ └── ShowArticle.jsx │ │ ├── Component │ │ │ └── Input.jsx │ │ ├── ForgotPassword.js │ │ ├── Settings │ │ │ ├── ChangePassword.js │ │ │ ├── ProfileSettings.js │ │ │ └── Team.js │ │ ├── Signin │ │ │ └── index.jsx │ │ ├── Signup │ │ │ └── index.jsx │ │ └── protected │ │ │ ├── 404.js │ │ │ ├── Blank.js │ │ │ ├── Charts.js │ │ │ ├── Dashboard.js │ │ │ ├── Integration.js │ │ │ ├── Leads.js │ │ │ ├── Transactions.js │ │ │ └── Welcome.js │ ├── redux │ │ ├── adminSlice.js │ │ ├── articleSlice.js │ │ ├── auth.js │ │ ├── authSlice.js │ │ ├── init.js │ │ └── store.js │ ├── reportWebVitals.js │ ├── routes │ │ ├── index.js │ │ └── sidebar.js │ ├── setupTests.js │ └── utils │ │ ├── ErrorText.js │ │ ├── InputText.js │ │ ├── dummyData.js │ │ ├── globalConstantUtil.js │ │ └── requestServer.js └── tailwind.config.js ├── package-lock.json ├── package.json └── server ├── .env ├── .eslintrc.json ├── .gitignore ├── Procfile ├── README.md ├── app.js ├── package-lock.json ├── package.json ├── public └── favicon.ico ├── socket ├── constants.js ├── events │ ├── authorizationEvents.js │ ├── chatEvents.js │ ├── loggedusersEvent.js │ └── notificationEvents.js ├── global.js ├── index.js ├── init │ ├── authorizationInit.js │ ├── chatInit.js │ ├── loggedusersInit.js │ └── notificationInit.js └── utils │ ├── authorizationUtils.js │ ├── chatUtils.js │ ├── index.js │ ├── loggedusersUtils.js │ └── notificationUtils.js ├── socketApp.js └── src ├── configs ├── config.js ├── errorHandler.js ├── passport.js └── socket.js ├── controllers ├── adminControllers │ ├── categoryController.js │ └── userController.js ├── articleController.js └── authController.js ├── db └── connect.js ├── middleware └── authorization.js ├── models ├── adminModel │ └── categoryModel.js ├── articleModel.js └── userModel.js └── routes ├── adminRoutes ├── categoryRoutes.js ├── index.js └── userRoutes.js ├── articleRoutes.js ├── authRoutes.js └── index.js /.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 | 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | -------------------------------------------------------------------------------- /API Design.md: -------------------------------------------------------------------------------- 1 | # API Design 2 | 3 | ## Auth 4 | 5 | post: /api/signup 6 | 7 | post: /api/signin 8 | 9 | ## Articles 10 | 11 | post /api/article/create 12 | 13 | put /api/article/:id 14 | 15 | delete /api/article/:id 16 | 17 | get /api/article/home 18 | 19 | get /api/article/:id 20 | 21 | put /api/article/comment/:id 22 | 23 | put /api/article/favorite/:id 24 | 25 | - sort by latest 26 | - sort by cnt of comments 27 | - sort by cnt of favourites 28 | - search by title 29 | 30 | ## Admin 31 | 32 | ### User 33 | 34 | - Manage 35 | 36 | get /api/admin/user/all 37 | 38 | put /api/admin/user/role/:id 39 | 40 | delete /api/admin/user/:id 41 | 42 | - Profile 43 | 44 | get /api/admin/user/:id 45 | 46 | put /api/admin/user/:id 47 | 48 | put /api/admin/user/password/:id 49 | 50 | put /api/admin/user/avatar/:id 51 | 52 | ### Category 53 | 54 | post /api/admin/category/ 55 | 56 | put /api/admin/category/:id 57 | 58 | delete /api/admin/category/:id 59 | 60 | get /api/admin/category/all 61 | -------------------------------------------------------------------------------- /Model Design.md: -------------------------------------------------------------------------------- 1 | -Auth 2 | 3 | username:{ 4 | type:string; 5 | required:true; 6 | unique: true; 7 | $regex:[a-z][0-9][_]; 8 | }, 9 | name:{ 10 | type:string; 11 | required:true 12 | }, 13 | bio:{ 14 | type:string; 15 | }, 16 | avatar:{ 17 | type: string;/*avatar's path */ 18 | defaule:"public/default.jpg"; 19 | } 20 | role:{ 21 | type:string; 22 | default:"guest"; 23 | }, 24 | follow:[{ 25 | type:mongoose.Schema.ObjectId, 26 | }], 27 | category:[{ 28 | type:mongoose.Schema.ObjectId, 29 | }] 30 | 31 | -Article 32 | from:{ 33 | type:string; 34 | required:true; 35 | }, 36 | title:{ 37 | type:string; 38 | required:true; 39 | }, 40 | category:{ 41 | type:string; 42 | required:true 43 | }, 44 | tags:[{ 45 | type:string; 46 | }], 47 | content:{ 48 | type: string; 49 | }, 50 | draft:{ 51 | type:number; 52 | default:0; 53 | }, 54 | favouritor: [{ 55 | type:String; 56 | default:0; 57 | }]a, 58 | comment:[{ 59 | from:{ 60 | type:string; 61 | required:true; 62 | }, 63 | title:{ 64 | type:string; 65 | required:true; 66 | }, 67 | category:{ 68 | type:string; 69 | required:true 70 | }, 71 | tags:[{ 72 | type:string; 73 | }], 74 | content:{ 75 | type: string; 76 | }, 77 | 78 | draft:{ 79 | type:number; 80 | default:0; 81 | }, 82 | }], 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blog Website Project 2 | 3 | ## Overall Requirements 4 | 5 | - There are three user roles. Admin, managers, users. And also there are guests who are not logged in. 6 | - Admin can manage everything – users, articles and categories. 7 | - Managers can only manage articles. 8 | - Admin, managers can do whatever user does. 9 | - Guest can view only few articles. 10 | - All users can view articles 11 | - There should be CRUD APIs for all. 12 | - /articles/home API should return articles for the categories and users they have followed, for guest users, they should return latest 5 articles. If user doesn’t have any follows, it should return latest 5 articles. 13 | - GET /articles API should support sort by latest, number of comments, and number of favorites, search by title. 14 | 15 | ## User 16 | 17 | - User has a username, name, bio, profile photo. Username should be unique. It should only contain English lowercase letters, numbers, underscore. 18 | - Create a separate endpoint for uploading profile photo. 19 | - On register page, user has to provide username, name and password. Profile photo optional. 20 | - On profile page, user can update name, bio, profile photo. 21 | - In change password page, they can change their password. 22 | - Users can post new articles 23 | - Users can follow categories, or they can also follow other users. 24 | - User should be able to see his followers. 25 | 26 | ## Categories 27 | 28 | - Admin can create category. Category doesn’t have a tree structure. 29 | - Category has only a title. 30 | 31 | ## Article 32 | 33 | - Article has title, category, a list of tags, content 34 | - Users can create a new blog and publish immediately, or they can mark them as draft and publish later. 35 | 36 | ## Comment 37 | 38 | - User can comment on an article. 39 | 40 | ## Favorite 41 | 42 | - User can like an article. 43 | 44 | ## Notification 45 | 46 | - When a user favorite an article, the author of the article should get a notification. The notification should look like this. “Smith liked your article – title of article” 47 | - When a user comment on an article, the author of the article should get notification “Smith commented on your article.” 48 | - When someone write comment and mention some user, the user should get notification as well. “Smith mentioned you on his comment” 49 | - When a user log in, he should be able to see the notifications. 50 | - When the user click on specific notification, it should redirect to the article page. 51 | 52 | ## Delete Article, Category, User all should be done with soft delete 53 | 54 | ## Contributor 55 | 56 | #### [Shine](https://github.com/shinevue) 57 | #### [Truestar](https://github.com/oddcommitking) 58 | #### [Yonex](https://github.com/mcyandex) 59 | #### [Luckystar](https://github.com/techietrend) 60 | #### [Achilles](https://github.com/oleh1010) 61 | #### [Chivalrousdev](https://github.com/chivalrousdev) 62 | #### [ScottKing](https://github.com/creative2113) 63 | #### [Ghost](https://github.com/BlackGhost2693) 64 | 65 | -------------------------------------------------------------------------------- /client/.env: -------------------------------------------------------------------------------- 1 | REACT_APP_BASE_URL=http://localhost:4000 2 | PORT = 3001 3 | -------------------------------------------------------------------------------- /client/.env.template: -------------------------------------------------------------------------------- 1 | REACT_APP_BASE_URL=https://reqres.in/ 2 | -------------------------------------------------------------------------------- /client/.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.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /client/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Dashwind 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. -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | 2 |  3 | 4 | # Daisy UI Admin Dashboard Template - DashWind 5 | [](https://choosealicense.com/licenses/mit/) 6 | 7 | This is a free admin dashboard template that uses **Daisy UI** and React js. It has **fully customizable and themable CSS** CSS and is powered by Tailwind CSS utility classes. Additionally, it comes with **redux toolkit** and other libraries already set up. 8 | 9 | 10 | ## Preview 11 | 12 | 🚀 [Live preview](https://tailwind-dashboard-template-dashwind.vercel.app/) 13 | 14 | 15 |  16 | 17 | 18 | 19 | ## Features 20 | 21 | - **Light/dark** mode toggle 22 | - Token based user **authentication** 23 | - **Submenu support** in sidebar 24 | - Store management using **redux toolkit** 25 | - **Daisy UI** components and **Tailwind** support 26 | - **Right and left sidebar**, Universal loader, notifications 27 | - **Calendar**, global modal, **chart js 2** and other components 28 | 29 | 30 | ## Installation 31 | 32 | Go to project directory and run (make sure you have node installed first) 33 | 34 | ```bash 35 | npm install 36 | npm start 37 | ``` 38 | 39 | ## Core Libraries Used 40 | 41 | - [React JS v18.2.0](https://reactjs.org/) 42 | - [React Router v6.4.3](https://reactrouter.com/en/main) 43 | - [Tailwind CSS v3.2.4](https://tailwindcss.com/) 44 | - [Daisy UI v2.41.0](https://daisyui.com/) 45 | - [HeroIcons](https://heroicons.com/) 46 | - [Redux toolkit v1.9](https://redux-toolkit.js.org/) 47 | - [React ChartJS 2 v5](https://react-chartjs-2.js.org/) 48 | 49 | ## Documentation 50 | 51 | [Documentation](https://tailwind-dashboard-template-dashwind.vercel.app/documentation) 52 | 53 | ## Page Examples 54 | 55 | | | | 56 | :-------------------------:|:-------------------------: 57 |  |  58 |  |  59 |  |  60 | 61 | 62 | 63 | 64 | 65 | ## Preview 66 | 67 | 🚀 [Live preview](https://tailwind-dashboard-template-dashwind.vercel.app/) 68 | 69 | 70 | ## Roadmap 71 | 72 | - Addition of users, chat/ inbox page 73 | - Calendar improments 74 | - Seperate templates based on business functions like CRM, Sales, Project Management 75 | 76 | 77 | ## Contributing 78 | 79 | Contributions are always welcome! 80 | 81 | ## License 82 | 83 | [](https://choosealicense.com/licenses/mit/) 84 | 85 | 86 | ## Feedback 87 | 88 | If you have any feedback, please reach out [here](https://forms.gle/8G7PsvQp8X1Swcf29) 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "admin-dashboard-template-dashwind", 3 | "version": "1.0.0", 4 | "description": "Admin Dashboard template built with create-react-app, tailwind css and daisy UI. Template uses rich tailwind css utility classes and have components of daisy UI, also have redux toolkit implemented for store management.", 5 | "scripts": { 6 | "start": "react-scripts start", 7 | "build": "react-scripts build", 8 | "test": "react-scripts test", 9 | "eject": "react-scripts eject" 10 | }, 11 | "dependencies": { 12 | "@heroicons/react": "^2.0.13", 13 | "@reduxjs/toolkit": "^1.9.0", 14 | "@testing-library/jest-dom": "^5.16.5", 15 | "@testing-library/react": "^13.4.0", 16 | "@testing-library/user-event": "^13.5.0", 17 | "axios": "^1.6.2", 18 | "capitalize-the-first-letter": "^1.0.8", 19 | "chart.js": "^4.0.1", 20 | "daisyui": "^2.41.0", 21 | "dayjs": "^1.11.7", 22 | "moment": "^2.29.4", 23 | "react": "^18.2.0", 24 | "react-chartjs-2": "^5.0.1", 25 | "react-dom": "^18.2.0", 26 | "react-icons": "^5.2.1", 27 | "react-notifications": "^1.7.4", 28 | "react-redux": "^8.0.5", 29 | "react-router-dom": "^6.4.3", 30 | "react-scripts": "5.0.1", 31 | "react-tailwindcss-datepicker": "^1.6.0", 32 | "socket.io": "^4.7.2", 33 | "socketio": "^1.0.0", 34 | "theme-change": "^2.2.0", 35 | "web-vitals": "^2.1.4" 36 | }, 37 | "repository": { 38 | "type": "git", 39 | "url": "git+https://github.com/srobbin01/tailwind-dashboard-template-dashwind" 40 | }, 41 | "keywords": [ 42 | "reactjs", 43 | "tailwind-css", 44 | "starter-kit", 45 | "saas-starter-kit", 46 | "reduxt-toolkit-dashboard-template", 47 | "daisyui-template", 48 | "dashboard-template", 49 | "react-router", 50 | "react-charts" 51 | ], 52 | "author": "srobbin01", 53 | "license": "ISC", 54 | "bugs": { 55 | "url": "https://github.com/srobbin01/tailwind-dashboard-template-dashwind/issues" 56 | }, 57 | "homepage": "", 58 | "eslintConfig": { 59 | "extends": [ 60 | "react-app", 61 | "react-app/jest" 62 | ] 63 | }, 64 | "browserslist": { 65 | "production": [ 66 | ">0.2%", 67 | "not dead", 68 | "not op_mini all" 69 | ], 70 | "development": [ 71 | "last 1 chrome version", 72 | "last 1 firefox version", 73 | "last 1 safari version" 74 | ] 75 | }, 76 | "devDependencies": { 77 | "@tailwindcss/typography": "^0.5.8", 78 | "autoprefixer": "^10.4.13", 79 | "postcss": "^8.4.19", 80 | "tailwindcss": "^3.2.4" 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /client/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /client/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /client/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /client/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/apple-touch-icon.png -------------------------------------------------------------------------------- /client/public/assets/avatars/668412781664e859963a7068.135434950.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/668412781664e859963a7068.135434950.jpeg -------------------------------------------------------------------------------- /client/public/assets/avatars/66b4024cbaf1712da9855432.14.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/66b4024cbaf1712da9855432.14.webp -------------------------------------------------------------------------------- /client/public/assets/avatars/ava.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/ava.png -------------------------------------------------------------------------------- /client/public/assets/avatars/avatar-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/avatar-10.jpg -------------------------------------------------------------------------------- /client/public/assets/avatars/avatar-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/avatar-12.jpg -------------------------------------------------------------------------------- /client/public/assets/avatars/avatar-14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/avatar-14.jpg -------------------------------------------------------------------------------- /client/public/assets/avatars/avatar-17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/avatar-17.jpg -------------------------------------------------------------------------------- /client/public/assets/avatars/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/avatar.jpg -------------------------------------------------------------------------------- /client/public/assets/avatars/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/avatars/default.jpg -------------------------------------------------------------------------------- /client/public/assets/images/background_outrun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/images/background_outrun.png -------------------------------------------------------------------------------- /client/public/assets/images/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/images/default.jpg -------------------------------------------------------------------------------- /client/public/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/assets/images/logo.png -------------------------------------------------------------------------------- /client/public/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/default.jpg -------------------------------------------------------------------------------- /client/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/favicon-16x16.png -------------------------------------------------------------------------------- /client/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/favicon-32x32.png -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdev2693/finalGoal/ea5ddc95a86f9981a6ccd4265672656a777da502/client/public/favicon.ico -------------------------------------------------------------------------------- /client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 |{children}
4 | ) 5 | } 6 | 7 | export default ErrorText -------------------------------------------------------------------------------- /client/src/components/Typography/HelperText.js: -------------------------------------------------------------------------------- 1 | function HelperText({className, children}){ 2 | return( 3 |{children}
4 | ) 5 | } 6 | 7 | export default Title -------------------------------------------------------------------------------- /client/src/containers/Layout.js: -------------------------------------------------------------------------------- 1 | import PageContent from "./PageContent"; 2 | import LeftSidebar from "./LeftSidebar"; 3 | import { useSelector, useDispatch } from "react-redux"; 4 | import RightSidebar from "./RightSidebar"; 5 | import { useEffect } from "react"; 6 | import { removeNotificationMessage } from "../features/common/headerSlice"; 7 | import { NotificationContainer, NotificationManager } from "react-notifications"; 8 | import "react-notifications/lib/notifications.css"; 9 | import ModalLayout from "./ModalLayout"; 10 | import io from "socket.io-client"; 11 | 12 | export const socketEmit = (type, data) => socket.emit(type, { data }); 13 | 14 | var socket; 15 | 16 | function Layout() { 17 | const { user } = useSelector((state) => state.auth); 18 | const dispatch = useDispatch(); 19 | const { newNotificationMessage, newNotificationStatus } = useSelector((state) => state.header); 20 | 21 | // useEffect(() => { 22 | // socket = io(process.env.REACT_APP_BASE_URL); 23 | // socket.on("connect", function () { 24 | // socket.emit("id", { userId: user.username }); 25 | // socket.on("like", function (data) { 26 | // NotificationManager.success(data.msg, "Success"); 27 | // }); 28 | // socket.on("comment", function (data) { 29 | // NotificationManager.success(data.msg, "Success"); 30 | // }); 31 | // }); 32 | // }, [user.username]); 33 | 34 | useEffect(() => { 35 | if (newNotificationMessage !== "") { 36 | if (newNotificationStatus === 1) NotificationManager.success(newNotificationMessage, "Success"); 37 | if (newNotificationStatus === 0) NotificationManager.error(newNotificationMessage, "Error"); 38 | dispatch(removeNotificationMessage()); 39 | } 40 | }, [dispatch, newNotificationMessage, newNotificationStatus]); 41 | 42 | return ( 43 | <> 44 | {/* Left drawer - containing page content and side bar (always open) */} 45 |