├── part 1 └── backend │ ├── .gitignore │ ├── package.json │ └── app.js ├── part 10 ├── backend │ ├── .gitignore │ ├── utils │ │ └── errorResponse.js │ ├── routes │ │ ├── authRoutes.js │ │ ├── jobsRoutes.js │ │ ├── jobsTypeRoutes.js │ │ └── userRoutes.js │ ├── models │ │ ├── jobTypeModel.js │ │ └── jobModel.js │ ├── package.json │ ├── middleware │ │ ├── error.js │ │ └── auth.js │ └── app.js └── frontend │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html │ ├── src │ ├── images │ │ ├── hr-logo.png │ │ ├── jobbg.jpg │ │ └── hr-project.png │ ├── redux │ │ ├── constants │ │ │ ├── jobconstant.js │ │ │ ├── jobTypeConstant.js │ │ │ └── userConstant.js │ │ ├── actions │ │ │ ├── jobTypeAction.js │ │ │ └── jobAction.js │ │ ├── reducers │ │ │ ├── jobTypeReducer.js │ │ │ └── jobReducer.js │ │ └── store.js │ ├── pages │ │ ├── user │ │ │ ├── UserDashboard.js │ │ │ └── UserJobsHistory.js │ │ ├── NotFound.js │ │ └── global │ │ │ └── Layout.js │ ├── setupTests.js │ ├── App.test.js │ ├── component │ │ ├── UserRoute.js │ │ ├── LoadingBox.js │ │ ├── Footer.js │ │ ├── Header.js │ │ └── SelectComponent.js │ ├── theme.js │ ├── index.css │ ├── reportWebVitals.js │ ├── index.js │ └── App.css │ ├── .gitignore │ └── package.json ├── part 11 ├── backend │ ├── .gitignore │ ├── utils │ │ └── errorResponse.js │ ├── routes │ │ ├── authRoutes.js │ │ ├── jobsRoutes.js │ │ ├── jobsTypeRoutes.js │ │ └── userRoutes.js │ ├── models │ │ ├── jobTypeModel.js │ │ └── jobModel.js │ ├── package.json │ ├── middleware │ │ ├── error.js │ │ └── auth.js │ └── app.js └── frontend │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html │ ├── src │ ├── images │ │ ├── hr-logo.png │ │ ├── jobbg.jpg │ │ └── hr-project.png │ ├── setupTests.js │ ├── redux │ │ ├── constants │ │ │ ├── jobTypeConstant.js │ │ │ ├── jobconstant.js │ │ │ └── userConstant.js │ │ ├── actions │ │ │ ├── jobTypeAction.js │ │ │ └── jobAction.js │ │ ├── reducers │ │ │ └── jobTypeReducer.js │ │ └── store.js │ ├── App.test.js │ ├── component │ │ ├── UserRoute.js │ │ ├── AdminRoute.js │ │ ├── ChartComponent.js │ │ ├── LoadingBox.js │ │ ├── Footer.js │ │ ├── Header.js │ │ ├── StatComponent.js │ │ └── SelectComponent.js │ ├── theme.js │ ├── pages │ │ ├── admin │ │ │ └── data │ │ │ │ └── data.js │ │ ├── NotFound.js │ │ ├── global │ │ │ └── Layout.js │ │ └── user │ │ │ └── UserJobsHistory.js │ ├── index.css │ ├── reportWebVitals.js │ ├── index.js │ └── App.css │ └── .gitignore ├── part 2 └── backend │ ├── .gitignore │ ├── utils │ └── errorResponse.js │ ├── package.json │ ├── middleware │ └── error.js │ └── app.js ├── part 3 └── backend │ ├── .gitignore │ ├── controllers │ └── authController.js │ ├── utils │ └── errorResponse.js │ ├── routes │ └── authRoutes.js │ ├── package.json │ ├── middleware │ └── error.js │ └── app.js ├── part 4 └── backend │ ├── .gitignore │ ├── utils │ └── errorResponse.js │ ├── routes │ └── authRoutes.js │ ├── package.json │ ├── middleware │ └── error.js │ └── app.js ├── part 5 └── backend │ ├── .gitignore │ ├── utils │ └── errorResponse.js │ ├── routes │ ├── authRoutes.js │ └── userRoutes.js │ ├── package.json │ ├── middleware │ ├── error.js │ └── auth.js │ └── app.js ├── part 6 ├── backend │ ├── .gitignore │ ├── utils │ │ └── errorResponse.js │ ├── routes │ │ ├── authRoutes.js │ │ └── userRoutes.js │ ├── package.json │ ├── middleware │ │ ├── error.js │ │ └── auth.js │ └── app.js └── frontend │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html │ ├── src │ ├── images │ │ └── jobbg.jpg │ ├── component │ │ ├── Footer.js │ │ └── Header.js │ ├── pages │ │ ├── NotFound.js │ │ └── Home.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.js │ ├── theme.js │ ├── index.css │ ├── reportWebVitals.js │ ├── App.css │ └── App.js │ ├── .gitignore │ └── package.json ├── part 7 ├── backend │ ├── .gitignore │ ├── utils │ │ └── errorResponse.js │ ├── routes │ │ ├── jobsTypeRoutes.js │ │ ├── authRoutes.js │ │ ├── jobsRoutes.js │ │ └── userRoutes.js │ ├── models │ │ ├── jobTypeModel.js │ │ └── jobModel.js │ ├── package.json │ ├── controllers │ │ └── jobsTypeController.js │ ├── middleware │ │ ├── error.js │ │ └── auth.js │ └── app.js └── frontend │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html │ ├── src │ ├── images │ │ └── jobbg.jpg │ ├── component │ │ ├── Footer.js │ │ └── Header.js │ ├── pages │ │ ├── NotFound.js │ │ └── Home.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.js │ ├── theme.js │ ├── index.css │ ├── reportWebVitals.js │ ├── App.css │ └── App.js │ ├── .gitignore │ └── package.json ├── part 8 ├── backend │ ├── .gitignore │ ├── utils │ │ └── errorResponse.js │ ├── routes │ │ ├── authRoutes.js │ │ ├── jobsRoutes.js │ │ ├── jobsTypeRoutes.js │ │ └── userRoutes.js │ ├── models │ │ ├── jobTypeModel.js │ │ └── jobModel.js │ ├── package.json │ └── middleware │ │ ├── error.js │ │ └── auth.js └── frontend │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html │ ├── src │ ├── images │ │ └── jobbg.jpg │ ├── component │ │ ├── Footer.js │ │ └── Header.js │ ├── pages │ │ ├── NotFound.js │ │ └── Home.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.js │ ├── theme.js │ ├── index.css │ ├── reportWebVitals.js │ ├── App.css │ └── App.js │ ├── .gitignore │ └── package.json ├── part 9 ├── backend │ ├── .gitignore │ ├── utils │ │ └── errorResponse.js │ ├── routes │ │ ├── authRoutes.js │ │ ├── jobsRoutes.js │ │ ├── jobsTypeRoutes.js │ │ └── userRoutes.js │ ├── models │ │ ├── jobTypeModel.js │ │ └── jobModel.js │ ├── package.json │ └── middleware │ │ ├── error.js │ │ └── auth.js └── frontend │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html │ ├── src │ ├── images │ │ └── jobbg.jpg │ ├── pages │ │ └── NotFound.js │ ├── redux │ │ ├── constants │ │ │ ├── jobconstant.js │ │ │ └── jobTypeConstant.js │ │ ├── actions │ │ │ ├── jobTypeAction.js │ │ │ └── jobAction.js │ │ ├── store.js │ │ └── reducers │ │ │ ├── jobTypeReducer.js │ │ │ └── jobReducer.js │ ├── setupTests.js │ ├── App.test.js │ ├── theme.js │ ├── index.css │ ├── reportWebVitals.js │ ├── index.js │ ├── component │ │ ├── LoadingBox.js │ │ ├── Footer.js │ │ ├── Header.js │ │ └── SelectComponent.js │ ├── App.css │ └── App.js │ ├── .gitignore │ └── package.json ├── bonus ├── frontend │ ├── src │ │ ├── redux │ │ │ ├── constants │ │ │ │ ├── themeConstant.js │ │ │ │ ├── jobTypeConstant.js │ │ │ │ ├── jobconstant.js │ │ │ │ └── userConstant.js │ │ │ ├── actions │ │ │ │ ├── themeAction.js │ │ │ │ └── jobTypeAction.js │ │ │ ├── reducers │ │ │ │ ├── themeModeReducer.js │ │ │ │ └── jobTypeReducer.js │ │ │ └── store.js │ │ ├── images │ │ │ ├── jobbg.jpg │ │ │ ├── hr-logo.png │ │ │ ├── hr-project.png │ │ │ ├── dashboardjob.png │ │ │ └── jobportaledit.png │ │ ├── setupTests.js │ │ ├── App.test.js │ │ ├── component │ │ │ ├── UserRoute.js │ │ │ ├── AdminRoute.js │ │ │ ├── ChartComponent.js │ │ │ ├── LoadingBox.js │ │ │ ├── Footer.js │ │ │ ├── Header.js │ │ │ └── StatComponent.js │ │ ├── pages │ │ │ ├── admin │ │ │ │ └── data │ │ │ │ │ └── data.js │ │ │ ├── NotFound.js │ │ │ ├── global │ │ │ │ └── Layout.js │ │ │ └── user │ │ │ │ └── UserJobsHistory.js │ │ ├── index.css │ │ ├── reportWebVitals.js │ │ ├── index.js │ │ ├── App.css │ │ └── theme.js │ ├── build │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── static │ │ │ └── media │ │ │ │ ├── jobbg.667fd8d0ebae0dbf848c.jpg │ │ │ │ └── hr-project.4b14541114bbf0b14450.png │ │ ├── asset-manifest.json │ │ ├── manifest.json │ │ └── index.html │ └── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html ├── backend │ ├── utils │ │ └── errorResponse.js │ ├── routes │ │ ├── authRoutes.js │ │ ├── jobsRoutes.js │ │ ├── jobsTypeRoutes.js │ │ └── userRoutes.js │ ├── models │ │ ├── jobTypeModel.js │ │ └── jobModel.js │ └── middleware │ │ ├── error.js │ │ └── auth.js ├── .gitignore └── package.json └── README.md /part 1/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 10/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 11/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 2/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 3/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 4/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 5/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 6/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 7/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 8/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /part 9/backend/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /node_modules 3 | .env -------------------------------------------------------------------------------- /bonus/frontend/src/redux/constants/themeConstant.js: -------------------------------------------------------------------------------- 1 | export const THEME_MODE = "THEME_MODE"; -------------------------------------------------------------------------------- /bonus/frontend/build/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /bonus/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /part 10/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /part 11/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /part 6/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /part 7/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /part 8/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /part 9/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /bonus/frontend/build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/build/favicon.ico -------------------------------------------------------------------------------- /bonus/frontend/build/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/build/logo192.png -------------------------------------------------------------------------------- /bonus/frontend/build/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/build/logo512.png -------------------------------------------------------------------------------- /bonus/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/public/favicon.ico -------------------------------------------------------------------------------- /bonus/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/public/logo192.png -------------------------------------------------------------------------------- /bonus/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/public/logo512.png -------------------------------------------------------------------------------- /part 3/backend/controllers/authController.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | exports.signin = (req, res) => { 4 | res.send("Hello from Node Js"); 5 | } 6 | -------------------------------------------------------------------------------- /part 6/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 6/frontend/public/favicon.ico -------------------------------------------------------------------------------- /part 6/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 6/frontend/public/logo192.png -------------------------------------------------------------------------------- /part 6/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 6/frontend/public/logo512.png -------------------------------------------------------------------------------- /part 7/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 7/frontend/public/favicon.ico -------------------------------------------------------------------------------- /part 7/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 7/frontend/public/logo192.png -------------------------------------------------------------------------------- /part 7/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 7/frontend/public/logo512.png -------------------------------------------------------------------------------- /part 8/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 8/frontend/public/favicon.ico -------------------------------------------------------------------------------- /part 8/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 8/frontend/public/logo192.png -------------------------------------------------------------------------------- /part 8/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 8/frontend/public/logo512.png -------------------------------------------------------------------------------- /part 9/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 9/frontend/public/favicon.ico -------------------------------------------------------------------------------- /part 9/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 9/frontend/public/logo192.png -------------------------------------------------------------------------------- /part 9/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 9/frontend/public/logo512.png -------------------------------------------------------------------------------- /bonus/frontend/src/images/jobbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/src/images/jobbg.jpg -------------------------------------------------------------------------------- /part 10/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 10/frontend/public/favicon.ico -------------------------------------------------------------------------------- /part 10/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 10/frontend/public/logo192.png -------------------------------------------------------------------------------- /part 10/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 10/frontend/public/logo512.png -------------------------------------------------------------------------------- /part 11/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 11/frontend/public/favicon.ico -------------------------------------------------------------------------------- /part 11/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 11/frontend/public/logo192.png -------------------------------------------------------------------------------- /part 11/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 11/frontend/public/logo512.png -------------------------------------------------------------------------------- /part 6/frontend/src/images/jobbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 6/frontend/src/images/jobbg.jpg -------------------------------------------------------------------------------- /part 7/frontend/src/images/jobbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 7/frontend/src/images/jobbg.jpg -------------------------------------------------------------------------------- /part 8/frontend/src/images/jobbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 8/frontend/src/images/jobbg.jpg -------------------------------------------------------------------------------- /part 9/frontend/src/images/jobbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 9/frontend/src/images/jobbg.jpg -------------------------------------------------------------------------------- /bonus/frontend/src/images/hr-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/src/images/hr-logo.png -------------------------------------------------------------------------------- /part 10/frontend/src/images/hr-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 10/frontend/src/images/hr-logo.png -------------------------------------------------------------------------------- /part 10/frontend/src/images/jobbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 10/frontend/src/images/jobbg.jpg -------------------------------------------------------------------------------- /part 11/frontend/src/images/hr-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 11/frontend/src/images/hr-logo.png -------------------------------------------------------------------------------- /part 11/frontend/src/images/jobbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 11/frontend/src/images/jobbg.jpg -------------------------------------------------------------------------------- /bonus/frontend/src/images/hr-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/src/images/hr-project.png -------------------------------------------------------------------------------- /bonus/frontend/src/images/dashboardjob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/src/images/dashboardjob.png -------------------------------------------------------------------------------- /bonus/frontend/src/images/jobportaledit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/src/images/jobportaledit.png -------------------------------------------------------------------------------- /part 10/frontend/src/images/hr-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 10/frontend/src/images/hr-project.png -------------------------------------------------------------------------------- /part 11/frontend/src/images/hr-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/part 11/frontend/src/images/hr-project.png -------------------------------------------------------------------------------- /part 6/frontend/src/component/Footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Footer = () => { 4 | return ( 5 |
Footer
6 | ) 7 | } 8 | 9 | export default Footer -------------------------------------------------------------------------------- /part 7/frontend/src/component/Footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Footer = () => { 4 | return ( 5 |
Footer
6 | ) 7 | } 8 | 9 | export default Footer -------------------------------------------------------------------------------- /part 8/frontend/src/component/Footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Footer = () => { 4 | return ( 5 |
Footer
6 | ) 7 | } 8 | 9 | export default Footer -------------------------------------------------------------------------------- /bonus/frontend/build/static/media/jobbg.667fd8d0ebae0dbf848c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/build/static/media/jobbg.667fd8d0ebae0dbf848c.jpg -------------------------------------------------------------------------------- /bonus/frontend/build/static/media/hr-project.4b14541114bbf0b14450.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/job-portal-mern-stack/main/bonus/frontend/build/static/media/hr-project.4b14541114bbf0b14450.png -------------------------------------------------------------------------------- /bonus/frontend/src/redux/actions/themeAction.js: -------------------------------------------------------------------------------- 1 | import { THEME_MODE } from "../constants/themeConstant" 2 | 3 | export const toggleActionTheme = () => (dispatch) => { 4 | dispatch({ type: THEME_MODE }) 5 | } -------------------------------------------------------------------------------- /bonus/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 10/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 11/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 2/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 3/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 4/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 5/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 6/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 6/frontend/src/pages/NotFound.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const NotFound = () => { 4 | return ( 5 | <> 6 |

Page not found

7 | 8 | ) 9 | } 10 | 11 | export default NotFound -------------------------------------------------------------------------------- /part 7/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 7/frontend/src/pages/NotFound.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const NotFound = () => { 4 | return ( 5 | <> 6 |

Page not found

7 | 8 | ) 9 | } 10 | 11 | export default NotFound -------------------------------------------------------------------------------- /part 8/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 8/frontend/src/pages/NotFound.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const NotFound = () => { 4 | return ( 5 | <> 6 |

Page not found

7 | 8 | ) 9 | } 10 | 11 | export default NotFound -------------------------------------------------------------------------------- /part 9/backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | 2 | class ErrorResponse extends Error { 3 | constructor(message, codeStatus) { 4 | super(message); 5 | this.codeStatus = codeStatus; 6 | } 7 | } 8 | 9 | module.exports = ErrorResponse; -------------------------------------------------------------------------------- /part 9/frontend/src/pages/NotFound.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const NotFound = () => { 4 | return ( 5 | <> 6 |

Page not found

7 | 8 | ) 9 | } 10 | 11 | export default NotFound -------------------------------------------------------------------------------- /part 10/frontend/src/redux/constants/jobconstant.js: -------------------------------------------------------------------------------- 1 | export const JOB_LOAD_REQUEST = "JOB_LOAD_REQUEST"; 2 | export const JOB_LOAD_SUCCESS = "JOB_LOAD_SUCCESS"; 3 | export const JOB_LOAD_FAIL = "JOB_LOAD_FAIL"; 4 | export const JOB_LOAD_RESET = "JOB_LOAD_RESET"; -------------------------------------------------------------------------------- /part 3/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const { signin } = require('../controllers/authController'); 3 | const router = express.Router(); 4 | 5 | 6 | //auth routes 7 | router.get('/', signin); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /part 9/frontend/src/redux/constants/jobconstant.js: -------------------------------------------------------------------------------- 1 | export const JOB_LOAD_REQUEST = "JOB_LOAD_REQUEST"; 2 | export const JOB_LOAD_SUCCESS = "JOB_LOAD_SUCCESS"; 3 | export const JOB_LOAD_FAIL = "JOB_LOAD_FAIL"; 4 | export const JOB_LOAD_RESET = "JOB_LOAD_RESET"; -------------------------------------------------------------------------------- /part 10/frontend/src/pages/user/UserDashboard.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const UserDashboard = () => { 4 | return ( 5 | <> 6 |

