├── server ├── keys.js ├── .DS_Store ├── models │ ├── Category.js │ ├── company.js │ ├── employer_notification.js │ ├── student_notification.js │ ├── application.js │ ├── Freshers.js │ ├── Job.js │ ├── Internship.js │ └── employer.js ├── package.json ├── middleware │ ├── auth_employer.js │ └── auth_student.js ├── utils │ ├── signup-email.js │ ├── signupEmployer-email.js │ └── email.js ├── index.js ├── controller │ ├── studentProfile.js │ ├── student_notification.js │ └── employer_notification.js └── routes │ ├── Category.js │ ├── general.js │ ├── employer.js │ └── student.js ├── .DS_Store ├── src ├── .DS_Store ├── components │ ├── Error │ │ ├── error.png │ │ ├── Error.js │ │ └── Error.css │ ├── student-profile │ │ ├── Input.js │ │ ├── Label.js │ │ ├── StudentProfile │ │ │ ├── components │ │ │ │ ├── Project.js │ │ │ │ ├── Experience.js │ │ │ │ ├── General.js │ │ │ │ └── Education.js │ │ │ └── ProfileView.js │ │ ├── Skills.js │ │ ├── Other.js │ │ ├── Achievments.js │ │ ├── Volunteer.js │ │ ├── profile.css │ │ └── Project.js │ ├── employer │ │ ├── employer.css │ │ └── EmployerProfileScreen.css │ ├── privacy-policy │ │ ├── privacy-policy.css │ │ └── privacy-policy.js │ ├── home │ │ └── home.css │ ├── navbar │ │ └── navbar.css │ ├── contact-us │ │ └── contact-us.css │ ├── welcomeSignup │ │ ├── welcomeSignup.js │ │ └── welcomeSignupEmployer.js │ ├── footer │ │ └── footer.css │ ├── student │ │ └── register.css │ ├── Jobs │ │ ├── JobCompanyName.js │ │ ├── AllJobs.js │ │ ├── BookmarkJob.js │ │ ├── JobsByCompanyName.js │ │ └── JobsGroupedByStream.js │ ├── Internships │ │ ├── InternshipCompanyNames.js │ │ ├── AllInternships.css │ │ ├── AllInternships.js │ │ ├── BookmarkInternhsip.js │ │ ├── InternshipByStream.js │ │ ├── InternshipByIndustry.js │ │ ├── InternshipByLocation.js │ │ ├── InternshipByCompany.js │ │ ├── InternshipsGroupedByIndustry.js │ │ ├── InternshipGroupedByStream.js │ │ └── InternshipsGroupedByLoction.js │ ├── FreshersJob │ │ ├── FreshersJobCompanyName.js │ │ ├── FreshersJobByCompanyName.js │ │ ├── AllFresherJob.js │ │ ├── FresherJobsGroupedByStream.js │ │ ├── FresherJobsGroupedByIndustry.js │ │ ├── FresherJobsGroupedByLocation.js │ │ └── BookmarkFresherJob.js │ ├── about-us │ │ ├── about-us.css │ │ └── about-us.js │ └── terms-condition │ │ └── terms-condition.js ├── reducers │ └── userReducer.js ├── setupTests.js ├── App.test.js ├── index.css ├── reportWebVitals.js ├── index.js ├── App.css └── utils │ ├── checkValidation.js │ └── UI │ └── InternshipCard │ └── InternshipCard.css ├── public ├── logo.png ├── robots.txt ├── .DS_Store ├── images │ ├── jobs.png │ ├── logo.png │ ├── ot2.png │ ├── read.png │ ├── desktop.png │ ├── favicon.ico │ ├── intern.png │ ├── puzzle.png │ ├── stream.png │ ├── texture.png │ ├── freshers.png │ ├── industry.png │ ├── internship.png │ ├── location.png │ ├── studying.png │ ├── inspiration.png │ ├── 32.-Discussion.png │ ├── ContributionPR.jpg │ ├── ContributionFork.jpg │ ├── ContributionBranch.jpg │ ├── ContributionIsssues.jpg │ └── website-content.svg ├── manifest.json └── index.html ├── readme_assets ├── p1.jfif ├── p2.jfif ├── p3.jfif ├── psoc.PNG ├── banner.png ├── crosswoc.png ├── gssoc_logoNew.png └── easy-job-intern-about.gif ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── workflows │ └── greetings.yml └── PULL_REQUEST_TEMPLATE.md ├── LICENSE ├── package.json ├── .gitignore └── contributors.md /server/keys.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | JWT_SECRET:"Ilovecoding", 3 | } -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/.DS_Store -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/src/.DS_Store -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/logo.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/.DS_Store -------------------------------------------------------------------------------- /server/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/server/.DS_Store -------------------------------------------------------------------------------- /public/images/jobs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/jobs.png -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/logo.png -------------------------------------------------------------------------------- /public/images/ot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/ot2.png -------------------------------------------------------------------------------- /public/images/read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/read.png -------------------------------------------------------------------------------- /readme_assets/p1.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/readme_assets/p1.jfif -------------------------------------------------------------------------------- /readme_assets/p2.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/readme_assets/p2.jfif -------------------------------------------------------------------------------- /readme_assets/p3.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/readme_assets/p3.jfif -------------------------------------------------------------------------------- /readme_assets/psoc.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/readme_assets/psoc.PNG -------------------------------------------------------------------------------- /public/images/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/desktop.png -------------------------------------------------------------------------------- /public/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/favicon.ico -------------------------------------------------------------------------------- /public/images/intern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/intern.png -------------------------------------------------------------------------------- /public/images/puzzle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/puzzle.png -------------------------------------------------------------------------------- /public/images/stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/stream.png -------------------------------------------------------------------------------- /public/images/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/texture.png -------------------------------------------------------------------------------- /readme_assets/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/readme_assets/banner.png -------------------------------------------------------------------------------- /public/images/freshers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/freshers.png -------------------------------------------------------------------------------- /public/images/industry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/industry.png -------------------------------------------------------------------------------- /public/images/internship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/internship.png -------------------------------------------------------------------------------- /public/images/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/location.png -------------------------------------------------------------------------------- /public/images/studying.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/studying.png -------------------------------------------------------------------------------- /readme_assets/crosswoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/readme_assets/crosswoc.png -------------------------------------------------------------------------------- /public/images/inspiration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/inspiration.png -------------------------------------------------------------------------------- /src/components/Error/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/src/components/Error/error.png -------------------------------------------------------------------------------- /public/images/32.-Discussion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/32.-Discussion.png -------------------------------------------------------------------------------- /public/images/ContributionPR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/ContributionPR.jpg -------------------------------------------------------------------------------- /readme_assets/gssoc_logoNew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/readme_assets/gssoc_logoNew.png -------------------------------------------------------------------------------- /public/images/ContributionFork.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/ContributionFork.jpg -------------------------------------------------------------------------------- /public/images/ContributionBranch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/ContributionBranch.jpg -------------------------------------------------------------------------------- /public/images/ContributionIsssues.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/public/images/ContributionIsssues.jpg -------------------------------------------------------------------------------- /readme_assets/easy-job-intern-about.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajbijarniya/easy-job-intern/HEAD/readme_assets/easy-job-intern-about.gif -------------------------------------------------------------------------------- /src/components/student-profile/Input.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Input=(props)=> 4 | { return ( 5 | 6 | ); 7 | } 8 | 9 | export default Input; -------------------------------------------------------------------------------- /src/reducers/userReducer.js: -------------------------------------------------------------------------------- 1 | export const initialState = null; 2 | 3 | export const reducer = (state, action) => { 4 | if(action.type === "USER"){ 5 | console.log(action.payload); 6 | return action.payload; 7 | } 8 | return state; 9 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/components/student-profile/Label.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "./profile.css" 3 | 4 | const Label=(props)=> 5 | { 6 | return( 7 | 8 | 9 | ); 10 | } 11 | 12 | export default Label; -------------------------------------------------------------------------------- /src/components/employer/employer.css: -------------------------------------------------------------------------------- 1 | @media only screen and (max-width:750px) { 2 | 3 | .employer_form_card_custom { 4 | min-width: 80vw !important; 5 | font-size: 0.9rem !important; 6 | } 7 | 8 | .employer_form_card_custom input { 9 | font-size: 0.8rem !important; 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/components/privacy-policy/privacy-policy.css: -------------------------------------------------------------------------------- 1 | .heading{ 2 | color:black; 3 | font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; 4 | text-align: center; 5 | font-size: 3rem; 6 | } 7 | 8 | .content{ 9 | color:black; 10 | width:100%; 11 | background-color:white; 12 | height:100%; 13 | } 14 | 15 | .rules{ 16 | text-align:left; 17 | padding-left: 45px; 18 | padding-right: 25px; 19 | } -------------------------------------------------------------------------------- /server/models/Category.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | 4 | const categorySchema = new Schema({ 5 | name:{ 6 | type: String, 7 | required:true, 8 | maxlength:40 9 | }, 10 | slug:{ 11 | type:String, 12 | unique:true, 13 | index:true 14 | } 15 | }); 16 | 17 | const Category = mongoose.model('Category',categorySchema); 18 | 19 | module.exports = Category; -------------------------------------------------------------------------------- /src/components/home/home.css: -------------------------------------------------------------------------------- 1 | 2 | #offer-range{ 3 | color: white; 4 | font-size: 15px; 5 | } 6 | 7 | .itemLink:hover{ 8 | transform: scale(1.1); 9 | } 10 | 11 | #offer-range>img{ 12 | width:50px; 13 | height: 50px; 14 | } 15 | .home .container{ 16 | width: unset; 17 | background-color: rgba(82, 23, 109, 0.521); 18 | 19 | } 20 | a{ 21 | font-weight: bold 22 | } 23 | 24 | .itemLink Button{ 25 | font-weight: bold 26 | } 27 | 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: 'Type: Enhancement' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Is your feature request related to a problem? Please describe. 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | ## Describe the solution you'd like 14 | A clear and concise description of what you want to happen. 15 | 16 | ## Additional context 17 | Add any other context about the feature request here. 18 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /src/components/employer/EmployerProfileScreen.css: -------------------------------------------------------------------------------- 1 | .employer-main-profile { 2 | background-color: #151c25; 3 | height: 100%; 4 | } 5 | 6 | .employer-secondary-profile ul li { 7 | list-style: none; 8 | margin: 1rem; 9 | color: whitesmoke; 10 | font-size: 1.2rem; 11 | } 12 | 13 | .employer-secondary-profile ul li span { 14 | color: yellow; 15 | font-size: 1.1rem; 16 | display: block; 17 | } 18 | 19 | .employer-profile-heading { 20 | color: white; 21 | text-decoration: none; 22 | border-bottom: 5px solid yellow; 23 | padding-bottom: 10px; 24 | border-radius: 10px; 25 | } -------------------------------------------------------------------------------- /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 | { 12 | "src": "logo192.png", 13 | "type": "image/png", 14 | "sizes": "192x192" 15 | }, 16 | { 17 | "src": "logo512.png", 18 | "type": "image/png", 19 | "sizes": "512x512" 20 | } 21 | ], 22 | "start_url": ".", 23 | "display": "standalone", 24 | "theme_color": "#000000", 25 | "background_color": "#ffffff" 26 | } 27 | -------------------------------------------------------------------------------- /src/components/navbar/navbar.css: -------------------------------------------------------------------------------- 1 | .searchForm{ 2 | display: flex; 3 | width: fit-content; 4 | } 5 | .inputSearch{ 6 | width: 65% !important; 7 | } 8 | .searchBtn{ 9 | width: 50px; 10 | color: #f1eaed; 11 | } 12 | 13 | @media only screen and (max-width: 1090px){ 14 | .navBTN{ 15 | padding-left: 0; 16 | padding-right: 0; 17 | } 18 | } 19 | @media only screen and (max-width: 991px){ 20 | .searchForm{ 21 | display: flex; 22 | width: fit-content; 23 | } 24 | .navLINK{ 25 | border-bottom: 1px solid #888; 26 | } 27 | .linkText{ color: red ; } 28 | 29 | } -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "nodemon index.js" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "bcrypt": "^5.0.1", 14 | "bcryptjs": "^2.4.3", 15 | "concurrently": "^6.0.0", 16 | "cors": "^2.8.5", 17 | "dotenv": "^8.2.0", 18 | "express": "^4.17.1", 19 | "jsonwebtoken": "^8.5.1", 20 | "mongoose": "^5.11.19", 21 | "nodemailer": "^6.5.0", 22 | "nodemon": "^2.0.7", 23 | "slugify": "^1.5.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/components/Error/Error.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link } from "react-router-dom"; 3 | import "./Error.css"; 4 | import Error1 from "./error.png" 5 | 6 | const Error = () => { 7 | return ( 8 |
9 | 10 |

11 | Look like you're lost 12 |

13 |

the page you are looking for not avaible!

14 | 15 | 16 | 17 |
18 | ); 19 | }; 20 | 21 | export default Error; -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [pull_request, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/first-interaction@v1 10 | with: 11 | repo-token: ${{ secrets.GITHUB_TOKEN }} 12 | issue-message: 'Hi 😄, thanks for creating your first issue at easy-job-intern, do read and follow the [Contribution Guidelines](https://github.com/pankajkumarbij/easy-job-intern/blob/master/contributing.md) while contributing. Someone from our team will get back here soon ' 13 | pr-message: 'Thank you for your pull request and welcome to our community! We will soon be getting back to you. Your patience will be greatly appreciated!Thanks! 🥳' 14 | 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'Type: Bug' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Describe the bug 11 | A clear and concise description of what the bug is. 12 | 13 | ## To Reproduce 14 | Steps to reproduce the behavior: 15 | 1. 16 | 2. 17 | 3. 18 | 4. 19 | 20 | ## Expected behavior 21 | A clear and concise description of what you expected to happen. 22 | 23 | ## Logs 24 | If applicable, add logs to help explain your problem (e.g. the error message and/or exception traceback). 25 | 26 | ## Environment (please complete the following information): 27 | - OS: 28 | - Browser: 29 | 30 | ## Additional context 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /server/middleware/auth_employer.js: -------------------------------------------------------------------------------- 1 | const jwt = require("jsonwebtoken"); 2 | const Employer = require("../models/employer.js"); 3 | const { JWT_SECRET } = require("../keys"); 4 | 5 | const auth_employer = async (req, res, next) => { 6 | const { authorization } = req.headers; 7 | if (!authorization) { 8 | res.status(401).json({ error: "You must be logged in" }); 9 | } 10 | const token = authorization.replace("Bearer ", ""); 11 | jwt.verify(token, JWT_SECRET, (err, payload) => { 12 | if (err) { 13 | return res.status(401).json({ error: "you must be logged in" }); 14 | } 15 | 16 | const { _id } = payload; 17 | Employer.findById(_id).then((userData) => { 18 | req.user = userData; 19 | next(); 20 | }); 21 | }); 22 | }; 23 | 24 | module.exports = auth_employer; 25 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | .App-logo { 5 | height: 40vmin; 6 | pointer-events: none; 7 | } 8 | 9 | @media (prefers-reduced-motion: no-preference) { 10 | .App-logo { 11 | animation: App-logo-spin infinite 20s linear; 12 | } 13 | } 14 | 15 | .App-header { 16 | background-color: #282c34; 17 | min-height: 100vh; 18 | display: flex; 19 | flex-direction: column; 20 | align-items: center; 21 | justify-content: center; 22 | font-size: calc(10px + 2vmin); 23 | color: white; 24 | } 25 | 26 | .App-link { 27 | color: #61dafb; 28 | } 29 | 30 | @keyframes App-logo-spin { 31 | from { 32 | transform: rotate(0deg); 33 | } 34 | to { 35 | transform: rotate(360deg); 36 | } 37 | } 38 | 39 | 40 | main{ 41 | min-height: 50vh; 42 | background-color: #0d1117; 43 | } 44 | -------------------------------------------------------------------------------- /src/components/contact-us/contact-us.css: -------------------------------------------------------------------------------- 1 | .background { 2 | background: #0d1117; 3 | height: 60%; 4 | display: flex; 5 | justify-content: center; 6 | align-items: center; 7 | } 8 | 9 | .form { 10 | background-color: #000000; 11 | justify-content: center; 12 | align-items: center; 13 | width: 360px; 14 | color: white; 15 | margin-top: 2%; 16 | margin-bottom: 10%; 17 | box-shadow: 5px 5px 15px #000000; 18 | border-radius: 15px 50px; 19 | } 20 | 21 | .contactUs { 22 | background-color: #30363d; 23 | justify-content: center; 24 | align-items: center; 25 | padding-left: 20px; 26 | padding-right: 20px; 27 | padding-top: 35px; 28 | padding-bottom: 430px; 29 | margin-top: 2%; 30 | height: 550px; 31 | width: 360px; 32 | color: white; 33 | box-shadow: 5px 5px 15px #000000; 34 | border-radius: 15px 50px; 35 | } 36 | 37 | textarea { 38 | resize: none; 39 | } -------------------------------------------------------------------------------- /src/components/welcomeSignup/welcomeSignup.js: -------------------------------------------------------------------------------- 1 | import React from 'react' ; 2 | import {Link} from 'react-router-dom' ; 3 | import axios from 'axios' ; 4 | 5 | 6 | 7 | export default function WelcomeSignup ( props ) { 8 | 9 | if(props.match.path === "/confirm/:confirmationCode" ) 10 | { 11 | // verifyUser(props.match.params.confirmationCode ) 12 | axios.get("http://localhost:5000/student/confirm/" + props.match.params.confirmationCode ) 13 | .then((response) => { 14 | return response.data ; 15 | } ) 16 | .catch((err)=> { 17 | console.log(err); 18 | }) 19 | } 20 | return ( 21 |
22 |
23 |

24 | Account confirmed! 25 |

26 |
27 | 28 | Please Login 29 | 30 |
31 | ) 32 | } 33 | 34 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Related issue? 2 | close: #issue_number 3 | 4 | ## Describe the changes you've made 5 | A clear and concise description of what you have done to successfully close your assigned issue. Any new files? or anything you feel to let us know! 6 | 7 | ## Describe if there is any unusual behaviour of your code(Write `NA` if there isn't) 8 | A clear and concise description of it. 9 | 10 | ## Additional context (OPTIONAL) 11 | Add any other context or screenshots about the feature request here. 12 | 13 | ## Test plan (OPTIONAL) 14 | A good test plan should give instructions that someone else can easily follow. 15 | How someone can test your code? 16 | 17 | ## Open Source Program names (OPTIONAL) 18 | If you participated in any open-source program then please mention the program name here 19 | 20 | 21 | # Screenshots (Or Videos) 22 | 23 | Original | Updated 24 | :-------------------------:|:-------------------------: 25 | ** original screenshot ** | ** updated screenshot ** 26 | -------------------------------------------------------------------------------- /src/components/welcomeSignup/welcomeSignupEmployer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' ; 2 | import {Link} from 'react-router-dom' ; 3 | import axios from 'axios' ; 4 | 5 | 6 | 7 | export default function WelcomeSignup ( props ) { 8 | 9 | if(props.match.path === "/confirm/employer/:confirmationCode" ) 10 | { 11 | // verifyUser(props.match.params.confirmationCode ) 12 | axios.get("http://localhost:5000/employer/confirm/" + props.match.params.confirmationCode ) 13 | .then((response) => { 14 | return response.data ; 15 | } ) 16 | .catch((err)=> { 17 | console.log(err); 18 | }) 19 | } 20 | return ( 21 |
22 |
23 |

