├── .gitignore ├── README.md ├── backend ├── Process.md ├── apiHelp.js ├── app.js ├── controllers │ ├── JobsTypeController.js │ ├── authController.js │ ├── courseControllers.js │ ├── jobsController.js │ └── userController.js ├── middleware │ ├── auth.js │ └── error.js ├── models │ ├── JobTypeModel.js │ ├── courseModel.js │ ├── jobModel.js │ └── userModel.js ├── package-lock.json ├── package.json ├── routes │ ├── authRoutes.js │ ├── courseRoutes.js │ ├── jobRoutes.js │ ├── jobsTypeRoutes.js │ └── userRoutes.js └── utils │ └── errorResponse.js └── frontend ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json ├── privacy.png ├── robots.txt └── shirt-svgrepo-com.svg ├── src ├── App.jsx ├── components │ ├── AdminRoute.jsx │ ├── CardElement.jsx │ ├── ChartComponent.jsx │ ├── ContactUs.jsx │ ├── Demo.jsx │ ├── FindJobsGlimpse.jsx │ ├── Footer.jsx │ ├── HeroSection.jsx │ ├── LoadingBox.jsx │ ├── NavBar.jsx │ ├── Policy.jsx │ ├── SearchInput.jsx │ ├── SlcComponent.jsx │ ├── StatComponent.jsx │ ├── SubcribeComponent.jsx │ ├── Testimonials.jsx │ └── UserRoutes.jsx ├── images │ ├── hr-logo.png │ └── hr-project.png ├── img │ ├── admin_dashboard.png │ ├── aws_img.png │ ├── bg_bg.png │ ├── down_arrow.svg │ ├── edit_profile_icon.svg │ ├── free_img.png │ ├── github_icon.png │ ├── google_img.png │ ├── hero_bg.png │ ├── ibm_img.png │ ├── ibmlogo.png │ ├── instagram_icon.png │ ├── jobbg.jpg │ ├── linkedin_icon.png │ ├── location.png │ ├── login.png │ ├── logout_icon.svg │ ├── mail_icon.png │ ├── menu_icon.svg │ ├── ms_img.png │ ├── phone_icon.png │ ├── privacy_policy.png │ ├── settings_icon.svg │ ├── shirt-svgrepo-com.svg │ ├── sony_img.png │ ├── spotigy_img.png │ ├── tesla_img.png │ ├── testimonial_1.jpg │ ├── testimonial_2.jpg │ ├── testimonial_3.jpg │ ├── twitter_icon.png │ ├── user_dashboard.png │ ├── user_profile_image.png │ └── walking_girl.png ├── index.css ├── index.js ├── pages │ ├── FindJob.jsx │ ├── Home.jsx │ ├── Login.jsx │ ├── NotFound.jsx │ ├── Resources.jsx │ ├── SignUp.jsx │ ├── SingleJob.jsx │ ├── admin │ │ ├── AdminDashboard.jsx │ │ ├── JobCategary │ │ │ ├── AdminCreateJobType.jsx │ │ │ ├── AdminDeleteJobType.jsx │ │ │ ├── AdminEditJobType.jsx │ │ │ └── AdminJobTypes.jsx │ │ ├── Jobs │ │ │ ├── AdminDeleteJob.jsx │ │ │ ├── AdminEditJob.jsx │ │ │ ├── AdminJobCreate.jsx │ │ │ └── AdminJobs.jsx │ │ ├── User │ │ │ ├── AdminCreateuser.jsx │ │ │ ├── AdminDeleteUser.jsx │ │ │ ├── AdminEditUser.jsx │ │ │ └── AdminUsers.jsx │ │ └── data │ │ │ └── data.js │ ├── global │ │ ├── HeaderTop.jsx │ │ ├── Layout.jsx │ │ └── Sidebar.jsx │ └── user │ │ ├── UserDashBoard.jsx │ │ ├── UserInfoDashboard.jsx │ │ └── UserJobHistory.jsx ├── redux │ ├── actions │ │ ├── jobAction.js │ │ ├── jobTypeAction.js │ │ └── userAction.js │ ├── constants │ │ ├── jobConstant.js │ │ ├── jobTypeConstant.js │ │ └── userConstant.js │ ├── reducers │ │ ├── jobReducer.js │ │ ├── jobTypeReducer.js │ │ └── userReducer.js │ └── store.js └── theme.js └── tailwind.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | hooks.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #

JobSet