user Dashboard

7 | 8 | ) 9 | } 10 | 11 | export default UserDashboard -------------------------------------------------------------------------------- /bonus/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /part 10/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /part 11/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /part 6/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /part 7/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /part 8/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /part 9/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /part 9/frontend/src/redux/constants/jobTypeConstant.js: -------------------------------------------------------------------------------- 1 | export const JOB_TYPE_LOAD_REQUEST = "JOB_TYPE_LOAD_REQUEST"; 2 | export const JOB_TYPE_LOAD_SUCCESS = "JOB_TYPE_LOAD_SUCCESS"; 3 | export const JOB_TYPE_LOAD_FAIL = "JOB_TYPE_LOAD_FAIL"; 4 | export const JOB_TYPE_LOAD_RESET = "JOB_TYPE_LOAD_RESET"; -------------------------------------------------------------------------------- /bonus/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /part 10/frontend/src/redux/constants/jobTypeConstant.js: -------------------------------------------------------------------------------- 1 | export const JOB_TYPE_LOAD_REQUEST = "JOB_TYPE_LOAD_REQUEST"; 2 | export const JOB_TYPE_LOAD_SUCCESS = "JOB_TYPE_LOAD_SUCCESS"; 3 | export const JOB_TYPE_LOAD_FAIL = "JOB_TYPE_LOAD_FAIL"; 4 | export const JOB_TYPE_LOAD_RESET = "JOB_TYPE_LOAD_RESET"; -------------------------------------------------------------------------------- /part 11/frontend/src/redux/constants/jobTypeConstant.js: -------------------------------------------------------------------------------- 1 | export const JOB_TYPE_LOAD_REQUEST = "JOB_TYPE_LOAD_REQUEST"; 2 | export const JOB_TYPE_LOAD_SUCCESS = "JOB_TYPE_LOAD_SUCCESS"; 3 | export const JOB_TYPE_LOAD_FAIL = "JOB_TYPE_LOAD_FAIL"; 4 | export const JOB_TYPE_LOAD_RESET = "JOB_TYPE_LOAD_RESET"; -------------------------------------------------------------------------------- /part 10/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /part 11/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /part 6/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /part 7/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /part 8/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /part 9/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /part 6/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | 15 | -------------------------------------------------------------------------------- /part 7/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | 15 | -------------------------------------------------------------------------------- /part 8/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | 15 | -------------------------------------------------------------------------------- /part 6/frontend/src/pages/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Navbar from '../component/Navbar' 3 | import Header from '../component/Header' 4 | 5 | 6 | const Home = () => { 7 | return ( 8 | <> 9 | 10 |
11 |

Home page

12 | 13 | ) 14 | } 15 | 16 | export default Home -------------------------------------------------------------------------------- /part 7/frontend/src/pages/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Navbar from '../component/Navbar' 3 | import Header from '../component/Header' 4 | 5 | 6 | const Home = () => { 7 | return ( 8 | <> 9 | 10 |
11 |

Home page

12 | 13 | ) 14 | } 15 | 16 | export default Home -------------------------------------------------------------------------------- /part 8/frontend/src/pages/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Navbar from '../component/Navbar' 3 | import Header from '../component/Header' 4 | 5 | 6 | const Home = () => { 7 | return ( 8 | <> 9 | 10 |
11 |

Home page

12 | 13 | ) 14 | } 15 | 16 | export default Home -------------------------------------------------------------------------------- /bonus/frontend/src/component/UserRoute.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useSelector } from 'react-redux'; 3 | import { Navigate } from 'react-router-dom'; 4 | 5 | const UserRoute = ({ children }) => { 6 | 7 | const { userInfo } = useSelector((state) => state.signIn); 8 | return userInfo ? children : ; 9 | } 10 | 11 | export default UserRoute -------------------------------------------------------------------------------- /part 10/frontend/src/component/UserRoute.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useSelector } from 'react-redux'; 3 | import { Navigate } from 'react-router-dom'; 4 | 5 | const UserRoute = ({ children }) => { 6 | 7 | const { userInfo } = useSelector((state) => state.signIn); 8 | return userInfo ? children : ; 9 | } 10 | 11 | export default UserRoute -------------------------------------------------------------------------------- /part 11/frontend/src/component/UserRoute.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useSelector } from 'react-redux'; 3 | import { Navigate } from 'react-router-dom'; 4 | 5 | const UserRoute = ({ children }) => { 6 | 7 | const { userInfo } = useSelector((state) => state.signIn); 8 | return userInfo ? children : ; 9 | } 10 | 11 | export default UserRoute -------------------------------------------------------------------------------- /bonus/frontend/src/component/AdminRoute.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useSelector } from 'react-redux'; 3 | import { Navigate } from 'react-router-dom'; 4 | 5 | const AdminRoute = ({ children }) => { 6 | 7 | const { userInfo } = useSelector((state) => state.signIn); 8 | return userInfo && userInfo.role === 1 ? children : ; 9 | } 10 | 11 | export default AdminRoute -------------------------------------------------------------------------------- /part 11/frontend/src/component/AdminRoute.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useSelector } from 'react-redux'; 3 | import { Navigate } from 'react-router-dom'; 4 | 5 | const AdminRoute = ({ children }) => { 6 | 7 | const { userInfo } = useSelector((state) => state.signIn); 8 | return userInfo && userInfo.role === 1 ? children : ; 9 | } 10 | 11 | export default AdminRoute -------------------------------------------------------------------------------- /part 10/frontend/src/theme.js: -------------------------------------------------------------------------------- 1 | import { createTheme } from '@mui/material/styles'; 2 | import { blue, lightBlue } from '@mui/material/colors'; 3 | 4 | export const theme = createTheme({ 5 | palette: { 6 | primary: { 7 | main: blue[500] 8 | }, 9 | secondary: { 10 | main: lightBlue[800], 11 | midNightBlue: "#003366" 12 | } 13 | } 14 | }); -------------------------------------------------------------------------------- /part 11/frontend/src/theme.js: -------------------------------------------------------------------------------- 1 | import { createTheme } from '@mui/material/styles'; 2 | import { blue, lightBlue } from '@mui/material/colors'; 3 | 4 | export const theme = createTheme({ 5 | palette: { 6 | primary: { 7 | main: blue[500] 8 | }, 9 | secondary: { 10 | main: lightBlue[800], 11 | midNightBlue: "#003366" 12 | } 13 | } 14 | }); -------------------------------------------------------------------------------- /part 6/frontend/src/theme.js: -------------------------------------------------------------------------------- 1 | import { createTheme } from '@mui/material/styles'; 2 | import { blue, lightBlue } from '@mui/material/colors'; 3 | 4 | export const theme = createTheme({ 5 | palette: { 6 | primary: { 7 | main: blue[500] 8 | }, 9 | secondary: { 10 | main: lightBlue[800], 11 | midNightBlue: "#003366" 12 | } 13 | } 14 | }); -------------------------------------------------------------------------------- /part 7/frontend/src/theme.js: -------------------------------------------------------------------------------- 1 | import { createTheme } from '@mui/material/styles'; 2 | import { blue, lightBlue } from '@mui/material/colors'; 3 | 4 | export const theme = createTheme({ 5 | palette: { 6 | primary: { 7 | main: blue[500] 8 | }, 9 | secondary: { 10 | main: lightBlue[800], 11 | midNightBlue: "#003366" 12 | } 13 | } 14 | }); -------------------------------------------------------------------------------- /part 8/frontend/src/theme.js: -------------------------------------------------------------------------------- 1 | import { createTheme } from '@mui/material/styles'; 2 | import { blue, lightBlue } from '@mui/material/colors'; 3 | 4 | export const theme = createTheme({ 5 | palette: { 6 | primary: { 7 | main: blue[500] 8 | }, 9 | secondary: { 10 | main: lightBlue[800], 11 | midNightBlue: "#003366" 12 | } 13 | } 14 | }); -------------------------------------------------------------------------------- /part 9/frontend/src/theme.js: -------------------------------------------------------------------------------- 1 | import { createTheme } from '@mui/material/styles'; 2 | import { blue, lightBlue } from '@mui/material/colors'; 3 | 4 | export const theme = createTheme({ 5 | palette: { 6 | primary: { 7 | main: blue[500] 8 | }, 9 | secondary: { 10 | main: lightBlue[800], 11 | midNightBlue: "#003366" 12 | } 13 | } 14 | }); -------------------------------------------------------------------------------- /part 4/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout } = require('../controllers/authController'); 4 | 5 | 6 | //auth routes 7 | // /api/signup 8 | router.post('/signup', signup); 9 | // /api/signin 10 | router.post('/signin', signin); 11 | // /api/logout 12 | router.get('/logout', logout); 13 | 14 | module.exports = router; -------------------------------------------------------------------------------- /bonus/frontend/src/pages/admin/data/data.js: -------------------------------------------------------------------------------- 1 | export const data = [ 2 | ["Year", "Jobs", "Pending", "Approved"], 3 | ["2014", 1000, 400, 200], 4 | ["2015", 1170, 460, 250], 5 | ["2016", 660, 1120, 300], 6 | ["2023", 1030, 540, 350], 7 | ]; 8 | 9 | export const options = { 10 | chart: { 11 | title: "HR Performance", 12 | // subtitle: "Sales, Expenses, and Profit: 2014-2017", 13 | }, 14 | }; -------------------------------------------------------------------------------- /part 11/frontend/src/pages/admin/data/data.js: -------------------------------------------------------------------------------- 1 | export const data = [ 2 | ["Year", "Jobs", "Pending", "Approved"], 3 | ["2014", 1000, 400, 200], 4 | ["2015", 1170, 460, 250], 5 | ["2016", 660, 1120, 300], 6 | ["2023", 1030, 540, 350], 7 | ]; 8 | 9 | export const options = { 10 | chart: { 11 | title: "HR Performance", 12 | // subtitle: "Sales, Expenses, and Profit: 2014-2017", 13 | }, 14 | }; -------------------------------------------------------------------------------- /part 10/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.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 | -------------------------------------------------------------------------------- /part 11/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.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 | -------------------------------------------------------------------------------- /part 6/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.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 | -------------------------------------------------------------------------------- /part 7/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.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 | -------------------------------------------------------------------------------- /part 8/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.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 | -------------------------------------------------------------------------------- /part 9/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.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 | -------------------------------------------------------------------------------- /bonus/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /part 10/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /part 11/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /part 6/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /part 7/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /part 8/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /part 9/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /bonus/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 | -------------------------------------------------------------------------------- /part 10/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 | -------------------------------------------------------------------------------- /part 11/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 | -------------------------------------------------------------------------------- /part 6/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 | -------------------------------------------------------------------------------- /part 7/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 | -------------------------------------------------------------------------------- /part 8/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 | -------------------------------------------------------------------------------- /part 9/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 | -------------------------------------------------------------------------------- /bonus/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import { Provider } from 'react-redux'; 6 | import store from './redux/store'; 7 | 8 | 9 | 10 | 11 | const root = ReactDOM.createRoot(document.getElementById('root')); 12 | root.render( 13 | 14 | 15 | 16 | 17 | 18 | ); 19 | 20 | 21 | -------------------------------------------------------------------------------- /part 10/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import { Provider } from 'react-redux'; 6 | import store from './redux/store'; 7 | 8 | 9 | 10 | 11 | const root = ReactDOM.createRoot(document.getElementById('root')); 12 | root.render( 13 | 14 | 15 | 16 | 17 | 18 | ); 19 | 20 | 21 | -------------------------------------------------------------------------------- /part 11/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import { Provider } from 'react-redux'; 6 | import store from './redux/store'; 7 | 8 | 9 | 10 | 11 | const root = ReactDOM.createRoot(document.getElementById('root')); 12 | root.render( 13 | 14 | 15 | 16 | 17 | 18 | ); 19 | 20 | 21 | -------------------------------------------------------------------------------- /part 9/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import { Provider } from 'react-redux'; 6 | import store from './redux/store'; 7 | 8 | 9 | 10 | 11 | const root = ReactDOM.createRoot(document.getElementById('root')); 12 | root.render( 13 | 14 | 15 | 16 | 17 | 18 | ); 19 | 20 | 21 | -------------------------------------------------------------------------------- /part 7/backend/routes/jobsTypeRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { createJobType, allJobsType } = require('../controllers/jobsTypeController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | 8 | //job type routes 9 | 10 | // /api/type/create 11 | router.post('/type/create', isAuthenticated, createJobType) 12 | // /api/type/jobs 13 | router.get('/type/jobs', allJobsType) 14 | 15 | 16 | 17 | 18 | 19 | module.exports = router; -------------------------------------------------------------------------------- /part 11/frontend/src/redux/constants/jobconstant.js: -------------------------------------------------------------------------------- 1 | export const JOB_LOAD_REQUEST = "JOB_LOAD_REQUEST"; 2 | export const JOB_LOAD_SUCCESS = "JOB_LOAD_SUCCESS"; 3 | export const JOB_LOAD_FAIL = "JOB_LOAD_FAIL"; 4 | export const JOB_LOAD_RESET = "JOB_LOAD_RESET"; 5 | 6 | export const JOB_LOAD_SINGLE_REQUEST = "JOB_LOAD_SINGLE_REQUEST"; 7 | export const JOB_LOAD_SINGLE_SUCCESS = "JOB_LOAD_SINGLE_SUCCESS"; 8 | export const JOB_LOAD_SINGLE_FAIL = "JOB_LOAD_SINGLE_FAIL"; 9 | export const JOB_LOAD_SINGLE_RESET = "JOB_LOAD_SINGLE_RESET"; -------------------------------------------------------------------------------- /bonus/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .form_style { 2 | position: relative; 3 | outline: 0px; 4 | margin: auto; 5 | display: flex; 6 | -webkit-box-pack: center; 7 | justify-content: center; 8 | padding: 24px; 9 | background-color: rgb(255, 255, 255); 10 | border-width: 1px 0px; 11 | border-style: solid; 12 | border-color: rgb(231, 235, 240); 13 | border-image: initial; 14 | width: 35%; 15 | } 16 | 17 | .border-style { 18 | border-radius: 10px; 19 | border-left-width: 1px; 20 | border-right-width: 1px; 21 | } -------------------------------------------------------------------------------- /part 10/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .form_style { 2 | position: relative; 3 | outline: 0px; 4 | margin: auto; 5 | display: flex; 6 | -webkit-box-pack: center; 7 | justify-content: center; 8 | padding: 24px; 9 | background-color: rgb(255, 255, 255); 10 | border-width: 1px 0px; 11 | border-style: solid; 12 | border-color: rgb(231, 235, 240); 13 | border-image: initial; 14 | width: 35%; 15 | } 16 | 17 | .border-style { 18 | border-radius: 10px; 19 | border-left-width: 1px; 20 | border-right-width: 1px; 21 | } -------------------------------------------------------------------------------- /part 11/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .form_style { 2 | position: relative; 3 | outline: 0px; 4 | margin: auto; 5 | display: flex; 6 | -webkit-box-pack: center; 7 | justify-content: center; 8 | padding: 24px; 9 | background-color: rgb(255, 255, 255); 10 | border-width: 1px 0px; 11 | border-style: solid; 12 | border-color: rgb(231, 235, 240); 13 | border-image: initial; 14 | width: 35%; 15 | } 16 | 17 | .border-style { 18 | border-radius: 10px; 19 | border-left-width: 1px; 20 | border-right-width: 1px; 21 | } -------------------------------------------------------------------------------- /bonus/frontend/src/component/ChartComponent.js: -------------------------------------------------------------------------------- 1 | 2 | import { Card, CardContent, useTheme } from '@mui/material' 3 | 4 | 5 | const ChartComponent = ({ children }) => { 6 | const { palette } = useTheme(); 7 | return ( 8 | <> 9 | 10 | 11 | {children} 12 | 13 | 14 | 15 | 16 | ) 17 | } 18 | 19 | export default ChartComponent -------------------------------------------------------------------------------- /part 11/frontend/src/component/ChartComponent.js: -------------------------------------------------------------------------------- 1 | 2 | import { Card, CardContent, useTheme } from '@mui/material' 3 | 4 | 5 | const ChartComponent = ({ children }) => { 6 | const { palette } = useTheme(); 7 | return ( 8 | <> 9 | 10 | 11 | {children} 12 | 13 | 14 | 15 | 16 | ) 17 | } 18 | 19 | export default ChartComponent -------------------------------------------------------------------------------- /bonus/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout, userProfile } = require('../controllers/authController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | //auth routes 8 | // /api/signup 9 | router.post('/signup', signup); 10 | // /api/signin 11 | router.post('/signin', signin); 12 | // /api/logout 13 | router.get('/logout', logout); 14 | // /api/me 15 | router.get('/me', isAuthenticated, userProfile); 16 | 17 | module.exports = router; -------------------------------------------------------------------------------- /bonus/frontend/src/redux/constants/jobTypeConstant.js: -------------------------------------------------------------------------------- 1 | export const JOB_TYPE_LOAD_REQUEST = "JOB_TYPE_LOAD_REQUEST"; 2 | export const JOB_TYPE_LOAD_SUCCESS = "JOB_TYPE_LOAD_SUCCESS"; 3 | export const JOB_TYPE_LOAD_FAIL = "JOB_TYPE_LOAD_FAIL"; 4 | export const JOB_TYPE_LOAD_RESET = "JOB_TYPE_LOAD_RESET"; 5 | 6 | export const CREATE_JOB_TYPE_REQUEST = "CREATE_JOB_TYPE_REQUEST"; 7 | export const CREATE_JOB_TYPE_SUCCESS = "CREATE_JOB_TYPE_SUCCESS"; 8 | export const CREATE_JOB_TYPE_FAIL = "CREATE_JOB_TYPE_FAIL"; 9 | export const CREATE_JOB_TYPE_RESET = "CREATE_JOB_TYPE_RESET"; -------------------------------------------------------------------------------- /part 10/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout, userProfile } = require('../controllers/authController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | //auth routes 8 | // /api/signup 9 | router.post('/signup', signup); 10 | // /api/signin 11 | router.post('/signin', signin); 12 | // /api/logout 13 | router.get('/logout', logout); 14 | // /api/me 15 | router.get('/me', isAuthenticated, userProfile); 16 | 17 | module.exports = router; -------------------------------------------------------------------------------- /part 11/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout, userProfile } = require('../controllers/authController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | //auth routes 8 | // /api/signup 9 | router.post('/signup', signup); 10 | // /api/signin 11 | router.post('/signin', signin); 12 | // /api/logout 13 | router.get('/logout', logout); 14 | // /api/me 15 | router.get('/me', isAuthenticated, userProfile); 16 | 17 | module.exports = router; -------------------------------------------------------------------------------- /part 5/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout, userProfile } = require('../controllers/authController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | //auth routes 8 | // /api/signup 9 | router.post('/signup', signup); 10 | // /api/signin 11 | router.post('/signin', signin); 12 | // /api/logout 13 | router.get('/logout', logout); 14 | // /api/me 15 | router.get('/me', isAuthenticated, userProfile); 16 | 17 | module.exports = router; -------------------------------------------------------------------------------- /part 6/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout, userProfile } = require('../controllers/authController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | //auth routes 8 | // /api/signup 9 | router.post('/signup', signup); 10 | // /api/signin 11 | router.post('/signin', signin); 12 | // /api/logout 13 | router.get('/logout', logout); 14 | // /api/me 15 | router.get('/me', isAuthenticated, userProfile); 16 | 17 | module.exports = router; -------------------------------------------------------------------------------- /part 7/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout, userProfile } = require('../controllers/authController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | //auth routes 8 | // /api/signup 9 | router.post('/signup', signup); 10 | // /api/signin 11 | router.post('/signin', signin); 12 | // /api/logout 13 | router.get('/logout', logout); 14 | // /api/me 15 | router.get('/me', isAuthenticated, userProfile); 16 | 17 | module.exports = router; -------------------------------------------------------------------------------- /part 8/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout, userProfile } = require('../controllers/authController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | //auth routes 8 | // /api/signup 9 | router.post('/signup', signup); 10 | // /api/signin 11 | router.post('/signin', signin); 12 | // /api/logout 13 | router.get('/logout', logout); 14 | // /api/me 15 | router.get('/me', isAuthenticated, userProfile); 16 | 17 | module.exports = router; -------------------------------------------------------------------------------- /part 9/backend/routes/authRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const { signup, signin, logout, userProfile } = require('../controllers/authController'); 4 | const { isAuthenticated } = require('../middleware/auth'); 5 | 6 | 7 | //auth routes 8 | // /api/signup 9 | router.post('/signup', signup); 10 | // /api/signin 11 | router.post('/signin', signin); 12 | // /api/logout 13 | router.get('/logout', logout); 14 | // /api/me 15 | router.get('/me', isAuthenticated, userProfile); 16 | 17 | module.exports = router; -------------------------------------------------------------------------------- /bonus/.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 | /frontend/node_modules 13 | package-lock.json 14 | /frontend/package-lock.json 15 | /backend/package-lock.json 16 | package-lock.json 17 | 18 | # misc 19 | .DS_Store 20 | .env 21 | .env.local 22 | .env.development.local 23 | .env.test.local 24 | .env.production.local 25 | 26 | npm-debug.log* 27 | yarn-debug.log* 28 | yarn-error.log* 29 | -------------------------------------------------------------------------------- /bonus/frontend/src/pages/NotFound.js: -------------------------------------------------------------------------------- 1 | import { Box } from '@mui/material' 2 | import React from 'react' 3 | import Footer from '../component/Footer' 4 | import Navbar from '../component/Navbar' 5 | 6 | const NotFound = () => { 7 | return ( 8 | <> 9 | 10 | 11 | 12 |

Page not found!

13 |
14 |