24 | Account confirmed! 25 |

26 |
27 | 28 | Please Login as employer 29 | 30 |
31 | ) 32 | } 33 | 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Pankaj Kumar Bij 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/components/footer/footer.css: -------------------------------------------------------------------------------- 1 | .icons:hover{ 2 | opacity: 0.7; 3 | width: 1.4em; 4 | height: 1.4em; 5 | transform: translateY(-2px); 6 | transition:0.3s; 7 | } 8 | 9 | @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600&display=swap'); 10 | 11 | html, 12 | body { 13 | height: 100% 14 | } 15 | 16 | * { 17 | padding: 0px; 18 | margin: 0px 19 | } 20 | 21 | body { 22 | background-color: #ebdde9; 23 | display: grid; 24 | place-items: center 25 | } 26 | 27 | .card { 28 | background-color: #2c2a2c; 29 | border-radius: 10px; 30 | font-family: 'Manrope', sans-serif 31 | } 32 | 33 | .fa { 34 | color: #d9d5d5 35 | } 36 | 37 | #inp1 { 38 | background-color: #1f1e1e; 39 | border: 1px solid #636161; 40 | font-size: 0.75rem 41 | } 42 | 43 | #inp1:focus { 44 | outline: none; 45 | box-shadow: none; 46 | } 47 | 48 | .btn-newsletter { 49 | background-color: #1a1b1b; 50 | font-size: 0.78rem; 51 | border: 0px; 52 | } 53 | 54 | .btn-newsletter:focus { 55 | outline: none; 56 | box-shadow: none; 57 | } 58 | 59 | *:focus { 60 | outline: none; 61 | } -------------------------------------------------------------------------------- /server/models/company.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | const {ObjectId} = mongoose.Schema.Types; 4 | 5 | const companySchema = new Schema({ 6 | companyName:{ 7 | type: String, 8 | required:true, 9 | }, 10 | companySize:{ 11 | enum: ['1-10', '11-50', '51-200', '201-500', '210-500', '501-1000', '1001-5000', '5000+'], 12 | type: String, 13 | required:true, 14 | }, 15 | overview: { 16 | type: String, 17 | required: true, 18 | }, 19 | locations:[{ 20 | type: String, 21 | required:true, 22 | }], 23 | tags:[{ 24 | type: String, 25 | required:true, 26 | }], 27 | tagline:{ 28 | type: String, 29 | required:true, 30 | }, 31 | investmentStage:{ 32 | type: String, 33 | required:true, 34 | }, 35 | markets:[{ 36 | type: String, 37 | required:true, 38 | }], 39 | createdBy: { 40 | type: ObjectId, 41 | ref: "Employer", 42 | required:true, 43 | }, 44 | 45 | }, {timestamps: true}) 46 | 47 | const Company = mongoose.model('Company',companySchema); 48 | 49 | module.exports = Company; 50 | -------------------------------------------------------------------------------- /server/models/employer_notification.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | const {ObjectId} = mongoose.Schema.Types; 4 | 5 | const employerNotificationSchema = new Schema({ 6 | notificationFor:{ 7 | type: ObjectId, 8 | ref: "Employer", 9 | required: true 10 | }, 11 | notificationBy:{ 12 | type: ObjectId, 13 | ref: "Student", 14 | required: true 15 | }, 16 | notificationTitle: { 17 | type: String, 18 | required: true 19 | }, 20 | internshipApplicationNotification: { 21 | type: ObjectId, 22 | ref: "Application", 23 | }, 24 | jobApplicationNotification: { 25 | type: ObjectId, 26 | ref: "Application", 27 | }, 28 | fresherJobApplicationNotification: { 29 | type: ObjectId, 30 | ref: "Application", 31 | }, 32 | status: { 33 | type: String, 34 | enum: ['read', 'unread'], 35 | required: true 36 | }, 37 | 38 | }, {timestamps: true}) 39 | 40 | const EmployerNotification = mongoose.model('EmployerNotification', employerNotificationSchema); 41 | 42 | module.exports = EmployerNotification; -------------------------------------------------------------------------------- /server/utils/signup-email.js: -------------------------------------------------------------------------------- 1 | const nodemailer = require('nodemailer'); 2 | require('dotenv').config() 3 | exports.signupEmailFunc = async (name, mail, confirmationCode) => { 4 | 5 | const transporter = nodemailer.createTransport({ 6 | service : "gmail", 7 | auth : { 8 | user : process.env.EMAIL_USER, 9 | pass : process.env.EMAIL_PASSWORD 10 | }, 11 | tls : { 12 | rejectUnauthorized : false 13 | } 14 | 15 | } ) 16 | var mailOptions = { 17 | from: 'Easy-job-intern', 18 | to: mail, 19 | subject: 'Sending Email via Node.js', 20 | html : `