2 | 3 | ## About JobSet 4 | This is a simple job-finding website named JobSet. This website is being developed under the competition IBM Web Intern. 5 | ## Motivation 6 | Simple Job Finding Wesbite with its minimalistic yet attractive UI The early birds with basic knowledge of JavaScript and React can contribute to this repository. 7 | Even if you have the slightest doubt, you can start a discussion about it in the repositories Discussion section. 8 | ## How to Contribute? 9 | - Take a look at the existing. [Issues](https://github.com/TechieeGeeeks/JobSet/issues) 10 | - Fork the Repo.
![image](https://github.com/TechieeGeeeks/JobSet/assets/99035115/bfa91769-3e76-4c17-a065-547d8225d694) 11 | - After Froking repo you will see the repository on your profile like this :-
![image](https://github.com/TechieeGeeeks/JobSet/assets/99035115/322304b2-dbbf-4256-bd06-144d180d5ae1) 12 | - Basically you have to upload your changes in the code over here and make a pull request on the main repository. 13 | - Make sure that the pull request your making should tell what actually your trying to change/implement. 14 | - For not wasting time make sure to raise a issue first on whatever changes you wanna make and get assigned by one of the maintainers and then start woprk on it. 15 | - If youre confuse then you can look at Good First issues and start working on them. 16 | 17 | ## How to make a Pull Request? 18 | **1.** Start by forking the [**JobSet**](https://github.com/TechieeGeeeks/JobSet)) repository. Click on the symbol at the top right corner. 19 | 20 | **2.** Clone your forked repository on your local machine/computer with command: 21 | 22 | ```bash 23 | git clone https://github.com//JobSet 24 | ``` 25 | 26 | **3.** Navigate to the new project directory: 27 | 28 | ```bash 29 | cd JobSet 30 | ``` 31 | **4.** Set upstream command: 32 | 33 | ```bash 34 | git remote add upstream https://github.com/TechieeGeeeks/JobSet 35 | ``` 36 | **5.** Create a new branch: 37 | 38 | ```bash 39 | git checkout -b YourBranchName 40 | ``` 41 | or 42 | ```bash 43 | git branch YourBranchName 44 | git switch YourBranchName 45 | ``` 46 | **6.** Sync your fork or local repository with the origin repository: 47 | 48 | - In your forked repository click on `Fetch upstream`. 49 | - Click `Fetch and merge`. 50 | - ### Alternatively, Git CLI way to Sync forked repository with origin repository: 51 | 52 | ```bash 53 | git fetch upstream 54 | ``` 55 | 56 | ```bash 57 | git merge upstream/main 58 | ``` 59 | ### [Github Docs](https://docs.github.com/en/github/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github) for Syncing 60 | **7.** Make your changes to the source code. 61 | ⚠️ **Make sure** not to commit `package.json` or `package-lock.json` file 62 | 63 | ⚠️ **Make sure** not to run the commands ```git add .``` or ```git add *```. Instead, stage your changes for each file/folder 64 | 65 | ```bash 66 | git add file/folder 67 | ``` 68 | 69 | ```bash 70 | git commit -m "" 71 | ``` 72 | 73 | **9.** Push your local commits to the remote repository: 74 | 75 | ```bash 76 | git push origin YourBranchName 77 | ``` 78 | **10.** Create a [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)! 79 | 80 | # How to Setup Locally? 81 | **1.** Navigate to main root directory 82 | ``` 83 | cd JobSet 84 | ``` 85 | **2.** Decide on which end you want to contribute (FrontEnd, BackEnd) 86 | If FroentEnd 87 | ``` 88 | cd frontend 89 | ``` 90 | else 91 | ``` 92 | cd backend 93 | ``` 94 | **3.** 95 | For both frontend and backend use 96 | ``` 97 | npm install 98 | ``` 99 | **4.** 100 | For both frontend and backend use 101 | ``` 102 | npm start 103 | ``` 104 | **5.** 105 | If everything is working properly then you can make changes on source code. If not use Discussion. 106 | **6.** 107 | After making changes Make pull request pointing towards the particular issue. 108 | **6.** 109 | Congratulations 🙌🏼. 110 | 111 | ### This repo is being mainatined by Swayam 112 | Follow Swayam 113 | 114 | ## Thank You !! 115 | -------------------------------------------------------------------------------- /backend/Process.md: -------------------------------------------------------------------------------- 1 | #### Steps Followed 2 | 1) Install Node Then Check for Node Version should be >= 16.7.0 3 | 2) Created Initial package by doing ```npm init``` if your forking just do ```npm install``` and it will install all package from package.json. 4 | 3) If Your Not clonning & setting up project yourself then =>
5 | Install all 6 |
bryptjs 7 |
body-parser 8 |
cookie-parser 9 |
cors 10 |
dotenv 11 |
express 12 |
jsonwebtoken 13 |
mongoose @5.13.9 (Stable) 14 |
morgan 15 |
nodemon 16 | You can install all this packages using single command 17 | 18 | ``` npm i bcryptjs body-parser cookie-parser cors dotenv express jsonwebtoken mongoose@5.13.9 morgan nodemon ``` 19 | 20 | 4) Add a .gitignore file in your root directory and include node_modules, .env, [ALL PRIVATE STUFF THAT YOU DONT WANNA PUSH] 21 | 22 | 5) Mongo DB cloud set up Mongo DB 23 | 24 | 6) Setup .env file with API Key and Port 25 | 26 | 7) Your backend connection prerequisites are ready. 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /backend/apiHelp.js: -------------------------------------------------------------------------------- 1 | const jsonForCreateJob = { 2 | "title": "Front End Developer", 3 | "description": "A front-end web developer is responsible for implementing visual elements that users see and interact with in a web application. They are usually supported by back-end web developers, who are responsible for server-side application logic and integration of the work front-end developers do.", 4 | "salary": "30000", 5 | "location": "Mumbai", 6 | "company": "Rizzling Devs", 7 | "contact": 9967490617, 8 | "website": "https://jobset.onrender.com", 9 | "jobType": "64ac54feda23f13808f3606b" 10 | } 11 | 12 | const jsonForSignUpAsUser = { 13 | "firstName": "Swayam", 14 | "middleName": "Rajkumar", 15 | "lastName": "Karle", 16 | "email":"swayamkarle28@gmail.com", 17 | "password": "SwAyAm", 18 | "role":0, 19 | "gender":"Male", 20 | "city":"Thane", 21 | "state":"Maharashtra", 22 | "dateOfBirth":"2002-08-28", 23 | "contact":"9967490887" 24 | } 25 | 26 | const jsonForSignUpAsAdmin = { 27 | "firstName": "Swayam", 28 | "middleName": "Rajkumar", 29 | "lastName": "Karle", 30 | "email":"swayamkarle28@gmail.com", 31 | "password": "SwAyAm", 32 | "role":1, 33 | "gender":"Male", 34 | "city":"Thane", 35 | "state":"Maharashtra", 36 | "dateOfBirth":"2002-08-28", 37 | "contact":"9967490887" 38 | } 39 | 40 | const jsonForSignInAsBoth={ 41 | "email":"swayamkarle2@gmail.com", 42 | "password": "SwAyAm" 43 | } 44 | 45 | const jsonForCreateJobType = { 46 | "jobTypeName": "Web3 Researcher", 47 | "requirements": "Dimag Hona Chahiye" 48 | } 49 | 50 | const jsonForeditUser = /*Only Include Fields you wanna change dont need to edit whole profile*/ { 51 | "firstName": "Sam", 52 | "lastName": "Karan" 53 | } 54 | 55 | const allApis = { 56 | AUNTHENTICATION: { 57 | signup: "POST" + "http://localhost:8000/api/signup" , 58 | signin : "POST" + "http://localhost:8000/api/signin" , 59 | logout : "GET" + "http://localhost:8000/api/logout", 60 | }, 61 | USER_OPS: { 62 | getuserprofile: "GET" + "http://localhost:8000/api/me", 63 | getsingleuser: "GET" + "http://localhost:8000/api/user/64a493828c10123518441735", 64 | edituser: "PUT" + "http://localhost:8000/api/user/edit/64a493828c10123518441735", 65 | jobHistory: "POST" + "http://localhost:8000/api/user/jobhistory" 66 | }, 67 | ADMIN:{ 68 | allusers: "GET" + "http://localhost:8000/api/allusers", 69 | deleteuser: "DELETE" + "http://localhost:8000/api/user/delete/64a541915434422cc4ab111e", 70 | alladmins: "GET"+ "http://localhost:8000/api/alladmins" 71 | }, 72 | HR:"Not Even Decided What to include and what not to", 73 | JOBOPS:{ 74 | createjobtype: "POST" + "http://localhost:8000/api/type/create/", 75 | updateJobtype: "PUT" + "http://localhost:8000/api/type/update/64ac54feda23f13808f3606b", 76 | getalljobtypes: "GET" + "http://localhost:8000/api/type/jobs/", 77 | deleteJobType: "DELETE" + "http://localhost:8000/api/type/delete/64add11fae5db20780753d80", 78 | createjob: "POST" + "http://localhost:8000/api/job/create", 79 | getalljobs: "GET" + "http://localhost:8000/api/jobs?pageNumber=1&keyword=&cat=&location=", 80 | singleJob: "GET" + "http://localhost:8000/api/jobs?pageNumber=1&keyword=&cat=&location=", 81 | updateJob: "PUT" + "http://localhost:8000/api/job/update/64ac68db2457e11d186b0903", 82 | deleteJob: "DELETE" + "http://localhost:8000/api/job/delete/64adb47210aaa507d4d54a6b" 83 | } 84 | 85 | 86 | } 87 | 88 | // USER CAN DELETE HIS OWN PROFILE {Do We Really Need THis?} 89 | 90 | 91 | { 92 | /* 93 | "proxy": "http://localhost:8000" 94 | "proxy : "https://jobset-api.onrender.com"*/ 95 | } -------------------------------------------------------------------------------- /backend/app.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const morgan = require("morgan"); 4 | const bodyParser = require("body-parser"); 5 | var cors = require("cors"); 6 | const cookieParser = require("cookie-parser"); 7 | require("dotenv").config(); 8 | const errorHandler = require('./middleware/error'); 9 | 10 | 11 | // Import Routes 12 | const authRoutes = require('./routes/authRoutes'); 13 | const userRoutes = require('./routes/userRoutes'); 14 | const jobsTypeRoutes = require('./routes/jobsTypeRoutes'); 15 | const jobRoutes = require('./routes/jobRoutes'); 16 | const courseRoutes = require('./routes/courseRoutes'); 17 | 18 | const app = express(); 19 | 20 | // MIDDLEWARE 21 | app.use(morgan("dev")); 22 | app.use(bodyParser.json({ limit: "5mb" })); 23 | app.use(bodyParser.urlencoded({ limit: "5mb", extended: true })); 24 | app.use(cookieParser()); 25 | app.use(cors()); 26 | 27 | 28 | 29 | //Routes MiddleWare 30 | app.use('/api',authRoutes); 31 | app.use('/api',userRoutes); 32 | app.use('/api',jobsTypeRoutes); 33 | app.use('/api', jobRoutes); 34 | app.use('/api', courseRoutes); 35 | 36 | // Custom Error Middleware 37 | app.use(errorHandler); 38 | 39 | // Port listen 40 | const PORT = process.env.PORT || 8000; 41 | app.listen(PORT, () => { 42 | console.log(`The App is Running on Port ${PORT}`); 43 | }); 44 | 45 | // Database Connetion 46 | const API = process.env.DATABASE; 47 | mongoose 48 | .connect(API, { 49 | useNewUrlParser: true, 50 | useUnifiedTopology: true, 51 | useCreateIndex: true, 52 | useFindAndModify: false, 53 | }) 54 | .then(() => { 55 | console.log("connected to mongoDb"); 56 | }) 57 | .catch((err) => { 58 | console.log(err); 59 | }); 60 | -------------------------------------------------------------------------------- /backend/controllers/JobsTypeController.js: -------------------------------------------------------------------------------- 1 | const JobType = require('../models/JobTypeModel'); 2 | const ErrorResponse = require("../utils/errorResponse"); 3 | 4 | // Create Job Category 5 | 6 | exports.createJobType =async(req,res,next)=>{ 7 | try { 8 | const jobTy = await JobType.create({ 9 | jobTypeName: req.body.jobTypeName, 10 | user: req.user.id, 11 | requirements: req.body.requirements, 12 | }); 13 | res.status(201).json({ 14 | success:true, 15 | jobTy 16 | }) 17 | } catch (error) { 18 | next(error); 19 | } 20 | }; 21 | 22 | // all jobs category 23 | exports.allJobsType =async(req,res,next)=>{ 24 | try { 25 | const jobTy = await JobType.find(); 26 | res.status(200).json({ 27 | success:true, 28 | jobTy 29 | }) 30 | } catch (error) { 31 | next(error); 32 | } 33 | } 34 | 35 | // Update Job Type 36 | exports.updateJobType =async(req,res,next)=>{ 37 | try { 38 | const jobTy = await JobType.findByIdAndUpdate(req.params.type_id,req.body, {new:true}); 39 | res.status(200).json({ 40 | success:true, 41 | jobTy 42 | }) 43 | } catch (error) { 44 | next(error); 45 | } 46 | } 47 | 48 | // Delete Job Type 49 | exports.deleteJobType =async(req,res,next)=>{ 50 | try { 51 | const jobTy = await JobType.findByIdAndRemove(req.params.type_id); 52 | res.status(200).json({ 53 | success:true, 54 | message:"JobType Deleted" 55 | }) 56 | } catch (error) { 57 | next(new ErrorResponse("Server Error", 500)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /backend/controllers/authController.js: -------------------------------------------------------------------------------- 1 | const User = require('../models/userModel') 2 | const ErrorResponse = require("../utils/errorResponse"); 3 | 4 | exports.signup= async(req,res,next)=>{ 5 | const {email} = req.body; 6 | const userExist = await User.findOne({email:email}); 7 | if(userExist){ 8 | return next(new ErrorResponse("Email Already Exists", 400)); 9 | } 10 | try { 11 | const user = User.create(req.body); 12 | res.status(201).json({success:true, user:user}) 13 | }catch (error) { 14 | next(error); 15 | } 16 | }; 17 | 18 | exports.signin= async(req,res,next)=>{ 19 | try { 20 | const {email,password} = req.body; 21 | // Validation 22 | if(!email){ 23 | return next(new ErrorResponse("InValid Credentials ", 403)); 24 | }if(!password){ 25 | return next(new ErrorResponse("InValid Credentials ", 403)); 26 | } 27 | 28 | // Check User Email 29 | const user = await User.findOne({email}); 30 | if(!user){ 31 | return next(new ErrorResponse("InValid Credentials ", 400)); 32 | } 33 | 34 | // Check Password 35 | const isMatched = await user.comparePassword(password); 36 | if(!isMatched){ 37 | return next(new ErrorResponse("InValid Credentials ", 400)); 38 | } 39 | sendTokenResponse(user,200,res); 40 | } catch (error) { 41 | next(error); 42 | } 43 | }; 44 | 45 | const sendTokenResponse = async(user,codeStatus,res)=>{ 46 | const token = await user.getJwtToken(); 47 | res.status(codeStatus).cookie('token',token,{maxAge: 60*60*1000}).json({success:true,token,user, role:user.role }); 48 | } 49 | 50 | // Log Out 51 | exports.logout=(req,res,next)=>{ 52 | res.clearCookie('token'); 53 | res.status(200).json({ 54 | success:true, 55 | message:"Logged Out" 56 | }) 57 | } 58 | 59 | // user profile 60 | exports.userProfile=async(req,res,next)=>{ 61 | try { 62 | const user = await User.findById(req.user.id).select('-password'); 63 | res.status(200).json({ 64 | success:true, 65 | user 66 | }); 67 | } catch (error) { 68 | next(error); 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /backend/controllers/courseControllers.js: -------------------------------------------------------------------------------- 1 | const Course = require("../models/courseModel"); 2 | 3 | // Create Course 4 | exports.createCourse = async(req, res, next)=>{ 5 | try { 6 | const course = await Course.create({ 7 | title: req.body.title, 8 | description: req.body.description, 9 | duration: req.body.duration, 10 | logo: req.body.logo, 11 | company: req.body.company 12 | }); 13 | res.status(201).json({ 14 | success: true, 15 | course 16 | }); 17 | } catch (error) { 18 | next(error); 19 | } 20 | }; 21 | 22 | // All Courses 23 | exports.allCourses = async(req, res, next)=>{ 24 | try { 25 | const courses = await Course.find(); 26 | res.status(200).json({ 27 | success: true, 28 | courses 29 | }); 30 | next(); 31 | } catch (error) { 32 | return next(error); 33 | } 34 | }; 35 | 36 | 37 | // Delete Course 38 | exports.deleteCourse = async (req, res, next) => { 39 | try { 40 | const course = await Course.findByIdAndRemove(req.params.course_id) 41 | res.status(200).json({ 42 | success: true, 43 | message:"Course Has Been Deleted", 44 | }); 45 | } catch (error) { 46 | next(error); 47 | } 48 | }; 49 | 50 | // Edit Course 51 | exports.editCourse = async(req,res,next)=>{ 52 | try { 53 | const course = await Course.findByIdAndUpdate(req.params.course_id, req.body,{new:true}); 54 | res.status(200).json({ 55 | success:true, 56 | course 57 | }) 58 | next(); 59 | } catch (error) { 60 | return next(error); 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /backend/controllers/jobsController.js: -------------------------------------------------------------------------------- 1 | const Job = require("../models/jobModel"); 2 | const JobType = require("../models/JobTypeModel"); 3 | const ErrorResponse = require("../utils/errorResponse"); 4 | 5 | // Create Job Category 6 | exports.createJob = async (req, res, next) => { 7 | try { 8 | const job = await Job.create({ 9 | title: req.body.title, 10 | description: req.body.description, 11 | salary: req.body.salary, 12 | location: req.body.location, 13 | available: req.body.available, 14 | company: req.body.company, 15 | contact: req.body.contact, 16 | website: req.body.website, 17 | user: req.user.id, 18 | jobType: req.body.jobType, 19 | }); 20 | res.status(201).json({ 21 | success: true, 22 | job, 23 | }); 24 | } catch (error) { 25 | next(error); 26 | } 27 | }; 28 | 29 | // all jobs category 30 | exports.allJobs = async (req, res, next)=>{ 31 | try { 32 | const keyword = req.query.keyword 33 | ? { 34 | title: { 35 | $regex: req.query.keyword, 36 | $options: "i", 37 | }, 38 | } 39 | : {}; 40 | const cat = req.query.cat || null; 41 | const location = req.query.location || null; 42 | 43 | const jobTypeFilter = cat ? { jobType: cat } : {}; 44 | const locationFilter = location ? { location: location } : {}; 45 | 46 | let filter = { ...keyword, ...jobTypeFilter, ...locationFilter }; 47 | 48 | if (!cat && !location&& !keyword) { 49 | filter = {}; // Retrieve all jobs if cat and location are not provided 50 | } 51 | let locations = []; 52 | const jobByLocation = await Job.find({}, { location: 1 }); 53 | jobByLocation.forEach(val => { 54 | locations.push(val.location); 55 | }); 56 | let setUniqueLocation = [...new Set(locations)]; 57 | 58 | const pageSize = 5; 59 | const page = Number(req.query.pageNumber) || 1; 60 | 61 | const count = await Job.countDocuments(filter); 62 | 63 | const jobs = await Job.find(filter) 64 | .sort({createdAt:-1}) 65 | .skip(pageSize * (page - 1)) 66 | .limit(pageSize); 67 | res.status(200).json({ 68 | success: true, 69 | jobs, 70 | pages: Math.ceil(count / pageSize), 71 | page, 72 | count, 73 | pageSize, 74 | setUniqueLocation 75 | }); 76 | } catch (error) { 77 | next(error); 78 | } 79 | }; 80 | 81 | // Single Job 82 | exports.singleJob = async (req, res, next) => { 83 | try { 84 | const job = await Job.findById(req.params.id); 85 | res.status(200).json({ 86 | success: true, 87 | job, 88 | }); 89 | } catch (error) { 90 | next(error); 91 | } 92 | }; 93 | 94 | 95 | // Update Job 96 | exports.updateJob = async (req, res, next) => { 97 | try { 98 | const job = await Job.findByIdAndUpdate(req.params.job_id, req.body, { 99 | new: true, 100 | }) 101 | .populate("jobType", "jobTypeName") 102 | .populate("user", "firstName middleName lastName"); 103 | res.status(200).json({ 104 | success: true, 105 | job, 106 | }); 107 | } catch (error) { 108 | next(error); 109 | } 110 | }; 111 | 112 | // Delete Job 113 | exports.deleteJob = async (req, res, next) => { 114 | try { 115 | const job = await Job.findByIdAndRemove(req.params.job_id) 116 | res.status(200).json({ 117 | success: true, 118 | message:"Job Has Been Deleted", 119 | }); 120 | } catch (error) { 121 | next(error); 122 | } 123 | }; 124 | -------------------------------------------------------------------------------- /backend/controllers/userController.js: -------------------------------------------------------------------------------- 1 | const User = require("../models/userModel"); 2 | const ErrorResponse = require("../utils/errorResponse"); 3 | 4 | //Load All Users 5 | exports.allUsers = async (req, res, next) => { 6 | //Enable Pagination 7 | const pageSize = 10; 8 | const page = Number(req.query.pageNumber) || 1; 9 | const count = await User.find({}).estimatedDocumentCount(); 10 | 11 | try { 12 | const users = await User.find() 13 | .sort({ createdAt: -1 }) 14 | .select("-password") 15 | .skip(pageSize * (page - 1)) 16 | .limit(pageSize); 17 | 18 | res.status(200).json({ 19 | success: true, 20 | users, 21 | page, 22 | pages: Math.ceil(count / pageSize), 23 | count, 24 | }); 25 | next(); 26 | } catch (error) { 27 | return next(error); 28 | } 29 | }; 30 | 31 | // Show Single User 32 | exports.singleUser = async(req,res,next)=>{ 33 | try { 34 | const user = await User.findById(req.params.id); 35 | res.status(200).json({ 36 | success:true, 37 | user 38 | }) 39 | next(); 40 | } catch (error) { 41 | return next(error); 42 | } 43 | } 44 | 45 | // Edit User 46 | exports.editUser = async(req,res,next)=>{ 47 | try { 48 | const user = await User.findByIdAndUpdate(req.params.id, req.body,{new:true}); 49 | res.status(200).json({ 50 | success:true, 51 | user 52 | }) 53 | next(); 54 | } catch (error) { 55 | return next(error); 56 | } 57 | } 58 | 59 | // Delete User 60 | exports.deleteUser = async(req,res,next)=>{ 61 | try { 62 | const user = await User.findByIdAndDelete(req.params.id); 63 | res.status(200).json({ 64 | success:true, 65 | message:"User Deleted SuccessFully" 66 | }) 67 | next(); 68 | } catch (error) { 69 | return next(error); 70 | } 71 | } 72 | 73 | // export all admins 74 | exports.allAdmins = async(req,res,next)=>{ 75 | try{ 76 | const admins = await User.find({role:1}) 77 | .select("-password") 78 | res.status(200).json({ 79 | success: true, 80 | admins, 81 | }); 82 | next(); 83 | }catch (error) { 84 | return next(error); 85 | } 86 | }, 87 | 88 | // jobs History 89 | exports.createuserJobsHistory = async(req,res,next)=>{ 90 | const {title, description, salary, location} = req.body; 91 | 92 | try { 93 | const currentUser = await User.findOne({_id: req.user._id}); 94 | if(!currentUser){ 95 | return next(ErrorResponse("You Must Log In", 401)) 96 | }else{ 97 | const addJobHistory = { 98 | title, 99 | description, 100 | salary, 101 | location, 102 | user: req.user._id 103 | } 104 | currentUser.jobsHistory.push(addJobHistory); 105 | await currentUser.save(); 106 | } 107 | res.status(200).json({ 108 | success:true, 109 | currentUser 110 | }) 111 | next(); 112 | } catch (error) { 113 | return next(error); 114 | } 115 | } -------------------------------------------------------------------------------- /backend/middleware/auth.js: -------------------------------------------------------------------------------- 1 | const ErrorResponse = require("../utils/errorResponse"); 2 | const jwt = require('jsonwebtoken'); 3 | const User = require('../models/userModel'); 4 | const JWT_SECRET = process.env.JWT; 5 | 6 | // Check if user is authnticated 7 | exports.isAuthenticated = async (req,res,next)=>{ 8 | const {token} = req.cookies; 9 | // Making sure that token Exists 10 | if(!token){ 11 | return next(new ErrorResponse("Not Authorized to Access", 401)); 12 | } 13 | try { 14 | // Verify Token 15 | const decoded = jwt.verify(token,JWT_SECRET); 16 | req.user = await User.findById(decoded.id); 17 | next(); 18 | } catch (error) { 19 | return next(new ErrorResponse("Not Authorized to Access", 401)); 20 | } 21 | } 22 | 23 | // MiddleWare Admin 24 | exports.isAdmin=(req,res,next)=>{ 25 | if(req.user.role === 0){ 26 | return next(new ErrorResponse("Not Authorized to Access", 401)); 27 | } 28 | next(); 29 | } -------------------------------------------------------------------------------- /backend/middleware/error.js: -------------------------------------------------------------------------------- 1 | const ErrorResponse = require("../utils/errorResponse"); 2 | 3 | const errorHandler = (err, req, res, next) => { 4 | let error = { ...err }; 5 | error.message = err.message; 6 | 7 | // For Cast Errors 8 | if (err.name === "CastError") { 9 | const message = `Resource Not Found ${err.value}`; 10 | error = new ErrorResponse(message, 404); 11 | } 12 | 13 | // For Mongoose Duplicate Values 14 | if (err.code === 11000) { 15 | const message = "Duplicate Field Value Entered"; 16 | error = new ErrorResponse(message, 400); 17 | } 18 | 19 | // Mongoose Validation Error 20 | if (err.name === "ValidationError") { 21 | const message = Object.values(err.errors).map(val => ' ' + val.message); 22 | error = new ErrorResponse(message, 404); 23 | } 24 | 25 | res.status(error.codeStatus || 500).json({ 26 | success: false, 27 | error: error.message || "server error", 28 | }); 29 | }; 30 | 31 | module.exports = errorHandler; 32 | -------------------------------------------------------------------------------- /backend/models/JobTypeModel.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const {ObjectId} = mongoose.Schema; 3 | 4 | 5 | const jobTypeSchema = new mongoose.Schema({ 6 | jobTypeName: { 7 | type: String, 8 | trim: true, 9 | required: [true,'Job Type is Required'], 10 | maxlength: 40 11 | }, 12 | user:{ 13 | type: ObjectId, 14 | ref: "User", 15 | required:true 16 | }, 17 | requirements: { 18 | type: String, 19 | trim: true, 20 | required: [true,'roleType is Required'] 21 | }, 22 | 23 | 24 | }, {timestamp:true}); 25 | 26 | 27 | module.exports = mongoose.model("JobType", jobTypeSchema); 28 | 29 | -------------------------------------------------------------------------------- /backend/models/courseModel.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | const courseSchema = new mongoose.Schema({ 4 | title:{ 5 | type: String, 6 | trim: true, 7 | required: [true,'Title is Required'], 8 | maxlength: 40 9 | }, 10 | description:{ 11 | type: String, 12 | trim: true, 13 | required: [true,'Description is Required'] 14 | }, 15 | duration:{ 16 | type: String, 17 | trim: true, 18 | required: [true,'Duration is Required'] 19 | }, 20 | logo:{ 21 | type: String, 22 | default:"", 23 | required: [true,'Logo is Required'] 24 | }, 25 | company:{ 26 | type: String, 27 | trim: true, 28 | required: [true,'Company name is Required'], 29 | maxlength: 40 30 | } 31 | },{timestamp:true}); 32 | 33 | module.exports = mongoose.model("Course", courseSchema); -------------------------------------------------------------------------------- /backend/models/jobModel.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const {ObjectId} = mongoose.Schema; 3 | 4 | 5 | const jobSchema = new mongoose.Schema({ 6 | title: { 7 | type: String, 8 | trim: true, 9 | required: [true,'Title is Required'], 10 | maxlength: 40 11 | }, 12 | description: { 13 | type: String, 14 | trim: true, 15 | required: [true,'Description is Required'] 16 | }, 17 | salary: { 18 | type: String, 19 | trim: true, 20 | required: [true,'Salary is Required'] 21 | }, 22 | location: { 23 | type: String, 24 | trim: true, 25 | required: [true,'location is Required'] 26 | }, 27 | available: { 28 | type: Boolean, 29 | default: true 30 | }, 31 | company: { 32 | type: String, 33 | trim: true, 34 | required: [true,'Company name is Required'], 35 | maxlength: 40 36 | }, 37 | contact: { 38 | type: Number, 39 | trim: true, 40 | required: [true,'Contact is Required'], 41 | maxlength:10 42 | }, 43 | website:{ 44 | type: String, 45 | trim: true, 46 | required: [true,'Website is Required'], 47 | maxlength:30 48 | }, 49 | user:{ 50 | type: ObjectId, 51 | ref: "User", 52 | required:true 53 | }, 54 | jobType:{ 55 | type: ObjectId, 56 | ref: "JobType", 57 | required:true 58 | } 59 | }, {timestamp:true}); 60 | 61 | 62 | module.exports = mongoose.model("Job", jobSchema); -------------------------------------------------------------------------------- /backend/models/userModel.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const bcrypt = require('bcryptjs'); 3 | const jwt = require('jsonwebtoken'); 4 | const jwtSecret = process.env.JWT; 5 | const {ObjectId} = mongoose.Schema; 6 | 7 | 8 | const jobsHistorySchema = new mongoose.Schema({ 9 | title: { 10 | type: String, 11 | trim: true, 12 | }, 13 | description: { 14 | type: String, 15 | trim: true, 16 | }, 17 | salary: { 18 | type: String, 19 | trim: true, 20 | }, 21 | location: { 22 | type: String, 23 | trim: true 24 | }, 25 | interviewDate: { 26 | type: Date, 27 | trim: true 28 | }, 29 | company: { 30 | type: String, 31 | trim: true, 32 | }, 33 | contact: { 34 | type: Number, 35 | trim: true, 36 | }, 37 | website:{ 38 | type: String, 39 | trim: true, 40 | }, 41 | applicationStatus:{ 42 | type: String, 43 | enum: ['pending', 'accepetd', 'rejected'], 44 | default:'pending' 45 | }, 46 | user:{ 47 | type: ObjectId, 48 | ref: "User", 49 | required:true 50 | } 51 | }, {timestamp:true}); 52 | 53 | const userSchema = new mongoose.Schema({ 54 | firstName: { 55 | type: String, 56 | trim: true, 57 | required: [true,'First Name is Required'], 58 | maxlength: 20 59 | }, 60 | middleName: { 61 | type: String, 62 | trim: true, 63 | required: [true,'First Name is Required'], 64 | maxlength: 35 65 | }, 66 | lastName: { 67 | type: String, 68 | trim: true, 69 | required: [true,'Middle Name is Required'], 70 | maxlength: 20 71 | }, 72 | email:{ 73 | type:String, 74 | trim: true, 75 | required: [true,'E-mail is Required'], 76 | unique:true, 77 | maxlength: 30, 78 | match: [ 79 | /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/, 80 | 'Please add a valid email' 81 | ] 82 | }, 83 | password: { 84 | type: String, 85 | trim: true, 86 | required: [true, 'password is required'], 87 | minlength: [6, 'password must have at least (6) caracters'], 88 | }, 89 | role: { // User = 0, Admin =1 90 | type: Number, 91 | default: 0 92 | }, 93 | gender:{ 94 | type: String, 95 | required: true, 96 | }, 97 | city:{ 98 | type: String, 99 | required: true 100 | }, 101 | state:{ 102 | type: String, 103 | required: true 104 | }, 105 | dateOfBirth:{ 106 | type: Date, 107 | required: true 108 | }, 109 | contact:{ 110 | type:Number, 111 | required: true, 112 | unique: true, 113 | maxlength:10 114 | }, 115 | jobsHistory: [jobsHistorySchema], 116 | }, {timestamp:true}); 117 | 118 | // If user changes the password then Encrypting the password before storing it on DB 119 | userSchema.pre('save', async function (next) { 120 | if (!this.isModified('password')) { 121 | next(); 122 | } 123 | this.password = await bcrypt.hash(this.password, 10) 124 | }) 125 | 126 | // Compare Password 127 | userSchema.methods.comparePassword = async function (enteredPassword) { 128 | return await bcrypt.compare(enteredPassword, this.password) 129 | } 130 | 131 | // Return a JWT Token 132 | userSchema.methods.getJwtToken = function(){ 133 | return jwt.sign({id:this.id},jwtSecret, {expiresIn:3600}) 134 | } 135 | 136 | module.exports = mongoose.model("User", userSchema); -------------------------------------------------------------------------------- /backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "version": "1.0.0", 4 | "description": "IBM Front End Internship Backend Package", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "nodemon app.js", 8 | "build": "npm install" 9 | }, 10 | "author": "DevSwayam", 11 | "license": "ISC", 12 | "dependencies": { 13 | "bcryptjs": "^2.4.3", 14 | "body-parser": "^1.20.2", 15 | "cookie-parser": "^1.4.6", 16 | "cors": "^2.8.5", 17 | "dotenv": "^16.3.1", 18 | "express": "^4.18.2", 19 | "jsonwebtoken": "^9.0.0", 20 | "mongodb": "^5.6.0", 21 | "mongoose": "^5.13.9", 22 | "morgan": "^1.10.0", 23 | "nodemon": "^2.0.22" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /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 | //auth route Signup POST request=> {/api/signup} 7 | router.post('/signup',signup); 8 | 9 | //auth route Signin POST Request=> {/api/signin} 10 | router.post('/signin',signin); 11 | 12 | //auth route logout => {/api/logout} 13 | router.get('/logout',logout); 14 | 15 | //auth route User Info => {/api/me} 16 | router.get('/me',isAuthenticated, userProfile); 17 | 18 | 19 | module.exports = router; -------------------------------------------------------------------------------- /backend/routes/courseRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const { isAuthenticated, isAdmin } = require('../middleware/auth'); 3 | const { createCourse, allCourses, deleteCourse,editCourse} = require('../controllers/courseControllers'); 4 | const router = express.Router(); 5 | 6 | //Job Routes 7 | 8 | // /api/course/create 9 | router.post('/course/create', isAuthenticated,isAdmin, createCourse); 10 | 11 | // /api/courses 12 | router.get('/courses', allCourses); 13 | 14 | // /api/deleteCourse 15 | router.delete('/course/delete/:course_id', isAuthenticated,isAdmin,deleteCourse); 16 | 17 | // /api/editCourse 18 | router.put('/course/edit/:course_id', isAuthenticated,isAdmin,editCourse); 19 | 20 | 21 | module.exports = router; -------------------------------------------------------------------------------- /backend/routes/jobRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const { isAuthenticated, isAdmin } = require('../middleware/auth'); 3 | const { createJob, allJobs, singleJob, updateJob, deleteJob } = require('../controllers/jobsController'); 4 | const router = express.Router(); 5 | 6 | //Job Routes 7 | 8 | // /api/job/create 9 | router.post('/job/create', isAuthenticated,isAdmin, createJob); 10 | 11 | // /api/jobs 12 | router.get('/jobs', allJobs); 13 | 14 | // /api/job/:id 15 | router.get('/job/:id', singleJob); 16 | 17 | // /api/job/update/:id 18 | router.put('/job/update/:job_id',isAuthenticated,isAdmin,updateJob) 19 | 20 | // /api/job/delete/:id 21 | router.delete('/job/delete/:job_id',isAuthenticated,isAdmin,deleteJob) 22 | 23 | module.exports = router; -------------------------------------------------------------------------------- /backend/routes/jobsTypeRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const { isAuthenticated, isAdmin } = require('../middleware/auth'); 3 | const { createJobType, allJobsType, updateJobType, deleteJobType } = require('../controllers/JobsTypeController'); 4 | const router = express.Router(); 5 | 6 | //Job Type Routes 7 | 8 | // /api/type/create 9 | router.post('/type/create', isAuthenticated,isAdmin, createJobType); 10 | 11 | // /api/type/create 12 | router.get('/type/jobs', allJobsType); 13 | 14 | // /api/type/update/:type_id 15 | router.put('/type/update/:type_id',isAuthenticated,isAdmin, updateJobType); 16 | 17 | // /api/type/delete/:type_id 18 | router.delete('/type/delete/:type_id',isAuthenticated,isAdmin, deleteJobType); 19 | 20 | module.exports = router; -------------------------------------------------------------------------------- /backend/routes/userRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const {allUsers, singleUser, editUser, deleteUser, allAdmins, createuserJobsHistory} = require('../controllers/userController'); 4 | const { isAuthenticated, isAdmin } = require('../middleware/auth'); 5 | 6 | //User Routes 7 | 8 | //auth route for admin to get all Users Info => {/api/allusers} 9 | router.get('/allusers',isAuthenticated,isAdmin, allUsers); 10 | 11 | //auth route for particular User => {/api/allusers} 12 | router.get('/user/:id',isAuthenticated, singleUser); 13 | 14 | //auth route for editing User => {/api/user/edit/:id} 15 | router.put('/user/edit/:id',isAuthenticated, editUser); 16 | 17 | //auth route for deleting User => {/api/user/delete/:id} 18 | router.delete('/user/delete/:id',isAuthenticated, isAdmin, deleteUser); 19 | 20 | //auth route for admin to get all Users Info => {/api/allusers} 21 | router.get('/alladmins',isAuthenticated,isAdmin, allAdmins); 22 | 23 | //auth route for applying job by User => {/api/user//jobhistory} 24 | router.post('/user/jobhistory',isAuthenticated, /*Do We want our admin to apply for jobs 😅 if not uncomment this ``` !isAdmin ```*/createuserJobsHistory); 25 | 26 | module.exports = router; -------------------------------------------------------------------------------- /backend/utils/errorResponse.js: -------------------------------------------------------------------------------- 1 | class ErrorResponse extends Error{ 2 | constructor(message, codeStatus){ 3 | super(message); 4 | this.codeStatus = codeStatus; 5 | } 6 | } 7 | 8 | module.exports= ErrorResponse; -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emailjs/browser": "^3.11.0", 7 | "@emotion/react": "^11.11.1", 8 | "@emotion/styled": "^11.11.0", 9 | "@fontsource/roboto": "^5.0.4", 10 | "@headlessui/react": "^1.7.15", 11 | "@heroicons/react": "^2.0.18", 12 | "@mui/icons-material": "^5.13.7", 13 | "@mui/material": "^5.13.7", 14 | "@mui/x-data-grid": "^6.10.1", 15 | "@react-spring/web": "^9.7.3", 16 | "@testing-library/jest-dom": "^5.16.5", 17 | "@testing-library/react": "^13.4.0", 18 | "@testing-library/user-event": "^13.5.0", 19 | "axios": "^1.1.3", 20 | "babel-preset-react-app": "^10.0.1", 21 | "dotenv": "^16.3.1", 22 | "emailjs": "^4.0.2", 23 | "formik": "^2.4.2", 24 | "heroicons": "^2.0.18", 25 | "moment": "^2.29.4", 26 | "path-browserify": "^1.0.1", 27 | "react": "^18.2.0", 28 | "react-bootstrap": "^2.8.0", 29 | "react-dom": "^18.2.0", 30 | "react-google-charts": "^4.0.1", 31 | "react-modal": "^3.16.1", 32 | "react-pro-sidebar": "^1.1.0-alpha.1", 33 | "react-redux": "^8.1.1", 34 | "react-router-dom": "^6.14.1", 35 | "react-scripts": "^5.0.1", 36 | "react-spring": "^9.7.2", 37 | "react-toastify": "^9.1.3", 38 | "redux": "^4.2.1", 39 | "redux-thunk": "^2.4.2", 40 | "url": "^0.11.1", 41 | "web-vitals": "^2.1.4", 42 | "yup": "^1.2.0" 43 | }, 44 | "scripts": { 45 | "start": "react-scripts start", 46 | "build": "react-scripts build", 47 | "test": "react-scripts test", 48 | "eject": "react-scripts eject" 49 | }, 50 | "eslintConfig": { 51 | "extends": [ 52 | "react-app", 53 | "react-app/jest" 54 | ] 55 | }, 56 | "browserslist": { 57 | "production": [ 58 | ">0.2%", 59 | "not dead", 60 | "not op_mini all" 61 | ], 62 | "development": [ 63 | "last 1 chrome version", 64 | "last 1 firefox version", 65 | "last 1 safari version" 66 | ] 67 | }, 68 | "devDependencies": { 69 | "autoprefixer": "^10.4.14", 70 | "postcss": "^8.4.25", 71 | "redux-devtools-extension": "^2.13.9", 72 | "tailwindcss": "^3.3.2" 73 | }, 74 | "proxy": "https://jobset-api.onrender.com" 75 | 76 | } 77 | -------------------------------------------------------------------------------- /frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TechieeGeeeks/JobSet/1c825f50fa3148aec391c58468ea61b45a14891f/frontend/public/favicon.ico -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 25 | 26 | 27 | JobSet 28 | 29 | 30 | 31 | 32 |
33 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TechieeGeeeks/JobSet/1c825f50fa3148aec391c58468ea61b45a14891f/frontend/public/logo192.png -------------------------------------------------------------------------------- /frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TechieeGeeeks/JobSet/1c825f50fa3148aec391c58468ea61b45a14891f/frontend/public/logo512.png -------------------------------------------------------------------------------- /frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } -------------------------------------------------------------------------------- /frontend/public/privacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TechieeGeeeks/JobSet/1c825f50fa3148aec391c58468ea61b45a14891f/frontend/public/privacy.png -------------------------------------------------------------------------------- /frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /frontend/public/shirt-svgrepo-com.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 34 | 39 | 42 | 47 | 48 | -------------------------------------------------------------------------------- /frontend/src/App.jsx: -------------------------------------------------------------------------------- 1 | /* Require Imports */ 2 | import React from 'react'; 3 | import { Routes, BrowserRouter as Router, Route } from 'react-router-dom'; 4 | import { ToastContainer } from 'react-toastify'; 5 | import 'react-toastify/dist/ReactToastify.css'; 6 | 7 | /* Components */ 8 | import NavBar from './components/NavBar'; 9 | import Footer from './components/Footer'; 10 | 11 | /* Pages*/ 12 | import Home from './pages/Home' 13 | import NotFound from './pages/NotFound' 14 | import Resources from './pages/Resources' 15 | import FindJob from './pages/FindJob' 16 | import Policy from './components/Policy' 17 | import Demo from './components/Demo'; 18 | import LogIn from './pages/Login'; 19 | import SignUp from './pages/SignUp'; 20 | 21 | import SingleJob from './pages/SingleJob'; 22 | 23 | /* Authentication Routes */ 24 | import UserRoute from './components/UserRoutes'; 25 | import AdminRoute from './components/AdminRoute' 26 | 27 | // HOC 28 | import Layout from './pages/global/Layout'; 29 | 30 | /* Basic DashBoard*/ 31 | import UserDashBoard from './pages/user/UserDashBoard'; 32 | import AdminDashboard from './pages/admin/AdminDashboard'; 33 | 34 | /* User Sub Routes*/ 35 | import UserJobsHistory from './pages/user/UserJobHistory'; 36 | import UserInfoDashboard from './pages/user/UserInfoDashboard'; 37 | 38 | /* Admin User Opeartions*/ 39 | import AdminUsers from './pages/admin/User/AdminUsers'; 40 | import AdminEditUser from './pages/admin/User/AdminEditUser'; 41 | import AdminDeleteUser from './pages/admin/User/AdminDeleteUser'; 42 | import AdminCreateuser from './pages/admin/User/AdminCreateuser'; 43 | 44 | /* Admin Job Opeartions*/ 45 | import AdminJobs from './pages/admin/Jobs/AdminJobs'; 46 | import AdminEditJob from './pages/admin/Jobs/AdminEditJob'; 47 | import AdminJobCreate from './pages/admin/Jobs/AdminJobCreate'; 48 | import AdminDeleteJob from './pages/admin/Jobs/AdminDeleteJob'; 49 | 50 | /* Admin Job Category Opeartions*/ 51 | import AdminJobTypes from './pages/admin/JobCategary/AdminJobTypes'; 52 | import AdminCreateJobType from './pages/admin/JobCategary/AdminCreateJobType' 53 | import AdminDeleteJobType from './pages/admin/JobCategary/AdminDeleteJobType' 54 | import AdminEditJobType from './pages/admin/JobCategary/AdminEditJobType'; 55 | 56 | const UserDashBoardHOC = Layout(UserDashBoard); 57 | const UserJobsHistoryHOC = Layout(UserJobsHistory); 58 | const UserInfoHOC = Layout(UserInfoDashboard); 59 | 60 | const AdminDashboardHOC = Layout(AdminDashboard); 61 | 62 | const AdminJobsHOC = Layout(AdminJobs); 63 | const AdminEditJobHOC = Layout(AdminEditJob); 64 | const AdminJobCreateHOC = Layout(AdminJobCreate); 65 | const AdminDeleteJobHOC = Layout(AdminDeleteJob); 66 | 67 | const AdminUsersHOC = Layout(AdminUsers); 68 | const AdminEditUserHOC = Layout(AdminEditUser); 69 | const AdminDeleteUserHOC = Layout(AdminDeleteUser); 70 | const AdminCreateUserHOC = Layout(AdminCreateuser); 71 | 72 | const AdminJobTypesHOC = Layout(AdminJobTypes); 73 | const AdminCreateJobTypeHOC = Layout(AdminCreateJobType); 74 | const AdminDeleteJobTypeHOC = Layout(AdminDeleteJobType); 75 | const AdminEditJobTypeHOC = Layout(AdminEditJobType); 76 | 77 | 78 | 79 | const App = () => { 80 | return ( 81 | <> 82 | {/* */} 83 | 84 | 85 | 86 | 87 | 88 | 89 | }> 90 | } /> 91 | } />{/* Any Page that is not available will get redirected to not found using (*) */} 92 | } /> 93 | } /> 94 | } /> 95 | } /> 96 | } /> 97 | } /> 98 | } /> 99 | } /> 100 | } /> 101 | } /> 102 | } /> 103 | } /> 104 | } /> 105 | } /> 106 | 107 | } /> 108 | } /> 109 | } /> 110 | } /> 111 | } /> 112 | } /> 113 | 114 | } /> 115 | } /> 116 | } /> 117 | } /> 118 | 119 | 120 | 121 |