Email Confirmation

21 |

Hii ${name}

22 |

Please verify your account by clicking this link

23 | Click here ` 24 | } 25 | 26 | 27 | let info = await transporter.sendMail(mailOptions , (error , response )=> { 28 | if(error) console.log("Email not sent" , error); 29 | else console.log('Email sent successfully'); 30 | } ); 31 | 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const cors = require("cors"); 4 | const PORT = 5000; 5 | var url = "mongodb://localhost:27017/eji" 6 | 7 | mongoose.connect(url, { 8 | useNewUrlParser: true, 9 | useUnifiedTopology: true, 10 | useCreateIndex: true, 11 | }); 12 | mongoose.connection.on("connected", () => { 13 | console.log("Database Connected"); 14 | }); 15 | mongoose.connection.on("error", (err) => { 16 | console.log("connecting error", err); 17 | }); 18 | 19 | const app = express(); 20 | 21 | app.use(cors()); 22 | 23 | app.use(express.json()); 24 | app.use(express.urlencoded({ extended: true })); 25 | 26 | const StudentRouter = require("./routes/student"); 27 | const CategoryRouter = require("./routes/Category"); 28 | const EmployerRouter = require("./routes/employer"); 29 | const UserRouter = require("./routes/general"); 30 | 31 | app.use("/student", StudentRouter); 32 | app.use("/employer", EmployerRouter); 33 | app.use("/category",CategoryRouter); 34 | app.use("/user", UserRouter); 35 | 36 | 37 | app.get("/", (req, res) => { 38 | res.send("Welcome to easy job intern server"); 39 | }); 40 | 41 | app.listen(PORT, () => { 42 | console.log("server is running on port ", PORT); 43 | }); 44 | -------------------------------------------------------------------------------- /server/utils/signupEmployer-email.js: -------------------------------------------------------------------------------- 1 | const nodemailer = require('nodemailer'); 2 | require('dotenv').config() 3 | exports.signupEmailFunc = async (name, mail, confirmationCode) => { 4 | 5 | const transporter = nodemailer.createTransport({ 6 | service : "gmail", 7 | auth : { 8 | user : process.env.EMAIL_USER, 9 | pass : process.env.EMAIL_PASSWORD 10 | }, 11 | tls : { 12 | rejectUnauthorized : false 13 | } 14 | 15 | } ) 16 | var mailOptions = { 17 | from: 'Easy-job-intern', 18 | to: mail, 19 | subject: 'Sending Email via Node.js', 20 | html : `

Email Confirmation

21 |

Hii ${name}

22 |

Please verify your account by clicking this link

23 | Click here ` 24 | } 25 | 26 | 27 | let info = await transporter.sendMail(mailOptions , (error , response )=> { 28 | if(error) console.log("Email not sent" , error); 29 | else console.log('Email sent successfully'); 30 | } ); 31 | 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /server/models/student_notification.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | const {ObjectId} = mongoose.Schema.Types; 4 | 5 | const studentNotificationSchema = new Schema({ 6 | notificationFor:{ 7 | type: ObjectId, 8 | ref: "Student", 9 | required: true 10 | }, 11 | notificationBy:{ 12 | type: ObjectId, 13 | ref: "Employer", 14 | required: true 15 | }, 16 | notificationTitle: { 17 | type: String, 18 | required: true 19 | }, 20 | applicationNotification: { 21 | type: ObjectId, 22 | ref: "Application", 23 | }, 24 | internshipOpeningNotification: { 25 | type: ObjectId, 26 | ref: "Internship", 27 | }, 28 | jobOpeningNotification: { 29 | type: ObjectId, 30 | ref: "Job", 31 | }, 32 | fresherJobOpeningNotification: { 33 | type: ObjectId, 34 | ref: "FreshersJob", 35 | }, 36 | status: { 37 | type: String, 38 | enum: ['read', 'unread'], 39 | required: true 40 | }, 41 | 42 | }, {timestamps: true}) 43 | 44 | const StudentNotification = mongoose.model('StudentNotification', studentNotificationSchema); 45 | 46 | module.exports = StudentNotification; -------------------------------------------------------------------------------- /server/controller/studentProfile.js: -------------------------------------------------------------------------------- 1 | const Student = require("../models/student"); 2 | 3 | exports.addProfileBuilder = async (req, res) => { 4 | const { Profile } = req.body; 5 | console.log(Profile); 6 | 7 | let USER; 8 | try { 9 | USER = await Student(req.user._id); 10 | } catch (err) { 11 | console.log(err); 12 | res.status(500).json({ message: "something went wrong!" }); 13 | } 14 | 15 | if (!USER) { 16 | res.json({ message: "user not found" }); 17 | } 18 | 19 | Student.findByIdAndUpdate( 20 | req.user._id, 21 | { 22 | Profile, 23 | }, 24 | { new: true } 25 | ) 26 | .then((student) => { 27 | res.status(200).json({ student: student }); 28 | }) 29 | .catch((err) => { 30 | console.log(err); 31 | res.status(500).json({ message: "something went wrong!" }); 32 | }); 33 | }; 34 | 35 | exports.getProfileStudent = (req, res) => { 36 | console.log(req.user._id); 37 | Student.findById(req.user._id) 38 | .then((student) => { 39 | if (student) { 40 | res.status(200).json({ profile: student.Profile }); 41 | } 42 | res.status(400).json({ message: "student not found" }); 43 | }) 44 | .catch((err) => { 45 | console.log(err); 46 | res.status(500).json({ message: "something went wrong!" }); 47 | }); 48 | }; 49 | -------------------------------------------------------------------------------- /server/models/application.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | const {ObjectId} = mongoose.Schema.Types; 4 | 5 | const applicationSchema = new Schema({ 6 | applyingFor:{ 7 | type: String, 8 | enum: ['job', 'internship', 'fresherjob'], 9 | required:true, 10 | trim: true 11 | }, 12 | employer: { 13 | type: ObjectId, 14 | ref: "Employer", 15 | required: true 16 | }, 17 | applied_job: { 18 | type: ObjectId, 19 | ref: "Job", 20 | }, 21 | applied_fresherjob: { 22 | type: ObjectId, 23 | ref: "FreshersJob", 24 | }, 25 | applied_internship: { 26 | type: ObjectId, 27 | ref: "Internship", 28 | }, 29 | applicantId: { 30 | type: ObjectId, 31 | ref: "Student", 32 | required: true 33 | }, 34 | applicantSendNote: { 35 | type: String, 36 | }, 37 | status: { 38 | type: String, 39 | enum: ['pending', 'approved', 'rejected'], 40 | required: true 41 | }, 42 | applicantReceiveNote: { 43 | type: String, 44 | } 45 | }, {timestamps: true}) 46 | 47 | const Application = mongoose.model('Application',applicationSchema); 48 | 49 | module.exports = Application; 50 | 51 | -------------------------------------------------------------------------------- /src/components/student/register.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 60%; 3 | background-color: #1a2226; 4 | opacity: 75%; 5 | padding-top: 6%; 6 | padding-bottom: 5%; 7 | text-align: left; 8 | border-radius: 1%; 9 | } 10 | a, a:hover{ 11 | color: inherit; 12 | } 13 | 14 | 15 | /* .card_custom{ 16 | max-width: max-content !important; 17 | } */ 18 | 19 | .input-error { 20 | border: #ff0000 2px solid !important; 21 | } 22 | 23 | .container label { 24 | margin-left: 10%; 25 | font-weight: 700; 26 | color: aqua; 27 | } 28 | 29 | .container button { 30 | margin-top: 3%; 31 | margin-left: 10%; 32 | width: 80%; 33 | } 34 | 35 | .container input { 36 | width: 80%; 37 | margin-left: 10%; 38 | } 39 | 40 | .box { 41 | width: 100%; 42 | background-image: url("http://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MXwxMjA3fDB8MXxzZWFyY2h8MXx8am9ifHwwfHx8&ixlib=rb-1.2.1&q=80&w=1080"); 43 | background-repeat: repeat; 44 | background-position: center; 45 | background-size: cover; 46 | background-color: rgba(194, 181, 194, 0.329); 47 | background-blend-mode: lighten; 48 | padding-top: 3%; 49 | padding-bottom: 15%; 50 | } 51 | 52 | @media only screen and (max-width:750px) { 53 | 54 | .register_card_custom { 55 | min-width: 80vw !important; 56 | font-size: 0.9rem !important; 57 | } 58 | 59 | .register_card_custom input { 60 | font-size: 0.8rem !important; 61 | } 62 | 63 | .error{ 64 | font-size: 0.7rem; 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /server/middleware/auth_student.js: -------------------------------------------------------------------------------- 1 | const jwt = require("jsonwebtoken"); 2 | const Student = require("../models/student.js"); 3 | const { JWT_SECRET } = require("../keys"); 4 | 5 | const auth_student = async (req, res, next) => { 6 | // try { 7 | // // Authentication type Bearer 8 | // const token = req.header("Authorization").replace("Bearer ", ""); 9 | // const decoded = jwt.verify(token, JWT_SECRET); 10 | // const user = await Student.findOne({ 11 | // _id: decoded._id, 12 | // "tokens.token": token, 13 | // }); 14 | // if (!user) { 15 | // console.log("error"); 16 | // throw new Error("error"); 17 | // } 18 | // req.token = token; 19 | // req.user = user; 20 | // } catch (e) { 21 | // console.log(e); 22 | // return res.send({ error: "Please Authenticate" }); 23 | // } 24 | // next(); 25 | 26 | const { authorization } = req.headers; 27 | if (!authorization) { 28 | res.status(401).json({ error: "You must be logged in" }); 29 | } 30 | const token = authorization.replace("Bearer ", ""); 31 | jwt.verify(token, JWT_SECRET, (err, payload) => { 32 | if (err) { 33 | console.log(err); 34 | return res.status(401).json({ error: "you must be logged in" }); 35 | } 36 | 37 | const { _id } = payload; 38 | console.log(_id); 39 | Student.findById(_id).then((userData) => { 40 | console.log(userData); 41 | req.user = userData; 42 | next(); 43 | }); 44 | }); 45 | }; 46 | 47 | module.exports = auth_student; 48 | -------------------------------------------------------------------------------- /public/images/website-content.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/student-profile/StudentProfile/components/Project.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "../../profile.css"; 3 | import { useState } from "react"; 4 | 5 | import { Col, Row } from "react-bootstrap"; 6 | 7 | const Project = ({ Project }) => { 8 | return ( 9 | 10 |

Project

11 | {Project && 12 | Project.map((edu) => ( 13 | 14 | 15 |
Company
16 |
{edu.ProjectTitle}
17 | 18 | 19 |
Title:
20 |
{edu.ProjectLink}
21 | 22 | 23 |
StartDate
24 |
{edu.StartDate}
25 | 26 | 27 |
EndDate:
28 |
{edu.EndDate}
29 | 30 | 31 | 32 |
Description:
33 |
{edu.Description}
34 | 35 |
36 | ))} 37 |
38 | ); 39 | }; 40 | 41 | export default Project; 42 | -------------------------------------------------------------------------------- /src/components/student-profile/StudentProfile/components/Experience.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "../../profile.css"; 3 | import { useState } from "react"; 4 | 5 | import { Col, Row } from "react-bootstrap"; 6 | 7 | const Experience = ({ Experience }) => { 8 | return ( 9 | 10 |

Experience

11 | {Experience && Experience.map(edu => 12 | 13 |
Company
14 |
{edu.Company}
15 | 16 | 17 |
Title:
18 |
{edu.Title}
19 | 20 | 21 |
StartDate
22 |
{edu.StartDate}
23 | 24 | 25 |
EndDate:
26 |
{edu.EndDate}
27 | 28 | 29 |
Location:
30 |
{edu.Location}
31 | 32 | 33 |
Description:
34 |
{edu.Description}
35 | 36 |
)} 37 |
38 | ); 39 | }; 40 | 41 | export default Experience; 42 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "easyjobintern", 3 | "version": "0.1.0", 4 | "private": true, 5 | "proxy": "http://localhost:5000", 6 | "dependencies": { 7 | "@fortawesome/fontawesome-svg-core": "^1.2.35", 8 | "@material-ui/core": "^4.11.3", 9 | "@material-ui/icons": "^4.11.2", 10 | "@testing-library/jest-dom": "^5.11.9", 11 | "@testing-library/react": "^11.2.3", 12 | "@testing-library/user-event": "^12.6.0", 13 | "axios": "^0.21.1", 14 | "bootstrap": "^4.6.0", 15 | "concurrently": "^5.3.0", 16 | "jquery": "^3.6.0", 17 | "nodemailer": "^6.5.0", 18 | "popper.js": "^1.16.1", 19 | "react": "^17.0.1", 20 | "react-bootstrap": "^1.4.3", 21 | "react-bootstrap-icons": "^1.2.3", 22 | "react-dom": "^17.0.1", 23 | "react-hot-toast": "^1.0.2", 24 | "react-json-parser": "^0.2.1", 25 | "react-router-dom": "^5.2.0", 26 | "react-scripts": "4.0.1", 27 | "uuid": "^8.3.2", 28 | "web-vitals": "^0.2.4" 29 | }, 30 | "scripts": { 31 | "start": "react-scripts start", 32 | "build": "react-scripts build", 33 | "test": "react-scripts test", 34 | "eject": "react-scripts eject", 35 | "server": "cd server && nodemon index.js", 36 | "dev": "concurrently \"npm run server\" \"npm run start\"" 37 | }, 38 | "eslintConfig": { 39 | "extends": [ 40 | "react-app", 41 | "react-app/jest" 42 | ] 43 | }, 44 | "browserslist": { 45 | "production": [ 46 | ">0.2%", 47 | "not dead", 48 | "not op_mini all" 49 | ], 50 | "development": [ 51 | "last 1 chrome version", 52 | "last 1 firefox version", 53 | "last 1 safari version" 54 | ] 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /server/routes/Category.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const router = express.Router(); 3 | 4 | const Category = require("../models/Category"); 5 | const slugify = require("slugify"); 6 | 7 | // get all categories GET Request public 8 | router.get("/all", (req, res) => { 9 | Category.find({}).exec((err, data) => { 10 | if (err) { 11 | return res.status(400).json({ 12 | error: err, 13 | }); 14 | } 15 | res.json(data); 16 | }); 17 | }); 18 | 19 | // Create Category POST Request Admin Only 20 | router.post("/", (req, res) => { 21 | const { name } = req.body; 22 | let slug = slugify(name).toLowerCase(); 23 | 24 | let category = new Category({ name, slug }); 25 | 26 | category.save((err, data) => { 27 | if (err) { 28 | return res.status(400).json({ error: err }); 29 | } 30 | res.json(data); 31 | }); 32 | }); 33 | 34 | // get single Category GET Request public 35 | router.get("/:slug", (req, res) => { 36 | const slug = req.params.slug.toLowerCase(); 37 | Category.findOne({ slug }).exec((err, category) => { 38 | if (err) { 39 | return res.status(400).json({ 40 | error: err, 41 | }); 42 | } 43 | res.json({ category }); 44 | }); 45 | }); 46 | 47 | // delete Category DELETE Request Admin only 48 | router.delete("/:slug", (req, res) => { 49 | const slug = req.params.slug.toLowerCase(); 50 | 51 | Category.findOneAndDelete({ slug }, (err, docs) => { 52 | if (err) { 53 | return res.status(400).json({ error: err }); 54 | } 55 | res.json({ message: "Deleted the Category Successfully" }); 56 | }); 57 | }); 58 | 59 | module.exports = router; 60 | -------------------------------------------------------------------------------- /server/utils/email.js: -------------------------------------------------------------------------------- 1 | const nodemailer = require('nodemailer'); 2 | 3 | const email = (name, mail, mobile) => { 4 | const mailTransporter = nodemailer.createTransport({ 5 | service: 'SendGrid', 6 | auth: { 7 | user: process.env.EMAIL_USERNAME, 8 | pass: process.env.EMAIL_PASSWORD 9 | } 10 | }); 11 | 12 | const send = async subject => { 13 | // 1) define the email options 14 | const mailOptions = { 15 | from: 'Easy Job Intern', 16 | to: mail, 17 | subject, 18 | text: `Hello ${name}.\nWe welcome you to the Easy Job Intern.\n\nEasy Job Intern is a platform which provides the best job and internship opportunities. Companies can post here open application for jobs and internships so students can make their own profile and apply in multiple companies.\n\nYour account details are:\n 19 | Name: ${name}\nEmail: ${mail}\nMobile: ${mobile}\n\nWe’d love to hear what you think of Bunk Manager and if there is anything we can improve. If you have any questions, please reply to this email. We're always happy to help!\n\nEasy Job Intern Team` 20 | }; 21 | 22 | // 2) create a transport and send email 23 | await mailTransporter.sendMail(mailOptions, (err,data) => { 24 | if(err) console.log(err); 25 | else console.log('Email sent successfully'); 26 | }); 27 | } 28 | 29 | //For sending welcome email anytime a new user sign up 30 | const sendWelcome = async () => { 31 | await send('Welcome to Easy Job Intern!'); 32 | }; 33 | 34 | //We can use this same function for more emails too 35 | }; 36 | 37 | module.exports = email; -------------------------------------------------------------------------------- /server/controller/student_notification.js: -------------------------------------------------------------------------------- 1 | const Internship = require("../models/Internship"); 2 | const Job = require("../models/Job"); 3 | const FresherJob = require("../models/Freshers"); 4 | const Application = require("../models/application"); 5 | const Notification = require("../models/student_notification"); 6 | 7 | const ObjectID = require("mongodb").ObjectID; 8 | 9 | exports.getNotifications = async (req, res) => { 10 | try { 11 | const notifications = await Notification.find({ 12 | notificationFor: req.user._id, 13 | status: "unread", 14 | }).sort("-createdAt"); 15 | 16 | if (!notifications || notifications.length === 0) { 17 | return res.status(200).send({ message: "no new notifications" }); 18 | } 19 | 20 | return res.status(200).send(notifications); 21 | } catch (e) { 22 | console.log(e); 23 | return res.status(400).send({ message: "something went wrong!" }); 24 | } 25 | }; 26 | 27 | exports.getNotification = async (req, res) => { 28 | try { 29 | const notification = await Notification.findOne({ _id: req.params.id }); 30 | if (!ObjectID.isValid(req.params.id)) { 31 | return res.status(400).send({ message: "invalid notification id" }); 32 | } 33 | if (!notification) { 34 | return res.status(400).send({ message: "notification does not exist!" }); 35 | } 36 | 37 | if (notification.status === "unread") { 38 | console.log("in"); 39 | notification.status = "read"; 40 | notification.save(); 41 | } 42 | 43 | return res.status(200).send(notification); 44 | } catch (e) { 45 | console.log(e); 46 | return res.status(400).send({ message: "something went wrong!" }); 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /server/models/Freshers.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const Schema = mongoose.Schema; 3 | const { ObjectId } = mongoose.Schema.Types; 4 | 5 | const FreshersJobSchema = new Schema( 6 | { 7 | companyName: { 8 | type: String, 9 | required: true, 10 | }, 11 | description: { 12 | type: String, 13 | required: true, 14 | }, 15 | location: { 16 | type: String, 17 | required: true, 18 | }, 19 | stream: { 20 | type: String, 21 | required: true, 22 | }, 23 | industry: { 24 | type: String, 25 | required: true, 26 | }, 27 | salary: { 28 | type: String, 29 | required: true, 30 | }, 31 | techstack: { 32 | type: [String], 33 | required: true, 34 | }, 35 | lastDate: { 36 | type: Date, 37 | required: true, 38 | }, 39 | startDate: { 40 | type: Date, 41 | required: true, 42 | }, 43 | createdBy: { 44 | type: ObjectId, 45 | ref: "Employer", 46 | }, 47 | role: { 48 | type: String, 49 | required: true, 50 | }, 51 | vacancies: { 52 | type: Number, 53 | required: true, 54 | }, 55 | workFromHome: { 56 | type: Boolean, 57 | required: true 58 | }, 59 | partTimeAllowed: { 60 | type: Boolean, 61 | required: true 62 | }, 63 | prerequisites:{ 64 | type: [String], 65 | required:true, 66 | } 67 | // bookmarkedBy: [ 68 | // { 69 | // type: ObjectId, 70 | // ref: "Student", 71 | // }, 72 | // ], 73 | }, 74 | { timestamps: true } 75 | ); 76 | 77 | const FreshersJob = mongoose.model("FreshersJob", FreshersJobSchema); 78 | 79 | module.exports = FreshersJob; 80 | -------------------------------------------------------------------------------- /src/components/student-profile/StudentProfile/components/General.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "../../profile.css"; 3 | import { useState } from "react"; 4 | 5 | import { Col, Row } from "react-bootstrap"; 6 | 7 | const General = ({ general }) => { 8 | return ( 9 | 10 |

General

11 | 12 | 13 |
First Name:
14 |
{general.FirstName}
15 | 16 | 17 |
Last Name:
18 |
{general.LastName}
19 | 20 | 21 |
Address:
22 |
{general.Address}
23 | 24 | 25 |
Github Link:
26 |
{general.GithubLink}
27 | 28 | 29 |
LinkedInLink:
30 |
{general.LinkedInLink}
31 | 32 |
Other Profile Link:
33 | {general.OtherProfileLink && 34 | general.OtherProfileLink.map((link) => ( 35 | 36 |
{link && link.ProfileLink}
37 | 38 | ))} 39 |
40 |
41 | ); 42 | }; 43 | 44 | export default General; 45 | -------------------------------------------------------------------------------- /src/components/student-profile/StudentProfile/components/Education.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "../../profile.css"; 3 | import { useState } from "react"; 4 | 5 | import { Col, Row } from "react-bootstrap"; 6 | 7 | const Education = ({ Education }) => { 8 | return ( 9 | 10 |

Education

11 | 12 | 13 |
School
14 |
{Education.School}
15 | 16 | 17 |
Degree:
18 |
{Education.Degree}
19 | 20 | 21 |
FieldOfStudy:
22 |
{Education.FieldOfStudy}
23 | 24 | 25 |
Github Link:
26 |
{Education.GithubLink}
27 | 28 | 29 |
LinkedInLink:
30 |
{Education.LinkedInLink}
31 | 32 |
Other Profile Link:
33 | {Education.OtherProfileLink && 34 | Education.OtherProfileLink.map((link) => ( 35 | 36 |
{link && link.ProfileLink}
37 | 38 | ))} 39 |
40 |
41 | ); 42 | }; 43 | 44 | export default Education; 45 | -------------------------------------------------------------------------------- /server/models/Job.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const Schema = mongoose.Schema; 3 | const { ObjectId } = mongoose.Schema.Types; 4 | 5 | const JobSchema = new Schema( 6 | { 7 | companyName: { 8 | type: String, 9 | required: true, 10 | }, 11 | description: { 12 | type: String, 13 | required: true, 14 | }, 15 | location: { 16 | type: String, 17 | required: true, 18 | }, 19 | stream: { 20 | type: String, 21 | required: true, 22 | }, 23 | industry: { 24 | type: String, 25 | required: true, 26 | }, 27 | salary: { 28 | type: String, 29 | required: true, 30 | }, 31 | techstack: { 32 | type: [String], 33 | required: true, 34 | }, 35 | lastDate: { 36 | type: Date, 37 | required: true, 38 | }, 39 | startDate: { 40 | type: Date, 41 | required: true, 42 | }, 43 | experience: { 44 | type: Number, 45 | required: true, 46 | }, 47 | createdBy: { 48 | type: ObjectId, 49 | ref: "Employer", 50 | }, 51 | role: { 52 | type: String, 53 | required: true, 54 | }, 55 | vacancies: { 56 | type: Number, 57 | required: true, 58 | }, 59 | workFromHome: { 60 | type: Boolean, 61 | required: true 62 | }, 63 | partTimeAllowed: { 64 | type: Boolean, 65 | required: true 66 | }, 67 | prerequisites:{ 68 | type: [String], 69 | required:true, 70 | } 71 | // bookmarkedBy: [ 72 | // { 73 | // type: ObjectId, 74 | // ref: "Student", 75 | // }, 76 | // ], 77 | }, 78 | { timestamps: true } 79 | ); 80 | 81 | const Job = mongoose.model("Job", JobSchema); 82 | 83 | module.exports = Job; 84 | -------------------------------------------------------------------------------- /src/components/Jobs/JobCompanyName.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useContext, useEffect, useState } from "react"; 3 | import { Link, useHistory, useParams } from "react-router-dom"; 4 | import { Col, Row, Spinner, Alert } from "react-bootstrap"; 5 | 6 | const JobCompanyName = () => { 7 | const history = useHistory(); 8 | const [names, setNames] = useState(); 9 | useEffect(() => { 10 | axios({ 11 | method: "get", 12 | url: `http://localhost:5000/user/companyName-Job`, 13 | headers: { 14 | Authorization: "Bearer " + localStorage.getItem("jwt"), 15 | }, 16 | }) 17 | .then((res) => { 18 | console.log(res); 19 | if (res.data.error) { 20 | console.log(res.data.error); 21 | // alert(res.data.error); 22 | // const notify = () => toast(res.data.error); 23 | // notify(); 24 | } else { 25 | console.log(res.data.Jobs); 26 | setNames(res.data.Jobs); 27 | console.log(names); 28 | } 29 | }) 30 | .catch((err) => { 31 | // setLoading(false); 32 | console.log("Error: ", err); 33 | }); 34 | }, []); 35 | 36 | console.log(names); 37 | return ( 38 |
39 |

Jobs

40 | 41 | {names && 42 | names.map((name) => ( 43 | 44 |
47 | history.push(`/companyName-job/${name._id}`) 48 | } 49 | > 50 | {name._id} 51 |
52 | 53 | ))} 54 |
55 |
56 | ); 57 | }; 58 | 59 | export default JobCompanyName; 60 | -------------------------------------------------------------------------------- /src/components/Internships/InternshipCompanyNames.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useContext, useEffect, useState } from "react"; 3 | import { Link, useHistory, useParams } from "react-router-dom"; 4 | import { Col, Row, Spinner, Alert } from "react-bootstrap"; 5 | 6 | const InternshipCompanyName = () => { 7 | const history = useHistory(); 8 | const [names, setNames] = useState(); 9 | useEffect(() => { 10 | axios({ 11 | method: "get", 12 | url: `http://localhost:5000/user/companyName-internship`, 13 | headers: { 14 | Authorization: "Bearer " + localStorage.getItem("jwt"), 15 | }, 16 | }) 17 | .then((res) => { 18 | console.log(res); 19 | if (res.data.error) { 20 | console.log(res.data.error); 21 | // alert(res.data.error); 22 | // const notify = () => toast(res.data.error); 23 | // notify(); 24 | } else { 25 | console.log(res.data.internships); 26 | setNames(res.data.internships); 27 | console.log(names); 28 | } 29 | }) 30 | .catch((err) => { 31 | // setLoading(false); 32 | console.log("Error: ", err); 33 | }); 34 | }, []); 35 | 36 | console.log(names); 37 | return ( 38 |
39 |

Internships

40 | 41 | {names && 42 | names.map((name) => ( 43 | 44 |
47 | history.push(`/companyName-internship/${name._id}`) 48 | } 49 | > 50 | {name._id} 51 |
52 | 53 | ))} 54 |
55 |
56 | ); 57 | }; 58 | 59 | export default InternshipCompanyName; 60 | -------------------------------------------------------------------------------- /src/components/FreshersJob/FreshersJobCompanyName.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useContext, useEffect, useState } from "react"; 3 | import { Link, useHistory, useParams } from "react-router-dom"; 4 | import { Col, Row, Spinner, Alert } from "react-bootstrap"; 5 | 6 | const FreshersJobCompanyName = () => { 7 | const history = useHistory(); 8 | const [names, setNames] = useState(); 9 | useEffect(() => { 10 | axios({ 11 | method: "get", 12 | url: `http://localhost:5000/user/companyName-freshersjob`, 13 | headers: { 14 | Authorization: "Bearer " + localStorage.getItem("jwt"), 15 | }, 16 | }) 17 | .then((res) => { 18 | console.log(res); 19 | if (res.data.error) { 20 | console.log(res.data.error); 21 | // alert(res.data.error); 22 | // const notify = () => toast(res.data.error); 23 | // notify(); 24 | } else { 25 | console.log(res.data.FreshersJobs); 26 | setNames(res.data.FreshersJobs); 27 | console.log(names); 28 | } 29 | }) 30 | .catch((err) => { 31 | // setLoading(false); 32 | console.log("Error: ", err); 33 | }); 34 | }, []); 35 | 36 | console.log(names); 37 | return ( 38 |
39 |

Fresher's Jobs

40 | 41 | {names && 42 | names.map((name) => ( 43 | 44 |
47 | history.push(`/freshers/companyName/${name._id}`) 48 | } 49 | > 50 | {name._id} 51 |
52 | 53 | ))} 54 |
55 |
56 | ); 57 | }; 58 | 59 | export default FreshersJobCompanyName; 60 | -------------------------------------------------------------------------------- /server/models/Internship.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | const {ObjectId} = mongoose.Schema.Types; 4 | 5 | const internshipSchema = new Schema({ 6 | companyName:{ 7 | type: String, 8 | required:true, 9 | }, 10 | description:{ 11 | type: String, 12 | required:true, 13 | }, 14 | location:{ 15 | type: String, 16 | required:true, 17 | }, 18 | industry:{ 19 | type: String, 20 | required:true, 21 | }, 22 | stream:{ 23 | type: String, 24 | required:true, 25 | }, 26 | stipend:{ 27 | type: String, 28 | required:true, 29 | }, 30 | techstack:{ 31 | type: [String], 32 | required:true, 33 | }, 34 | lastDate:{ 35 | type: Date, 36 | required:true, 37 | }, 38 | duration:{ 39 | type: String, 40 | required:true, 41 | }, 42 | startDate:{ 43 | type: Date, 44 | required:true, 45 | }, 46 | endDate:{ 47 | type: Date, 48 | required:true, 49 | }, 50 | createdBy: { 51 | type: ObjectId, 52 | ref: "Employer" 53 | }, 54 | role: { 55 | type: String, 56 | required: true 57 | }, 58 | vacancies: { 59 | type: Number, 60 | required: true 61 | }, 62 | workFromHome: { 63 | type: Boolean, 64 | required: true 65 | }, 66 | partTimeAllowed: { 67 | type: Boolean, 68 | required: true 69 | }, 70 | withJobOffer: { 71 | type: Boolean, 72 | }, 73 | prerequisites:{ 74 | type: [String], 75 | required:true, 76 | } 77 | // bookmarkedBy: [{ 78 | // type: ObjectId, 79 | // ref: 'Student' 80 | // }] 81 | }, {timestamps: true}) 82 | 83 | const Internship = mongoose.model('Internship',internshipSchema); 84 | 85 | module.exports = Internship; -------------------------------------------------------------------------------- /src/components/Error/Error.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | font-family: Arial, Helvetica, sans-serif; 6 | } 7 | .errors { 8 | height: 70vh; 9 | text-align: center; 10 | display: flex; 11 | flex-direction: column; 12 | justify-content: center; 13 | align-items: center; 14 | text-shadow: 1px 2px 3px #2b5d61; 15 | background-color: #052224; 16 | color: #798a8b; 17 | } 18 | .errors h1, 19 | button, 20 | p { 21 | align-items: center; 22 | } 23 | 24 | .error-img { 25 | margin-top: -10%; 26 | margin-bottom: 0%; 27 | animation: up-down 1s ease-in-out infinite alternate-reverse both; 28 | width: 500px; 29 | height: 500px; 30 | } 31 | 32 | @-webkit-keyframes up-down { 33 | 0% { 34 | transform: translateY(15px); 35 | } 36 | 100% { 37 | transform: translateY(-15px); 38 | } 39 | } 40 | @keyframes up-down { 41 | 0% { 42 | transform: translateY(15px); 43 | } 44 | 100% { 45 | transform: translateY(-15px); 46 | } 47 | } 48 | 49 | .error-btn { 50 | background-color: #798a8b; 51 | color: white; 52 | box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, 53 | rgba(0, 0, 0, 0.3) 0px 3px 7px -3px; 54 | border-radius: 1rem; 55 | font-size: 1.5rem; 56 | margin-top: -3%; 57 | margin-bottom: 4%; 58 | padding: 3% auto 3%; 59 | border: 2px solid #fff; 60 | } 61 | 62 | .error-para { 63 | color: yellow; 64 | font-size: 1.5em; 65 | } 66 | .error-heading { 67 | text-shadow: rgb(178, 169, 143) 0px 3px 0px, rgba(0, 0, 0, 0.15) 0px 14px 10px, 68 | rgba(0, 0, 0, 0.1) 0px 24px 2px, rgba(0, 0, 0, 0.1) 0px 34px 30px; 69 | color: #798a8b; 70 | letter-spacing: normal; 71 | font-size: 3.5em; 72 | margin-top: -6%; 73 | font-weight: normal; 74 | } 75 | @media only screen and (max-width:767px) { 76 | .error-img { 77 | margin-top: -20%; 78 | } 79 | .error-heading { 80 | font-size: 3em; 81 | margin-top: -10%; 82 | } 83 | } -------------------------------------------------------------------------------- /src/utils/checkValidation.js: -------------------------------------------------------------------------------- 1 | //function which takes in the value of the input field and the validation rules(rules as dictionary) 2 | //and currentPassword in case of confirmedPassword field and returns a error Message and a boolean value if theinput is valid or not 3 | const checkValidity = (value, rules, currentPassword) => { 4 | let errorMessage = ""; 5 | let isValid = true; 6 | 7 | if (!rules) { 8 | return true; 9 | } 10 | 11 | if (rules.required) { 12 | isValid = value.trim() !== "" && isValid; 13 | if (!isValid) { 14 | errorMessage = "Please fill the required field."; 15 | } 16 | } 17 | 18 | if (rules.minLength) { 19 | isValid = value.length >= rules.minLength && isValid; 20 | if (!isValid) { 21 | errorMessage = 22 | "Required field length should be equal to or greater than" + rules.minLength; 23 | } 24 | } 25 | 26 | if (rules.maxLength) { 27 | isValid = value.length <= rules.maxLength && isValid; 28 | if (!isValid) { 29 | errorMessage = 30 | "Required field length should be less than " + rules.maxLength; 31 | } 32 | } 33 | 34 | if (rules.Length) { 35 | isValid = value.length === rules.Length && isValid; 36 | if (!isValid) { 37 | errorMessage = "Required field length should be " + rules.Length; 38 | } 39 | } 40 | 41 | if (rules.isEmail) { 42 | const pattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; 43 | isValid = pattern.test(value) && isValid; 44 | if (!isValid) { 45 | errorMessage = "Required field should be a email"; 46 | } 47 | } 48 | if (rules.isNumeric) { 49 | const pattern = /^\d+$/; 50 | isValid = pattern.test(value) && isValid; 51 | if (!isValid) { 52 | errorMessage = "Required field should be a number"; 53 | } 54 | } 55 | 56 | if (rules.checkPassword) { 57 | isValid = value === currentPassword && isValid; 58 | if (!isValid) { 59 | errorMessage = "Password donot match!"; 60 | } 61 | } 62 | 63 | return [isValid, errorMessage]; 64 | }; 65 | 66 | export default checkValidity; 67 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 | 32 |
33 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /server/controller/employer_notification.js: -------------------------------------------------------------------------------- 1 | const Internship = require("../models/Internship"); 2 | const Job = require('../models/Job') 3 | const FresherJob = require('../models/Freshers') 4 | const Application = require("../models/application"); 5 | const Notification = require("../models/employer_notification") 6 | 7 | const ObjectID = require('mongodb').ObjectID; 8 | 9 | exports.getNotifications = async(req, res) => { 10 | try{ 11 | const notifications = await Notification.find({notificationFor: req.user._id, status: "unread"}) 12 | .sort("-createdAt") 13 | 14 | if(!notifications || notifications.length===0){ 15 | return res.status(200).send({message: "no new notifications"}) 16 | } 17 | 18 | return res.status(200).send(notifications) 19 | 20 | } 21 | 22 | catch(e){ 23 | console.log(e) 24 | return res.status(400).send({message: "something went wrong!"}) 25 | } 26 | 27 | } 28 | 29 | exports.getNotification = async(req, res) => { 30 | try{ 31 | const notification = await Notification.findOne({_id: req.params.id}) 32 | if(!ObjectID.isValid(req.params.id)){ 33 | return res 34 | .status(400) 35 | .send({message: "invalid notification id"}); 36 | } 37 | if(!notification){ 38 | return res 39 | .status(400) 40 | .send({message: "notification does not exist!"}); 41 | } 42 | 43 | if(notification.notificationFor.toString() !== req.user._id.toString()){ 44 | return res 45 | .status(400) 46 | .send({message: "notification not intended to you!"}); 47 | } 48 | 49 | if(notification.status === 'unread'){ 50 | console.log("in") 51 | notification.status = 'read' 52 | notification.save() 53 | } 54 | 55 | return res.status(200).send(notification) 56 | 57 | } 58 | catch(e){ 59 | console.log(e) 60 | return res.status(400).send({message: "something went wrong!"}) 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /server/models/employer.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | const bcrypt = require("bcryptjs"); 4 | const {JWT_SECRET} = require('../keys'); 5 | const jwt = require("jsonwebtoken"); 6 | const employerSchema = new Schema({ 7 | companyName:{ 8 | type: String, 9 | required:true, 10 | // maxlength:40 11 | }, 12 | personName:{ 13 | type:String, 14 | required: true, 15 | // unique:true 16 | }, 17 | email:{ 18 | type:String, 19 | required:true, 20 | // minlength:10, 21 | // maxlength:10 22 | }, 23 | contact:{ 24 | type:String, 25 | required: true 26 | }, 27 | password:{ 28 | type:String, 29 | required: true 30 | }, 31 | tokens:[{ 32 | token:{ 33 | type:String, 34 | required:true 35 | } 36 | }], 37 | status: { 38 | type: String, 39 | enum: ['Pending', 'Active'], 40 | default: 'Pending', 41 | }, 42 | confirmationCode: { 43 | type: String, 44 | unique: true 45 | } 46 | }); 47 | 48 | 49 | employerSchema.methods.generateAuthToken = async function(){ 50 | const employer = this 51 | const token = jwt.sign({_id: employer._id}, JWT_SECRET) 52 | employer.tokens = employer.tokens.concat({token:token}) 53 | await employer.save() 54 | return token 55 | } 56 | 57 | employerSchema.statics.findByCredentials = async(email, password) =>{ 58 | const employer = await Employer.findOne({email: email}) 59 | if(!employer){ 60 | throw new Error('Invalid email or password') 61 | } 62 | const isMatch = await bcrypt.compare(password, employer.password) 63 | 64 | if(!isMatch){ 65 | throw new Error('Invalid email or password') 66 | } 67 | 68 | return employer 69 | } 70 | 71 | employerSchema.pre('save',async function (next){ 72 | const employer = this 73 | if(employer.isModified('password')){ 74 | employer.password = await bcrypt.hash(employer.password, 10) 75 | } 76 | next() 77 | 78 | }) 79 | 80 | const Employer = mongoose.model('Employer',employerSchema); 81 | 82 | module.exports = Employer; -------------------------------------------------------------------------------- /server/routes/general.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const router = express.Router(); 3 | const { 4 | getAllInternships, 5 | getInternshipsByLocation, 6 | getInternshipsByIndustry, 7 | getInternshipsByStream, 8 | getInternhsipsByLocations, 9 | getInternhsipsByStreams, 10 | getInternhsipsByIndustries, 11 | getInternshipsByCompanyName, 12 | getInternshipCompanyNames, 13 | } = require("../controller/internships"); 14 | const { getAllJobs, getJobsByLocations, getJobsByStreams, getJobsByIndustries, getJobsByCompanyName, getJobsCompanyNames } = require("../controller/jobs"); 15 | const { getAllFreshersJobs, getFreshersJobsByLocations, getFreshersJobsByStreams, getFreshersJobsByIndustries, getFreshersJobsByCompanyName, getFreshersJobsCompanyNames } = require("../controller/freshersjob"); 16 | 17 | const auth_employer = require("../middleware/auth_employer"); 18 | 19 | router.get("/all-internships", getAllInternships); 20 | router.get("/all-jobs", getAllJobs); 21 | router.get("/all-freshersjobs", getAllFreshersJobs); 22 | 23 | router.get("/location-internship/:location", getInternshipsByLocation); 24 | router.get("/industry-internship/:industry", getInternshipsByIndustry); 25 | router.get("/stream-internship/:stream", getInternshipsByStream); 26 | router.get("/companyName-internship/:companyName", getInternshipsByCompanyName); 27 | router.get("/companyName-internship/", getInternshipCompanyNames); 28 | 29 | router.get("/internship/location", getInternhsipsByLocations); 30 | router.get("/internship/stream", getInternhsipsByStreams); 31 | router.get("/internship/industry", getInternhsipsByIndustries); 32 | 33 | router.get("/job/location", getJobsByLocations); 34 | router.get("/job/stream", getJobsByStreams); 35 | router.get("/job/industry", getJobsByIndustries); 36 | router.get("/job/companyName/:companyName", getJobsByCompanyName); 37 | router.get("/companyName-Job/", getJobsCompanyNames); 38 | 39 | router.get("/freshersjob/location", getFreshersJobsByLocations); 40 | router.get("/freshersjob/stream", getFreshersJobsByStreams); 41 | router.get("/freshersjob/industry", getFreshersJobsByIndustries); 42 | router.get("/freshersjob/companyName/:companyName", getFreshersJobsByCompanyName); 43 | router.get("/companyName-freshersjob/", getFreshersJobsCompanyNames); 44 | 45 | 46 | module.exports = router; 47 | -------------------------------------------------------------------------------- /src/components/student-profile/Skills.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from "react"; 2 | import "./profile.css"; 3 | import { useState } from "react"; 4 | import Button from "@material-ui/core/Button"; 5 | import Icon from "@material-ui/core/Icon"; 6 | import IconButton from "@material-ui/core/IconButton"; 7 | import RemoveIcon from "@material-ui/icons/Remove"; 8 | import AddIcon from "@material-ui/icons/Add"; 9 | import Label from "./Label"; 10 | import Input from "./Input"; 11 | 12 | const Skills = ({ Skills, changeValue }) => { 13 | const [inputFields, setInputFields] = useState([{ Skill: "" }]); 14 | 15 | useEffect(() => { 16 | changeValue(inputFields, "Skills"); 17 | }, [inputFields]); 18 | 19 | const handleSubmit = (e) => { 20 | e.preventDefault(); 21 | console.log("InputFields", inputFields); 22 | }; 23 | 24 | const handleChangeInput = (id, event) => { 25 | const newInputFields = inputFields.map((i) => { 26 | if (id === i.id) { 27 | i[event.target.name] = event.target.value; 28 | } 29 | return i; 30 | }); 31 | 32 | setInputFields(newInputFields); 33 | }; 34 | 35 | const handleAddFields = () => { 36 | setInputFields([...inputFields, { Skill: "" }]); 37 | }; 38 | 39 | const handleRemoveFields = (id) => { 40 | const values = [...inputFields]; 41 | values.splice( 42 | values.findIndex((value) => value.id === id), 43 | 1 44 | ); 45 | setInputFields(values); 46 | }; 47 | 48 | return ( 49 |
50 |

Skills

51 |