0% found this document useful (0 votes)
2 views143 pages

Project Report PDF

Uploaded by

strikerblead
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views143 pages

Project Report PDF

Uploaded by

strikerblead
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

“FIND YOUR JOB”

Project Report

Submitted in partial fulfillment of the requirement for the

award of Degree of

Bachelor of Computer Applications

Submitted to

310 - Cimage Professional College

Submitted By Under Joint Guidance of


ASHISH RANJAN Prof. Ravi Kumar Soni
Registration No. : 22303310109 &
BCA-6th Semester Prof. Niraj Kumar Singh
Session-2022-2025 [Asst. Professor]
Computer Science &
Applications
Cimage Professional College
Department of Computer Science & Applications
Session 2022-2025

DATE:…………………

CERTIFICATE
This is to certify that the work embodies in this project entitled,
“Find Your Job”, being submitted by Ashish Ranjan
(22303310109) in partial fulfillment of the requirement for the
award of “Bachelor of Computer Applications” to
ARYABHATTA KNOWLEDGE UNIVERSITY, PATNA during the academic
year 2022-25 is a record of bonafide piece of work, carried out
by him/her under our/my supervision and guidance in the
“Department of Computer Science & Applications”,
Cimage Professional College.

Dr. Neeraj Agrawal Prof. Amit Kumar Dr. Pawan


Shukla Kumar Jha
Director Head of Department-IT Principal

Page1
|
Cimage Professional College

Department of Computer Science & Applications

Session 2022-2025

Date:

APPROVAL CERTIFICATE
The project report entitled “Find Your Job”, being submitted by
Ashish Ranjan(22303310109) has been examined by us and
is hereby approved for the award of degree “Bachelor of
Computer Applications”, for which it has been submitted. It
is understood that by this approval the undersigned do not
necessarily endorse or approve any statement made, the
opinion expressed or conclusion drawn therein, but approve the
project only for the purpose for which it has been submitted.

(Internal Examiner) (External Examiner)

Date: Date:

Page2
|
Cimage Professional College

Department of Computer Science & Applications

Session 2022-2025

Date:

DECLARATION

I, Ashish Ranjan hereby declare that the work, which is being

presented in the project report entitled “”, partial fulfillment of

the requirements for the award of degree of “Bachelor of

Computer Applications” submitted in the department of

Computer Science & Applications (Cimage Professional

College) is an authentic record of my own work carried under

the joint guidance of Prof. Ravi Kumar Soni Sir and Prof.

Niraj Kumar Singh Sir. I have not submitted the matter

embodied in this report for the award of any other degree.

Ashish Ranjan

Registration No :

22303310109

BCA 6th Semester

Session-2022-2025

Page3
|
ACKNOWLEDGEMENT

“A journey is easier when you travel together. Interdependence is certainly more valuable
than
independence.”

I would like to thanks, Prof. Ravi Kumar Soni Sir and Prof. Niraj Kumar
Singh Sir, for providing regular guidance and insight into my project work. I also thank
them for all advice he has given me in the past year, and for always having time for me,
whenever I needed.

I give special thanks to Prof. Amit Kumar Shukla Sir, Prof. Raju Upadhyay
Sir, and Prof. Anjesh Sir for always being willing to help find solutions to any problems
I had with my work.

“The completion of any project depends upon the cooperation,


coordination, and combined efforts of several resources of knowledge,
inspiration, and energy”.

I also extend my deepest gratitude to Director, CIMAGE GROUP OF


INSTITUITIONS, PATNA, Dr. Neeraj Agrawal Sir, Dean CIMAGE GROUP OF
INSTITUITIONS, PATNA, Dr. Neeraj Kumar Sir and Centre Head Mrs. Megha
Agrawal Ma’am for providing all the necessary facilities and true encouraging
environment to bring out the best in my endeavors.

I express my gratitude and thanks to all the staff members of Computer Science
departments for their sincere cooperation in furnishing relevant information to complete
this Project well in time successfully.

I extend a special word to my friends, who have been a constant source of


inspiration throughout my project work.

Lastly but not least I must express my cordial thank to my parent and family
members who gave me the moral support without that it is impossible to complete my
project work. With this note, I thank everyone for the support.

(Ashish Ranjan)

Registration No : 22303310109

BCA 6th

Semester

Session-2022-

2025

Page4
|
CONTENTS
REPORT.............................................................................……………………………………………...

INTRODUCTION......................................................................................................... 8

OBJECTIVE............................................................................................................... 9

PROJECT CATEGORY JAVA....................................................................................10

ADVANTAGES OF JAVA.........................................................................................11

TOOLS/PLATFORM required....................................................................................13

HARDWARE & SOFTWARE REQUIREMENTS......................................................13

PROBLEM DEFINITION............................................................................................14

REQUIREMENT SPECIFICATIONS.......................................................................14

PROJECT PLANNING & SCHEDULING....................................................................14

GANTT CHART....................................................................................................... 16

PERT CHART.......................................................................................................... 18

SYSTEM ANALYSIS...................................................................................................... 1

IDENTIFICATION OF NEED.....................................................................................1

FEASIBILITY STUDY................................................................................................ 6

TECHNICAL FEASIBILITY:...................................................................................7

ECONOMICAL FEASIBILITY:...............................................................................7

OPERATIONAL FEASIBILITY:..............................................................................8

ANALYSIS................................................................................................................. 10

DFD........................................................................................................................ 10

MODULE DESCRIPTION...........................................................................................16

DATA STRUCTURE Snap shot...................................................................................17

LIST OF REPORTS.................................................................................................... 22

SCOPE AND FUTURE ENHANCEMENT...................................................................23

IMPLEMENTATION METHODOLOGY...................................................................23
TESTING................................................................................................................... 25

Page5
|
LIMITATIONSANDFURTHER ENHANCEMENTS.....................................................28

SECURITY MECHANISM..........................................................................................29

SNAPSHOTS.............................................................................................................. 30

Page6
|
SAMPLE PROJECT

Page7
|
INTRODUCTION
“Find Your Job” is a full-stack web application developed with the goal of bridging
the gap between job-seeking students and recruiters looking for qualified
candidates. In today’s rapidly evolving job market, students often face challenges in
finding job opportunities that match their skills, while recruiters struggle to find the
right talent efficiently. This platform provides a dedicated digital space for both
parties to interact, post opportunities, and apply for jobs—all in a streamlined and
user-friendly environment.

This project was conceived as a career-enabling platform tailored specifically to


help college students, fresh graduates, and early-career professionals discover
suitable job opportunities based on their interests, academic background, and skill set.
Simultaneously, it empowers recruiters to post job listings, filter candidates, and
manage applications effortlessly.

Key Features:

1. Student Panel:
o Profile creation with skills, resume upload, education, and experience details.
o Browse jobs by category, company, domain, or search keywords.
o Apply to jobs directly via the portal.
o View applied jobs and application status.
2. Recruiter Panel:
o Post jobs with detailed requirements (title, location, salary, skills, etc.).
o View applications for each job post.
o Access candidate profiles and resumes.
o Manage and update job postings.
3. Authentication & Authorization:
o Secure login/register system using role-based access.
o Only recruiters can post jobs.
o Only students can apply to jobs.

Page8
|
OBJECTIVE

The main objective of “Find Your Job” is to create a user-friendly

and efficient platform where students can easily find and apply for

jobs or internships, and recruiters can post job openings and manage

applications. The platform aims to simplify the job search and

recruitment process by providing a centralized portal that

connects fresh talent with potential employers in a structured and

streamlined manner..

The objectives of this system:

 To provide students a centralized portal to search, filter, and


apply for jobs and internships relevant to their domain.
 To allow recruiters to post job openings, manage postings, and
browse candidate profiles.
 To facilitate a secure and role-based login system for both
students and recruiters.
 To simplify the job discovery and application tracking process.
 To foster career awareness and motivate students to explore
opportunities aligned with their goals.

Page9
|
PROJECT CATEGORY MERN STACK

The MERN stack is a popular open-source JavaScript-based technology


stack used for building dynamic, full-stack web applications. It is
composed of four powerful technologies: MongoDB (a NoSQL database),
[Link] (a backend web application framework for [Link]), [Link]
(a frontend JavaScript library developed by Facebook), and [Link] (a
runtime environment for executing JavaScript on the server).

The MERN stack allows developers to build complete web applications


using a single programming language — JavaScript — across the entire
development process. This makes development faster and more
cohesive, as both frontend and backend logic can be seamlessly
integrated.

MERN stack projects support RESTful API development, real-time


features using tools like [Link], and responsive, component-based UI
using React. With MongoDB handling data storage, [Link] and Express
powering the server-side logic, and React rendering the client interface,
MERN provides a robust foundation for building scalable and performant
web applications.

MERN applications are highly customizable and can be deployed to


platforms like Render, Vercel, Heroku, AWS, or DigitalOcean. The stack
is widely used for projects ranging from portfolio sites and admin
dashboards to real-time chat apps and enterprise-level systems.

Thanks to its flexibility, scalability, and full-stack JavaScript architecture,


the MERN stack remains one of the most in-demand tools for modern
web development.

Page
10 |
ADVANTAGES OF M E R N

MERN stack allows you to use JavaScript for both frontend and
backend development. From UI ([Link]) to server logic ([Link] +
[Link]) to database operations (MongoDB), everything runs on a
single language, reducing context-switching and boosting developer
productivity.

 MERN is Full-Stack Ready With MongoDB as the


database, Express and Node for backend, and React on the
frontend, MERN gives developers a complete fullstack
environment out of the box. This makes it perfect for building
dynamic, data-driven web applications with real-time
capabilities.

 MERN is Scalable and Modular. Each part of the


MERN stack is independently scalable. You can separate
your frontend, backend, and database services, making it
easy to deploy, maintain, and grow your application over
time.
|

 MERN is Highly Performant React ensures fast rendering with its


virtual DOM, while [Link] offers a non-blocking, event-driven
architecture for handling concurrent connections efficiently. This
combination results in fast, responsive, and modern web
[Link] is secure:
[Link] promotes secure development practices by offering automatic
protection against common vulnerabilities like XSS and CSRF when
using built-in API routes. It also encourages server-side logic
separation and environment variable usage for sensitive data.

Page
11 |
• MERN is Developer-Friendly
With a huge community, abundant tutorials, libraries, and tools, the
MERN stack offers a great developer experience. Hot reloading, real-
time debugging tools, and open-source packages speed up
development and reduce boilerplate.
• MERN is Component-Based
Using React’s component-driven approach, you can build reusable UI
components, making your frontend more maintainable, scalable, and
[Link] is hybrid and scalable:
[Link] allows hybrid rendering — combining static generation (SSG)
and server-side rendering (SSR) in the same application. This
flexibility makes it suitable for both small and large-scale
applications, ensuring efficient performance and scalability.

• MERN is Developer-Friendly
With a huge community, abundant tutorials, libraries, and tools, the MERN
stack offers a great developer experience. Hot reloading, real-time
debugging tools, and open-source packages speed up development and
reduce boilerplate.
• MERN is Component-Based
Using React’s component-driven approach, you can build reusable UI
components, making your frontend more maintainable, scalable, and

Page
12 |
[Link] is hybrid and scalable:
[Link] allows hybrid rendering — combining static generation (SSG) and
server-side rendering (SSR) in the same application. This flexibility makes it
suitable for both small and large-scale applications, ensuring efficient
performance and scalability.

Page
13 |
TOOLS/PLATFORM REQUIRED

Operating System
• WINDOW | LINUX | MAC

HARDWARE & SOFTWARE REQUIREMENTS

Hardware Requirements:

• Intel i3
• 512 MB RAM • 10 GB Hard Disk

Software Requirements:

• NODEJS
• MONGODB
• TEXT EDITOR
• BROWSER

Page
14 |
PROBLEM DEFINITION
In today’s competitive job market, students and fresh graduates often
struggle to find suitable job or internship opportunities due to a lack of
centralized, student-focused job platforms. Most existing platforms are
either too broad, complex, or dominated by experienced professionals,
making it difficult for entry-level job seekers to get noticed. At the same time,
recruiters face challenges in filtering relevant applications and reaching
out to fresh talent from academic backgrounds.
There is a clear need for a dedicated system that:
 Caters specifically to students and early-career professionals.
 Allows recruiters to post job openings and manage applications
efficiently.
 Offers a simple and clean user experience tailored to campus-level or
early-stage hiring.
“Find Your Job” is designed to solve these issues by providing a custom
platform that streamlines job searching, applying, and recruiting processes
for both students and recruiters.

REQUIREMENT SPECIFICATIONS

The requirement specification outlines the functional and non-functional requirements of the
project to ensure the system is well-defined and meets user expectations.

1. Functional Requirements

These are the core features the system must support:


🔹 User Roles:
 Student (Job Seeker)
o Register/Login
o Create and manage profile
o Browse/search for jobs
o Apply to jobs
o View application status
 Recruiter
o Register/Login
o Create and manage company profile
o Post job openings
o View applications and applicant details
o Manage job posts
Page
15 |
🔹 Core Features:
 Secure authentication (role-based login)
 Job posting and application module
 Resume upload (PDF format)
 Search and filter jobs by keyword, location, domain
 Application tracking (for students and recruiters)
 Notifications for actions like successful application (optional)

⚙️2. Non-Functional Requirements

These define the quality attributes of the system:


 Scalability: Should handle multiple users simultaneously.
 Performance: Quick response for searches, login, and dashboard operations.
 Security: Use of JWT for secure authentication and authorization.
 Usability: Clean, intuitive UI/UX for both students and recruiters.
 Reliability: Ensure data integrity for job postings and user accounts.
 Compatibility: Should work smoothly across all modern browsers and devices.
 Maintainability: Well-structured codebase for future enhancements.

🧑‍💻 3. Technical Requirements

 Frontend: [Link] / [Link]


 Backend: [Link] with [Link]
 Database: MongoDB
 Authentication: JSON Web Tokens (JWT)
 Cloud Storage (for resume upload): Cloudinary or Multer
Hosting/Deployment: Vercel (Frontend), Render/Heroku (Backend)

PROJECT PLANNING & SCHEDULING

Page
16 |
Project planning is part of project management, which relates
to the use of schedules such as Gantt charts to plan and
subsequently report progress within the project environment.

Initially, the project scope is defined and the appropriate


methods for completing the project are determined. Following
this step, the durations for the various tasks necessary to
complete the work are listed and grouped into a work
breakdown structure. The logical dependencies between tasks
are defined using an activity network diagram that enables
identification of the critical path. Float or slack time in the
schedule can be calculated using software. Then the necessary
resources can be estimated and costs for each activity can be
allocated to each resource, giving the total project cost. At this
stage, the project plan may be optimized to achieve the
appropriate balance between resource usage and project
duration to comply with the project objectives. Once established
and agreed, the plan becomes what is known as the baseline.
Progress will be measured against the baseline throughout the
life of the project. Analyzing progress compared to the baseline
is known as earned value management.

The PROJECT SCHEDULE is a calendar that links


the tasks to be done with the resources that will do them.
Before a project schedule can be created, the project manager
must have a work breakdown structure (WBS), an effort
estimate for each task, and a resource list with availability for
each resource. If these are not yet available, it may be possible
to create something that looks like a schedule, but it will
essentially be a work of fiction. A project manager’s time is
better spent on working with the team to create a WBS and
estimates (using a consensus-driven estimation method like
Wideband Delphi than on trying to build a project schedule
without them. The reason for this is that a schedule itself is an
estimate: each date in the schedule is estimated, and if those
dates do not have the buy-in of the people who are going to do
Page
17 |
the work, the schedule will almost certainly be inaccurate.

Page
18 |
GANTT CHART

Gantt charts (developed by Henry L. Gantt) are a project


control technique that can be used for several purposes
including scheduling, budgeting and resource planning. A Gantt
chart is a bar chart with each bar representing an activity.

The bars are drawn against a time line. The length of each bar
is proportional to the length of time planned for the activity.
Gantt chart can take different phase depending on their
intended use. The Gantt chart of Find Your Job is drawn for
the time management. The Gantt chart is drawn below:

Page
19 |
YEAR 2025

Page
20 |
PERT CHART

PERT (Project Evaluation and Review Technique) charts


consist of a network of boxes and arrows. The boxes represent
activities and the arrows represent task dependencies.

PERT is organized by events and activities or tasks. PERT


have more advantages and they are likely to be used for more
complex projects. Through PERT chart the various task paths
are defined. PERT enables the calculation of critical path. Each
path consists of combination of tasks, which must be completed.
The time and the cost associated with each task along a path
are calculated, and the path that requires the greatest amount
of elapsed time is the critical path. Calculation of the critical
path enables project manager to monitor this series of task
more closely than others to shift resources to it, if it begins to
fall behind schedule.

PERT controls time and cost during the project and also
facilitate finding the right balance between completing a
project on time and completing it within the budget. There are
thus not one but many critical paths, depending on the
permutations of the estimates for each task. This makes
analysis of critical path in PERT charts very complex. The PERT
chart representation of the School Management System is
shown below.

4th April 30th 10 May 10 June


April

Analysis Design Code P a e 18 |


Integrate
SYSTEM ANALYSIS

IDENTIFICATION OF NEED

To Important Indication for software we use the


Principles of Requirement Engineering. Requirement
engineering provides the appropriate mechanism for
understanding what the customer wants, analyzing need,
assessing feasibility, negotiating a reasonable solution,
specifying the solution unambiguously, validating the
specification and managing the requirement as they are
transformed into an operational system. The requirement
engineering process can be described in five distinct steps:

Requirement elicitation.

Requirement analysis &

negotiation. Requirement

specification.

System Modeling.

Requirement

validation.

Requirement

Management.

Page1|
In other words we can say that requirement analysis is
a software task that bridges the gap between system level
requirement engineering and software design.

Requirement analysis allows the software engineering


to refine the software allocation and build models of the
data, functional and behavioral domains that will be treated
by software. Requirement analysis provides the software
designer with a representation of information, function and
behavior that can be translated into data, architectural,
interface and component level design; finally the
requirement specification provides the developer and the
customer with the means to assess quality once software is
built.

The most commonly used requirement elicitation


technique is to conduct a meeting or interview. The first
meeting between a software engineer and customer can be
likened to the awareness of a first date between to
adolescents. Neither person knows what to

say or ask; Both are worried that what they do say will be
misinterpreted; both are thinking about where it might lead
(Both likely have radically different expectation here); Both
want to get the think over with, but at the same time, both
want it to be a success.

Page2|
Here according to this principle the analyst starts by
asking context-free-questions. That is a set of question that
will lead to a basic understanding of the problem, the
people who want a solution, the nature of solution that is
desired, and the effectiveness of the first

Page3|
encounter itself. The first set of Context-free question
focuses on the customer, the overall goals, and the benefits.
For example, the analyst might ask: -

Who is behind the request for this

Work? Who will use the solution?

What will be economic benefit of a successful

solution? Is there another source for the

solution that you need?

The next set of questions enables the software


engineer to gain a better Understanding of the problem and
the customer to voice his or her perceptions about a
solution: -

How would you characterize “good” output that would be generated by


a successful solution?

What problem(s) will this solution address?

Can you show me (or describe) the environment in which


the solution will be used?

Will special performance issues or constraints affect the


way the solution is approached?

The final set of question focuses on the effectiveness of the meeting:

Page4|
Are you the right person to answer these questions? Are your answers?
Official”?

Are my questions relevant to the problem that

you have? Am I asking too many questions?

Can anyone else provide additional

information? Should I be asking you

anything else?

According to the above concepts I went to institution


and met its staffs, management, and some persons related
with the organizational work, which advised me related with
my project such as details of agent, policy related
information will be cater this system.

Preliminary Investigation: -

The first step in the system development life cycle is


the preliminary investigation to determine the feasibility of
the System. The purpose of the preliminary investigation is
to evaluate project requests. It is not a design study nor
does it includes the collection of details top describe the
business system in all respect. Rather, it is collecting of
information that helps committee members to evaluate the
merits of the project request and make an informed
judgment about the feasibility of the proposed project.
Page5|
Here for the Project, I have worked on the preliminary
investigation that accomplished the following objectives: -

Clarify and understand the project

request. Determine the size of the

project.

Assess costs and benefits of alternative approaches.

Determine the technical and operational; feasibility of


alternative approaches.

Report the findings to management, with recommendation


outlining the acceptances or rejection of the proposal.

Considering above criteria I also keep in mind that the


requirements are clearly understandable when the
clarification of project request is enquired. The data of the
System, which are collected by me during preliminary
investigation, are through Reviewing organization
Documents Onsite observation and Conducting interviews.

Page6|
FEASIBILITY STUDY

Not everything imaginable is feasible, not even in


software, even as it may appear to outsiders. Feasibility is
the determination of whether or not a project is wrong
doing. On the contrary, software feasibility has seven solid
dimensions as below: -

 Technical feasibility.
 Operational feasibility.
 Economic feasibility.
 Social feasibility.
 Management feasibility.
 Legal feasibility.
 Time feasibility.

The process followed in making this determination is


called a feasibility study. The type of study determines if a
project can and should be taken. Once it has been
determined that a project is feasible, that analyst can go
ahead and prepare the project specification which finalizes
project requirements. Generally, feasibility studies are
undertaken within tight time constraints and normally
culminate in a written and oral feasibility report. The
contents and recommendation of such a study will be used
as a sound basis for deciding whether to proceed, postpone
or cancel the project. Thus, since the feasibility study may
Page7|
lead to the commitment of large resources, it becomes

Page8|
necessary that it should be conducted competently and that
no fundamental errors of judgment are made.

In other words we can say that a feasibility study is


conducted to select the best system that meets performance
requirement. This contains and identification description, an
evaluation of candidate system and the selection of best
system for the job. The system required a statement of
constraints; the identification of specific system objective
and a description of outputs define performance.

TECHNICAL FEASIBILITY: -

Technical feasibility is concerned with specifying


equipment and software that will successfully satisfy the
user requirements. My project is fit in technical feasibility
because it requires neither too much heavy configuration
system for its run nor in its development.

Following hardware and software components are used in


the development of proposed system.

The same configuration system is also meets all the


requirements to run or for implements to run or for
implementation of the system. Though I have also tested
this software for that systems whose configuration is lower
than the above specified

ECONOMICAL FEASIBILITY: -

Page9|
Economic analysis is the most frequently used
technique for evaluation of the effectiveness of a proposed
system. More commonly

P a g e 10
|
known as Cost/Benefit analysis, the procedure is to
determine the benefits and saving that are expected from a
proposed system and compare them with costs. If benefits
outweigh costs, a decision is taken to design and implement
the system. Other weight costs, a decision is taken to design
and implement the system. Otherwise, further justification
or alternative in the proposed system will have to be made if
is to have a chance of being approved. This is an ongoing
effort that improves in accuracy at each phase of the system
life cycle.

Before establishing Economical Feasibility so as to


justify the expenses that different organization working
under this category has to bear for this Software. It is
crystal clear that the user or Customer of this Software has
no need to invest heavy amount for this software. As my
project has been written in such a language, which is a
platform Independent. It has also the feature of WORM. It
means it possess the technology of Write Once & Read
Many.

There is no any heavy expense on the maintenance of


this Software. Also there is no need to expense a heavy
amount on the set of “Very Expert Personals” because it is
very easy and user-friendly software. It is fully tighten
protection of Secret Password and User Name for
unauthorized access of this Software.

P a g e 11
|
For different types of Process or Operation, Reports
or Query and Output also, there is no need of heavy
expenditure.

OPERATIONAL FEASIBILITY: -

P a g e 12
|
My project is also fit in Operational Feasibility Study.
As I have explained before this about Technical Feasibility
and Economical Feasibility, this Software is very easy and
user-friendly.

I have used a very easy menu system and also used some
control buttons in the easy way by which one can choose the
options on his desire.

Though this is fully protected with the security by word


(Password and user name), if both are matched only then
one can get access of this software.

Various Reports, Forms and Queries can be generated


on the fingertips for the user.

In nutshell we can say that it has following operational features:

1. It is User-Friendly.
2. It is having less paperwork.
3. Efficient tractability.
4. Query can be generated.
5. Various Reports and Forms can be generated.
6. Fully protected by Password and User name for
unauthorized access.

P a g e 13
|
ANALYSIS

System Analysis refers into the process of examining a


situation with the intent of improving it through better
procedures and methods. System Analysis is the process of
planning a new System to either replace or complement an
existing system.
DFD
The DFD is an excellent communication tool for analysts to model processes and
functional requirements. Used effectively, it is a useful and easy to understand modeling tool.
It has broad application

Level O DFD(Basic overview (Student, Recruiter, System))

P a g e 14
|
Level DFD 2: B r e a k d o w n i n t o p r o c e s s e s
(Register/Login, Post Jobs, Apply)

P a g e 15
|
DFD 3: MAINTAIN FEE RECORD

P a g e 16
|
MODULE DESCRIPTION

These are the following Modules in the project:-

1. Authentication Module

Purpose:
To handle secure login and registration for both students and recruiters.
Key Features:
 Role-based authentication using JWT
 Password hashing using bcrypt
 Middleware for route protection (isAuthenticated)
Files Involved:
 [Link] / [Link]
 [Link] middleware

2. User Management Module

Purpose:
Manage student profiles, resumes, and accounts.
Key Features:
 Create and update profiles
 Upload resumes using Cloudinary or Multer
 View applied jobs
Files Involved:
 [Link]
 [Link]
 Resume handling logic

3. Company Module (Recruiter Management)

Purpose:
Enable recruiters to register their company and manage job postings.
P a g e 17
|
Key Features:
 Create/edit company profiles
 Post job listings
 View candidate applications
Files Involved:
 [Link]
 [Link]

4. Job Management Module

Purpose:
Manages all job listings posted by recruiters and visible to students.
Key Features:
 Create/edit/delete job listings
 Job listing filtering
 Associate jobs with companies and recruiters
Files Involved:
 [Link]
 [Link]

5. Application Module

Purpose:
Enables students to apply for jobs and recruiters to view applications.
Key Features:
 Apply to a job (with resume/profile)
 Check application status
 Recruiters can view applicants per job
Files Involved:
 [Link]
 [Link]

6. File Upload Module


Purpose:
Handles file uploads such as resumes or profile images.
Key Features:
 Uses Cloudinary or Multer to upload and store files
 Resume link saved in the database
Files Involved:
 [Link] or [Link]
P a g e 18
|
 Used in user and application controllers

7. API & Routing Module


Purpose:
Defines and manages all RESTful routes for the frontend to communicate
with the
backend.
Key Features:
 RESTful APIs using Express
 CRUD operations for users, jobs, applications
Files Involved:
 routes/ folder
 [Link] (entry point for Express server)

P a g e 19
|
DATA STRUCTURE SNAP SHOT

DATA DICTIONERY:- The data dictionary stores


description of data items and structures, as well as systems
processes. Data dictionary used for database design in this
project is mentioned. Care was taken during the database
design for future expansion of school’s need.

User_ Details (Login)

P a g e 20
|
Post Jobs:-

P a g e 21
|
Company Details (Company add):-

Applications:-

P a g e 22
|
P a g e 23
|
LIST OF REPORTS

The following reports will be generated:-


1. User Reports
 Registered Users Report
Shows all users (Job Seekers and Recruiters), their roles, and registration dates.
 User Activity Report
Tracks login activity, number of jobs applied (students), or jobs posted (recruiters).

2. Job Reports
 All Posted Jobs Report
Displays jobs with title, type, company, post date, and location.
 Job by Company Report
Shows all jobs posted by each recruiter or company.
 Expired/Closed Job Report (if implemented)
List of jobs that are no longer active.

3. Application Reports
 Application Summary Report
Lists all job applications: applicant name, job title, company, and date applied.
 Application per Job Report
Shows how many candidates applied for each job posting.
 Student Application History Report
For each student: job titles, companies applied to, and status.

4. Recruiter Reports
 Recruiter Job Activity Report
Details how many jobs each recruiter has posted and how many applications received.
 Top Recruiters Report
Based on number of jobs posted or total applicants.

SCOPE AND FUTURE ENHANCEMENT

Scope

“Find Your Job” is a web platform that connects students


with recruiters, allowing:

 Students to register, upload resumes, search & apply for


jobs
P a g e 24
|
 Recruiters to post jobs and manage applications

 Role-based access and real-time job interaction

It serves as a digital job portal ideal for college


placements or entry-level hiring.

Future Enhancements

 Add Admin Panel for user control and content moderation

 Integrate chat system, notifications, and job


recommendations

 Enable Google/LinkedIn login, mobile app, and


analytics dashboard

 Add resume builder, saved jobs, and interview


scheduling

IMPLEMENTATION METHODOLOGY

Implementation of a tested system is done on the


actual location with the actual hardware, Software and
manpower platforms or

P a g e 25
|
limitation. To implement of this software, the followings are
the necessary:

This project run on internet or intranet , so I have to


selected internet supportive software. For implementing
this software a web- server is required . I have to install
IIS(internet information service). Know this project is web-
based so it will need a web-browser which will act as its
interface, so for this project install a web-browser capable
of providing proper interface to this project such as internet
Explorer/mozilla Firefox/opera e.t.c and many other
[Link] for back-end operation ,I have to install
ORACLE 9i which handle all the work related to database
query and updation as required by the sostware. In future
also use better [Link] know that this project will be
developed on heavy platform ASPJAVA with c# , so there is
requirement of advance processer and proper RAM and
other advance Hardware configuration.

 Create separate user for this application: A user


named as “admin” with the password “pass” is to be
created for storing the data in a separate place.
Storing data under separate user will protect the data.
Oracle Navigator can be used for creating the said
username and password.
 Create required tables: The structure of tables
required for this project (Detail given in the data base

P a g e 26
|
design section) is to be created in the said user. The
SQL statement CREATE can be used for creating such
tables.

P a g e 27
|
 Create Distributable set of files: An installation
package of the software is to be built for
implementation of the project at desired location.

TESTING

Software testing consists of the following stages.

a) TEST PLAN DEVELOPMENT:-

The importance of software testing and its implications


need not be emphasized. Software testing is a critical
element of software quality assurance and represents the
ultimate review of specifications, design and coding. The
main objective of testing is to uncover a host of errors,
systematically, with minimum effort and time. It improves
the reliability of the software.

b) TESTING STRATEGY:-

A testing strategy explains how to conduct a test to uncover


all the errors with minimum possible time and effort. It
should be flexible enough to promote customization that
may be necessary in due course of development process.

c) UNIT TESTING:-

Unit testing focuses verification effort on the smallest unit


of software module using the detailed design criteria.
Process specifications testing are done to uncover errors

P a g e 28
|
within the boundaries of the module. All

P a g e 29
|
modules must be successful in the unit test before start of
the integration testing. The software developed for e-
banking is tested module wise by giving normal values and
extreme values as input. All the bugs have been identified
and removed. The software designed is tested module wise.
Before using the software, an employee has to give
organization name and password.

In the next stage he has to provide division name, user ID


and password. If any of this information is wrong, the
system gives an error message- “invalid user and password”

INTEGRATION TESTING:-

It is a systematic technique for constructing different


program module in to an integrated software structure. This
test uncovers the errors during integration process. The
integration aspect is tested after integrating all the modules
and validated.

VALIDATION TESTING:-

After the culmination of integration testing the software


is ready as per the specification. But it has to be validated
as per the specification and to uncover the unexpected
future errors and to improve its reliability. The random
value and boundary values as input is fed to the software

P a g e 30
|
developed and studied the software performance and
validated

P a g e 31
|
TEST CASE DESIGN

The techniques that are used in deriving the test cases


are explained below.

CONDITION TESTING:-

Condition testing is a test case design method that


exercises the logical conditions contained in the program.
The possible components in a condition statement are a
Boolean operator, Boolean variable, relational operator,
arithmetic expression and parenthesis.

BOUNDARY VALUE ANALYSIS:-

Boundary value analysis leads to the selection of test


cases that exercise the boundary conditions or boundary
values. It is observed that a large number of errors tend to
appear at the boundaries of the input domain than in the
[Link] boundary condition is tested by inserting values
beyond specification/availability of project allocations.
[Link] software is tested by giving more amount of money
in the indent form than available in the budget. Under this
conciliation the software gives an error message stating
that insufficient fund.

EQUIVALENCE PARTITIONING:-

P a g e 32
|
Equivalence portioning is a black box testing method
that divides the input domain of a program into classes of
data from which

P a g e 33
|
test cases can be derived. A typical test uncovers a class
errors might otherwise require many more test cases before
the error is observed. Equivalence classes for input
determine the valid and invalid inputs for the program

LIMITATIONS AND FURTHER ENHANCEMENTS

LIMITATIONS:
1. No Admin Panel
There's no system for managing users, posts, or misuse detection.
2. No Notification System
Users are not notified about job application status or new jobs.
3. No Smart Recommendations
Jobs are not suggested based on user profile or interests.
4. No Mobile App
Platform is web-only, not optimized for mobile devices as a native app.
5. No Direct Messaging
Recruiters and students can't communicate in real-time.
.

Further Enhancements

1. Admin Dashboard to monitor users, jobs, and applications.


2. Notification System (email/SMS/in-app) for alerts and updates.
3. AI-based Job Suggestions using resume data and history.
4. Mobile App Version using React Native or Flutter.
5. Resume Builder Tool for students to create professional resumes.
6. Chat System for recruiter-applicant communication.
7. Analytics Dashboard for recruiters and admins to view usage stats.

P a g e 34
|
SECURITY MECHANISM
1.
JWT Authentication (JSON Web Token)
 On successful login, a JWT token is issued.
 This token is sent with every protected API request in the
Authorization header.
 Ensures stateless, secure, and role-based access control.
Implemented in: [Link] middleware

2. Password Hashing with bcrypt


 User passwords are never stored in plain text.
 On registration, passwords are hashed using bcrypt.
 During login, the entered password is compared with the hashed
version securely.
Handled in: [Link]

3. Role-Based Access Control


 Users are assigned roles: Job Seeker or Recruiter.
 Role checks are done in backend routes to allow or deny access.
o E.g., only recruiters can post jobs, only job seekers can
apply.

4. Input Validation & Sanitization


 All user inputs (forms, resumes, job posts) are validated to
prevent:
o SQL/NoSQL injection
o XSS (Cross-site scripting)
 Uses try-catch blocks to handle invalid inputs gracefully.

5. Cloudinary File Security (Resume Upload)


 Resumes are uploaded to Cloudinary with secure access URLs.
 Cloudinary API is used with API key/secret from .env, never
exposed in frontend.

SNAPSHOTS

P a g e 35
|
LOGIN FORM ([Link])

CODE FOR LOGIN PAGE:-

import React, { useEffect, useState } from 'react'


import Navbar from '../shared/Navbar'
import { Label } from '../ui/label'
import { Input } from '../ui/input'
import { RadioGroup } from '../ui/radio-group'
import { Button } from '../ui/button'
import { Link, useNavigate } from 'react-router-dom'
import axios from 'axios'
import { USER_API_END_POINT } from '@/utils/constant'
import { toast } from 'sonner'
import { useDispatch, useSelector } from 'react-redux'
import { setLoading, setUser } from '@/redux/authSlice'
import { Loader2 } from 'lucide-react'

const Login = () => {


const [input, setInput] = useState({
P a g e 36
|
email: "",
password: "",
role: "",
});
const { loading,user } = useSelector(store => [Link]);
const navigate = useNavigate();
const dispatch = useDispatch();

const changeEventHandler = (e) => {


setInput({ ...input, [[Link]]: [Link] });
}

const submitHandler = async (e) => {


[Link]();
try {
dispatch(setLoading(true));
const res = await [Link](`$
{USER_API_END_POINT}/login`, input, {
headers: {
"Content-Type": "application/json"
},
withCredentials: true,
});
if ([Link]) {
dispatch(setUser([Link]));
navigate("/");
[Link]([Link]);
}
} catch (error) {
[Link](error);
[Link]([Link]);
} finally {
dispatch(setLoading(false));
}
P a g e 37
|
}
useEffect(()=>{
if(user){
navigate("/");
}
},[])
return (
<div>
<Navbar />
<div className='flex items-center justify-center max-
w-7xl mx-auto'>
<form onSubmit={submitHandler} className='w-
1/2 border border-gray-200 rounded-md p-4 my-10'>
<h1 className='font-bold text-xl mb-
5'>Login</h1>
<div className='my-2'>
<Label>Email</Label>
<Input
type="email"
value={[Link]}
name="email"
onChange={changeEventHandler}
/>
</div>

<div className='my-2'>
<Label>Password</Label>
<Input
type="password"
value={[Link]}
name="password"
onChange={changeEventHandler}
/>
</div>
P a g e 38
|
<div className='flex items-center justify-
between'>
<RadioGroup className="flex items-center
gap-4 my-5">
<div className="flex items-center space-x-
2">
<Input
type="radio"
name="role"
value="student"
checked={[Link] === 'student'}
onChange={changeEventHandler}
className="cursor-pointer"
/>
<Label htmlFor="r1">Student</Label>
</div>
<div className="flex items-center space-x-
2">
<Input
type="radio"
name="role"
value="recruiter"
checked={[Link] === 'recruiter'}
onChange={changeEventHandler}
className="cursor-pointer"
/>
<Label htmlFor="r2">Recruiter</Label>
</div>
</RadioGroup>
</div>
{
loading ? <Button className="w-full my-4">
<Loader2 className='mr-2 h-4 w-4 animate-spin' /> Please
wait </Button> : <Button type="submit" className="w-full
P a g e 39
|
my-4">Login</Button>
}
<span className='text-sm'>Don't have an
account? <Link to="/signup" className='text-blue-
600'>Signup</Link></span>
</form>
</div>
</div>
)
}

export default Login

Signup Form([Link])

CODE FOR SIGNUP PAGE:-


P a g e 40
|
import React, { useEffect, useState } from "react";
import Navbar from "../shared/Navbar";
import { Label } from "../ui/label";
import { Input } from "../ui/input";
import { RadioGroup } from "../ui/radio-group";
import { Button } from "../ui/button";
import { Link, useNavigate } from "react-router-dom";
import axios from "axios";
import { USER_API_END_POINT } from "@/utils/constant";
import { toast } from "sonner";
import { useDispatch, useSelector } from "react-redux";
import { setLoading } from "@/redux/authSlice";
import { Loader2 } from "lucide-react";

const Signup = () => {


const [input, setInput] = useState({
fullname: "",
email: "",
phoneNumber: "",
password: "",
role: "",
file: "",
});
const { loading, user } = useSelector((store) =>
[Link]);
const dispatch = useDispatch();
const navigate = useNavigate();

const changeEventHandler = (e) => {


setInput({ ...input, [[Link]]: [Link] });
};
const changeFileHandler = (e) => {
setInput({ ...input, file: [Link]?.[0] });
P a g e 41
|
};
const submitHandler = async (e) => {
[Link]();

const phoneRegex = /^[0-9]{10}$/;


if (![Link]([Link])) {
[Link]("Please enter a valid 10-digit mobile
number.");
return;
}

const formData = new FormData(); //formdata object


[Link]("fullname", [Link]);
[Link]("email", [Link]);
[Link]("phoneNumber", [Link]);
[Link]("password", [Link]);
[Link]("role", [Link]);
if ([Link]) {
[Link]("file", [Link]);
}

try {
dispatch(setLoading(true));
const res = await
[Link](`${USER_API_END_POINT}/register`, formData, {
headers: { "Content-Type": "multipart/form-data" },
withCredentials: true,
});
if ([Link]) {
navigate("/login");
[Link]([Link]);
}
} catch (error) {
[Link](error);
P a g e 42
|
[Link]([Link]);
} finally {
dispatch(setLoading(false));
}
};

useEffect(() => {
if (user) {
navigate("/");
}
}, []);
return (
<div>
<Navbar />
<div className="flex items-center justify-center max-w-
7xl mx-auto">
<form
onSubmit={submitHandler}
className="w-1/2 border border-gray-200 rounded-md
p-4 my-10"
>
<h1 className="font-bold text-xl mb-5">Sign
Up</h1>
<div className="my-2">
<Label>Full Name</Label>
<Input
type="text"
value={[Link]}
name="fullname"
onChange={changeEventHandler}
/>
</div>
<div className="my-2">
<Label>Email</Label>
P a g e 43
|
<Input
type="email"
value={[Link]}
name="email"
onChange={changeEventHandler}
/>
</div>
<div className="my-2">
<Label>Phone Number</Label>
<Input
type="text"
value={[Link]}
name="phoneNumber"
onChange={changeEventHandler}
/>
</div>
<div className="my-2">
<Label>Password</Label>
<Input
type="password"
value={[Link]}
name="password"
onChange={changeEventHandler}
/>
</div>
<div className="flex items-center justify-between">
<RadioGroup className="flex items-center gap-4
my-5">
<div className="flex items-center space-x-2">
<Input
type="radio"
name="role"
value="student"
checked={[Link] === "student"}
P a g e 44
|
onChange={changeEventHandler}
className="cursor-pointer"
/>
<Label htmlFor="r1">Student</Label>
</div>
<div className="flex items-center space-x-2">
<Input
type="radio"
name="role"
value="recruiter"
checked={[Link] === "recruiter"}
onChange={changeEventHandler}
className="cursor-pointer"
/>
<Label htmlFor="r2">Recruiter</Label>
</div>
</RadioGroup>
<div className="flex items-center gap-2">
<Label>Profile</Label>
<Input
accept="image/*"
type="file"
onChange={changeFileHandler}
className="cursor-pointer"
/>
</div>
</div>
{loading ? (
<Button className="w-full my-4">
{" "}
<Loader2 className="mr-2 h-4 w-4 animate-
spin" /> Please wait{" "}
</Button>
):(
P a g e 45
|
<Button type="submit" className="w-full my-4">
Signup
</Button>
)}
<span className="text-sm">
Already have an account?{" "}
<Link to="/login" className="text-blue-600">
Login
</Link>
</span>
</form>
</div>
</div>
);
};

export default Signup;

Home Page([Link])

P a g e 46
|
Code For [Link]

import React, { useEffect } from 'react'


import Navbar from './shared/Navbar'
import HeroSection from './HeroSection'
import CategoryCarousel from './CategoryCarousel'
import LatestJobs from './LatestJobs'
import Footer from './shared/Footer'
import useGetAllJobs from '@/hooks/useGetAllJobs'
import { useSelector } from 'react-redux'
import { useNavigate } from 'react-router-dom'

const Home = () => {


useGetAllJobs();
const { user } = useSelector(store => [Link]);
const navigate = useNavigate();
useEffect(() => {
if (user?.role === 'recruiter') {
navigate("/admin/companies");
}
}, []);
return (
<div>
<Navbar />
<HeroSection />
<CategoryCarousel />
<LatestJobs />
<Footer />
</div>
)
P a g e 47
|
}

export default Home

NavBar Section:-

import React from 'react'


import { Popover, PopoverContent, PopoverTrigger } from
'../ui/popover'
import { Button } from '../ui/button'
import { Avatar, AvatarImage } from '../ui/avatar'
import { LogOut, User2 } from 'lucide-react'
import { Link, useNavigate } from 'react-router-dom'
import { useDispatch, useSelector } from 'react-redux'
import axios from 'axios'
import { USER_API_END_POINT } from '@/utils/constant'
import { setUser } from '@/redux/authSlice'
import { toast } from 'sonner'

const Navbar = () => {


const { user } = useSelector(store => [Link]);
const dispatch = useDispatch();
const navigate = useNavigate();

const logoutHandler = async () => {


try {
const res = await [Link](`$
{USER_API_END_POINT}/logout`, { withCredentials: true });
if ([Link]) {
dispatch(setUser(null));
navigate("/");
[Link]([Link]);
P a g e 48
|
}
} catch (error) {
[Link](error);
[Link]([Link]);
}
}
return (
<div className='bg-white'>
<div className='flex items-center justify-between
mx-auto max-w-7xl h-16'>
<div>
<h1 className='text-2xl font-
bold'>FindYour<span
className='text-[#F83002]'>Job</span></h1>
</div>
<div className='flex items-center gap-12'>
<ul className='flex font-medium items-center
gap-5'>
{
user && [Link] === 'recruiter' ? (
<>
<li><Link
to="/admin/companies">Companies</Link></li>
<li><Link
to="/admin/jobs">Jobs</Link></li>
</>
):(
<>
<li><Link to="/">Home</Link></li>
<li><Link
to="/jobs">Jobs</Link></li>
<li><Link
to="/browse">Browse</Link></li>
</>
P a g e 49
|
)
}

</ul>
{
!user ? (
<div className='flex items-center gap-2'>
<Link to="/login"><Button
variant="outline">Login</Button></Link>
<Link to="/signup"><Button
className="bg-[#6A38C2]
hover:bg-[#5b30a6]">Signup</Button></Link>
</div>
):(
<Popover>
<PopoverTrigger asChild>
<Avatar className="cursor-pointer">
<AvatarImage
src={user?.profile?.profilePhoto} alt="@shadcn" />
</Avatar>
</PopoverTrigger>
<PopoverContent className="w-80">
<div className=''>
<div className='flex gap-2 space-y-
2'>
<Avatar className="cursor-
pointer">
<AvatarImage
src={user?.profile?.profilePhoto} alt="@shadcn" />
</Avatar>
<div>
<h4 className='font-
medium'>{user?.fullname}</h4>
<p className='text-sm text-
P a g e 50
|
muted-foreground'>{user?.profile?.bio}</p>
</div>
</div>
<div className='flex flex-col my-2
text-gray-600'>
{
user && [Link] ===
'student' && (
<div className='flex w-fit
items-center gap-2 cursor-pointer'>
<User2 />
<Button variant="link">
<Link to="/profile">View Profile</Link></Button>
</div>
)
}

<div className='flex w-fit items-


center gap-2 cursor-pointer'>
<LogOut />
<Button
onClick={logoutHandler} variant="link">Logout</Button>
</div>
</div>
</div>
</PopoverContent>
</Popover>
)
}

</div>
</div>

</div>
P a g e 51
|
)
}

export default Navbar

Hero Section:-

import React, { useEffect } from 'react'


import Navbar from './shared/Navbar'
import HeroSection from './HeroSection'
import CategoryCarousel from './CategoryCarousel'
import LatestJobs from './LatestJobs'
import Footer from './shared/Footer'
import useGetAllJobs from '@/hooks/useGetAllJobs'
import { useSelector } from 'react-redux'
import { useNavigate } from 'react-router-dom'

const Home = () => {


useGetAllJobs();
const { user } = useSelector(store => [Link]);
const navigate = useNavigate();
useEffect(() => {
if (user?.role === 'recruiter') {
navigate("/admin/companies");
}
}, []);
return (
<div>
<Navbar />
<HeroSection />
<CategoryCarousel />
<LatestJobs />
P a g e 52
|
<Footer />
</div>
)
}

export default Home

[Link]:-

import React from 'react';


import { Carousel, CarouselContent, CarouselItem,
CarouselNext, CarouselPrevious } from './ui/carousel';
import { Button } from './ui/button';
import { useDispatch } from 'react-redux';
import { useNavigate } from 'react-router-dom';
import { setSearchedQuery } from '@/redux/jobSlice';

const category = [
"Frontend Developer",
"Backend Developer",
"Data Science",
"Graphic Designer",
"FullStack Developer"
]

const CategoryCarousel = () => {


const dispatch = useDispatch();
const navigate = useNavigate();
const searchJobHandler = (query) => {
dispatch(setSearchedQuery(query));
navigate("/browse");
}
P a g e 53
|
return (
<div>
<Carousel className="w-full max-w-xl mx-auto my-
20">
<CarouselContent>
{
[Link]((cat, index) => (
<CarouselItem key = {index}
className="md:basis-1/2 lg-basis-1/3">
<Button
onClick={()=>searchJobHandler(cat)} variant="outline"
className="rounded-full">{cat}</Button>
</CarouselItem>
))
}
</CarouselContent>
<CarouselPrevious />
<CarouselNext />
</Carousel>
</div>
)
}

export default CategoryCarousel

[Link]:-

import React from 'react'


import LatestJobCards from './LatestJobCards';
import { useSelector } from 'react-redux';

P a g e 54
|
// const randomJobs = [1, 2, 3, 4, 5, 6, 7, 8];

const LatestJobs = () => {


const {allJobs} = useSelector(store=>[Link]);

return (
<div className='max-w-7xl mx-auto my-20'>
<h1 className='text-4xl font-bold'><span
className='text-[#6A38C2]'>Latest & Top </span> Job
Openings</h1>
<div className='grid grid-cols-3 gap-4 my-5'>
{
[Link] <= 0 ? <span>No Job
Available</span> : allJobs?.slice(0,6).map((job) =>
<LatestJobCards key={job._id} job={job}/>)
}
</div>
</div>
)
}

export default LatestJobs

FooterSection([Link]):-

import React from 'react';

const Footer = () => {


return (
<footer className="border-t border-t-gray-200 py-8">
<div className="container mx-auto px-4">
<div className="flex flex-col md:flex-row justify-
P a g e 55
|
between items-center">
<div className="mb-4 md:mb-0">
<h2 className="text-xl font-bold">Job Hunt</h2>
<p className="text-sm">© 2025 Your Company. All
rights reserved.</p>
</div>

<div className="flex space-x-4 mt-4 md:mt-0">


<a href="[Link]
className="hover:text-gray-400" aria-label="Facebook">
<svg className="w-6 h-6" fill="currentColor"
viewBox="0 0 24 24"><path d="M22.676 0H1.324C.593 0
0 .592 0 1.324v21.352C0 23.408.593 24 1.324
24H12.82V14.706H9.692v-3.578h3.128V8.408c0-3.1 1.893-
4.787 4.657-4.787 1.325 0 2.463.1 2.794.144v3.238l-
1.918.001c-1.503 0-1.794.715-1.794 1.762v2.31h3.587l-.468
3.578h-3.119V24h6.116C23.407 24 24 23.408 24
22.676V1.324C24 .592 23.407 0 22.676 0z" /></svg>
</a>
<a href="[Link] className="hover:text-
gray-400" aria-label="Twitter">
<svg className="w-6 h-6" fill="currentColor"
viewBox="0 0 24 24"><path d="M24 4.557a9.835 9.835 0
01-2.828.775 4.934 4.934 0 002.165-2.724 9.867 9.867 0 01-
3.127 1.195 4.924 4.924 0 00-8.38 4.49A13.978 13.978 0
011.67 3.149 4.93 4.93 0 003.16 9.724a4.903 4.903 0 01-
2.229-.616v.062a4.93 4.93 0 003.946 4.827 4.902 4.902 0 01-
2.224.084 4.93 4.93 0 004.6 3.417A9.869 9.869 0 010
21.543a13.978 13.978 0 007.548 2.212c9.057 0 14.01-7.507
14.01-14.01 0-.213-.004-.425-.015-.636A10.012 10.012 0
0024 4.557z" /></svg>
</a>
<a href="[Link]
className="hover:text-gray-400" aria-label="LinkedIn">
P a g e 56
|
<svg className="w-6 h-6" fill="currentColor"
viewBox="0 0 24 24"><path d="M20.447 20.452H16.85v-
5.569c0-1.327-.027-3.037-1.852-3.037-1.854 0-2.137 1.446-
2.137 2.94v5.666H9.147V9.756h3.448v1.464h.05c.48-.91
1.653-1.871 3.401-1.871 3.634 0 4.307 2.39 4.307
5.498v5.605zM5.337 8.29c-1.105 0-2-.896-2-2 0-1.106.895-2
2-2 1.104 0 2 .895 2 2 0 1.104-.896 2-2 2zM7.119
20.452H3.553V9.756h3.566v10.696zM22.225 0H1.771C.791
0 0 .774 0 1.729v20.542C0 23.226.792 24 1.771
24h20.451c.979 0 1.771-.774 1.771-1.729V1.729C24 .774
23.205 0 22.225 0z" /></svg>
</a>
</div>
</div>
</div>
</footer>
);
}

JobPage:-

P a g e 57
|
Code for jobPage:-

import React from 'react'


import { Button } from './ui/button'
import { Bookmark } from 'lucide-react'
import { Avatar, AvatarImage } from './ui/avatar'
import { Badge } from './ui/badge'
import { useNavigate } from 'react-router-dom'

const Job = ({job}) => {


const navigate = useNavigate();
// const jobId = "lsekdhjgdsnfvsdkjf";

const daysAgoFunction = (mongodbTime) => {


const createdAt = new Date(mongodbTime);
const currentTime = new Date();
const timeDifference = currentTime - createdAt;
return [Link](timeDifference/(1000*24*60*60));
}

return (
<div className='p-5 rounded-md shadow-xl bg-white
border border-gray-100'>
<div className='flex items-center justify-between'>
<p className='text-sm text-gray-
500'>{daysAgoFunction(job?.createdAt) === 0 ? "Today" : `$
{daysAgoFunction(job?.createdAt)} days ago`}</p>
P a g e 58
|
<Button variant="outline" className="rounded-
full" size="icon"><Bookmark /></Button>
</div>

<div className='flex items-center gap-2 my-2'>


<Button className="p-6" variant="outline"
size="icon">
<Avatar>
<AvatarImage src={job?.company?.logo} />
</Avatar>
</Button>
<div>
<h1 className='font-medium text-
lg'>{job?.company?.name}</h1>
<p className='text-sm
text-gray-500'>India</p>
</div>
</div>

<div>
<h1 className='font-bold text-lg my-
2'>{job?.title}</h1>
<p className='text-sm text-gray-
600'>{job?.description}</p>
</div>
<div className='flex items-center gap-2 mt-4'>
<Badge className={'text-blue-700 font-bold'}
variant="ghost">{job?.position} Positions</Badge>
<Badge className={'text-[#F83002] font-bold'}
variant="ghost">{job?.jobType}</Badge>
<Badge className={'text-[#7209b7] font-bold'}
variant="ghost">{job?.salary}LPA</Badge>
</div>
<div className='flex items-center gap-4 mt-4'>
P a g e 59
|
<Button onClick={()=> navigate(`/description/$
{job?._id}`)} variant="outline">Details</Button>
<Button className="bg-[#7209b7]">Save For
Later</Button>
</div>
</div>
)
}

export default Job

BrowsePage UI:-

P a g e 60
|
Code for [Link]:-

import React, { useEffect } from 'react'


import Navbar from './shared/Navbar'
import Job from './Job';
import { useDispatch, useSelector } from 'react-redux';
import { setSearchedQuery } from '@/redux/jobSlice';
import useGetAllJobs from '@/hooks/useGetAllJobs';

// const randomJobs = [1, 2,45];

const Browse = () => {


useGetAllJobs();
const {allJobs} = useSelector(store=>[Link]);
const dispatch = useDispatch();
useEffect(()=>{
return ()=>{
dispatch(setSearchedQuery(""));
}
},[])
return (
<div>
<Navbar />
<div className='max-w-7xl mx-auto my-10'>
<h1 className='font-bold text-xl my-10'>Search Results
({[Link]})</h1>
<div className='grid grid-cols-3 gap-4'>
{
[Link]((job) => {
return (
<Job key={job._id} job={job}/>
)
})
}
</div>

</div>
</div>
P a g e 61
|
)
}

export default Browse

Code for control filters in job search:-

import React, { useEffect, useState } from 'react'


import { RadioGroup, RadioGroupItem } from './ui/radio-group'
import { Label } from './ui/label'
import { useDispatch } from 'react-redux'
import { setSearchedQuery } from '@/redux/jobSlice'

const fitlerData = [
{
fitlerType: "Location",
array: ["Delhi NCR", "Bangalore", "Hyderabad", "Pune",
"Mumbai"]
},
{
fitlerType: "Industry",
array: ["Frontend Developer", "Backend Developer",
"FullStack Developer"]
},
{
fitlerType: "Salary",
array: ["0-40k", "42-1lakh", "1lakh to 5lakh"]
},
]

const FilterCard = () => {


const [selectedValue, setSelectedValue] = useState('');
const dispatch = useDispatch();
P a g e 62
|
const changeHandler = (value) => {
setSelectedValue(value);
}
useEffect(()=>{
dispatch(setSearchedQuery(selectedValue));
},[selectedValue]);
return (
<div className='w-full bg-white p-3 rounded-md'>
<h1 className='font-bold text-lg'>Filter Jobs</h1>
<hr className='mt-3' />
<RadioGroup value={selectedValue}
onValueChange={changeHandler}>
{
[Link]((data, index) => (
<div key={index}>
<h1 className='font-bold text-
lg'>{[Link]}</h1>
{
[Link]((item, idx) => {
const itemId = `id${index}-${idx}`
return (
<div key={itemId} className='flex
items-center space-x-2 my-2'>
<RadioGroupItem value={item}
id={itemId} />
<Label
htmlFor={itemId}>{item}</Label>
</div>
)
})
}
</div>
))
}
</RadioGroup>
</div>
P a g e 63
|
)
}

export default FilterCard

Code to Display individual job Posting([Link]):-

import React from 'react'


import { Button } from './ui/button'
import { Bookmark } from 'lucide-react'
import { Avatar, AvatarImage } from './ui/avatar'
import { Badge } from './ui/badge'
import { useNavigate } from 'react-router-dom'

const Job = ({job}) => {


const navigate = useNavigate();
// const jobId = "lsekdhjgdsnfvsdkjf";

const daysAgoFunction = (mongodbTime) => {


const createdAt = new Date(mongodbTime);
const currentTime = new Date();
const timeDifference = currentTime - createdAt;
return [Link](timeDifference/(1000*24*60*60));
}

return (
<div className='p-5 rounded-md shadow-xl bg-white border
border-gray-100'>
<div className='flex items-center justify-between'>
<p className='text-sm text-gray-
500'>{daysAgoFunction(job?.createdAt) === 0 ? "Today" : `$
{daysAgoFunction(job?.createdAt)} days ago`}</p>
<Button variant="outline" className="rounded-full"
size="icon"><Bookmark /></Button>
</div>

P a g e 64
|
<div className='flex items-center gap-2 my-2'>
<Button className="p-6" variant="outline"
size="icon">
<Avatar>
<AvatarImage src={job?.company?.logo} />
</Avatar>
</Button>
<div>
<h1 className='font-medium text-
lg'>{job?.company?.name}</h1>
<p className='text-sm text-gray-500'>India</p>
</div>
</div>

<div>
<h1 className='font-bold text-lg
my-2'>{job?.title}</h1>
<p className='text-sm text-gray-
600'>{job?.description}</p>
</div>
<div className='flex items-center gap-2 mt-4'>
<Badge className={'text-blue-700 font-bold'}
variant="ghost">{job?.position} Positions</Badge>
<Badge className={'text-[#F83002] font-bold'}
variant="ghost">{job?.jobType}</Badge>
<Badge className={'text-[#7209b7] font-bold'}
variant="ghost">{job?.salary}LPA</Badge>
</div>
<div className='flex items-center gap-4 mt-4'>
<Button onClick={()=> navigate(`/description/$
{job?._id}`)} variant="outline">Details</Button>
<Button className="bg-[#7209b7]">Save For
Later</Button>
</div>
</div>

P a g e 65
|
)
}

export default Job

Code for Profile Page:-

import React, { useState } from 'react'


import Navbar from './shared/Navbar'
import { Avatar, AvatarImage } from './ui/avatar'
import { Button } from './ui/button'
import { Contact, Mail, Pen } from 'lucide-react'
import { Badge } from './ui/badge'
import { Label } from './ui/label'
import AppliedJobTable from './AppliedJobTable'
import UpdateProfileDialog from './UpdateProfileDialog'
import { useSelector } from 'react-redux'
import useGetAppliedJobs from '@/hooks/useGetAppliedJobs'

// const skills = ["Html", "Css", "Javascript", "Reactjs"]


const isResume = true;
3
const Profile = () => {
useGetAppliedJobs();
const [open, setOpen] = useState(false);
const {user} = useSelector(store=>[Link]);

return (
<div>
<Navbar />
<div className='max-w-4xl mx-auto bg-white border
border-gray-200 rounded-2xl my-5 p-8'>
<div className='flex justify-between'>
<div className='flex items-center gap-4'>
<Avatar className="h-24 w-24">
<AvatarImage
P a g e 66
|
src="[Link]
[Link]" alt="profile" />
</Avatar>
<div>
<h1 className='font-medium text-
xl'>{user?.fullname}</h1>
<p>{user?.profile?.bio}</p>
</div>
</div>
<Button onClick={() => setOpen(true)}
className="text-right" variant="outline"><Pen /></Button>
</div>
<div className='my-5'>
<div className='flex items-center gap-3 my-2'>
<Mail />
<span>{user?.email}</span>
</div>
<div className='flex items-center gap-3 my-2'>
<Contact />
<span>{user?.phoneNumber}</span>
</div>
</div>
<div className='my-5'>
<h1>Skills</h1>
<div className='flex items-center gap-1'>
{
user?.profile?.[Link] !== 0 ?
user?.profile?.[Link]((item, index) => <Badge
key={index}>{item}
</Badge>)

: <span>NA</span>
}
</div>
</div>
<div className='grid w-full max-w-sm items-center
P a g e 67
|
gap-1.5'>
<Label className="text-md
font-bold">Resume</Label>
{
isResume ? <a target='blank'
href={user?.profile?.resume} className='text-blue-500 w-full
hover:underline cursor-
pointer'>{user?.profile?.resumeOriginalName}</a> :
<span>NA</span>
}
</div>
</div>
<div className='max-w-4xl mx-auto bg-white rounded-
2xl'>
<h1 className='font-bold text-lg my-5'>Applied
Jobs</h1>
{/* Applied Job Table */}
<AppliedJobTable />
</div>
<UpdateProfileDialog open={open} setOpen={setOpen}/>
</div>
)
}

export default Profile

NewJob description ui:-

Code for job description page([Link]):-

P a g e 68
|
Code for jobdescription page([Link])

import React, { useEffect, useState } from 'react'


import { Badge } from './ui/badge'
import { Button } from './ui/button'
import { useParams } from 'react-router-dom';
import axios from 'axios';
import { APPLICATION_API_END_POINT, JOB_API_END_POINT }
from '@/utils/constant';
import { setSingleJob } from '@/redux/jobSlice';
import { useDispatch, useSelector } from 'react-redux';
import { toast } from 'sonner';

const JobDescription = () => {


const {singleJob} = useSelector(store => [Link]);
const {user} = useSelector(store=>[Link]);
const isIntiallyApplied =
singleJob?.applications?.some(application =>
[Link] === user?._id) || false;
const [isApplied, setIsApplied] = useState(isIntiallyApplied);

const params = useParams();


const jobId = [Link];
const dispatch = useDispatch();

const applyJobHandler = async () => {


try {
P a g e 69
|
const res = await [Link](`$
{APPLICATION_API_END_POINT}/apply/${jobId}`,
{withCredentials:true});

if([Link]){
setIsApplied(true); // Update the local state
const updatedSingleJob = {...singleJob, applications:
[...[Link],{applicant:user?._id}]}
dispatch(setSingleJob(updatedSingleJob)); // helps us to
real time UI update
[Link]([Link]);

}
} catch (error) {
[Link](error);
[Link]([Link]);
}
}

useEffect(()=>{
const fetchSingleJob = async () => {
try {
const res = await
[Link](`${JOB_API_END_POINT}/get/${jobId}`,
{withCredentials:true});
if([Link]){
dispatch(setSingleJob([Link]));

setIsApplied([Link](application=>
[Link] === user?._id)) // Ensure the state is in sync
with
fetched data
}
} catch (error) {
[Link](error);
}
P a g e 70
|
}
fetchSingleJob();
},[jobId,dispatch, user?._id]);

return (
<div className='max-w-7xl mx-auto my-10'>
<div className='flex items-center justify-between'>
<div>
<h1 className='font-bold text-
xl'>{singleJob?.title}</h1>
<div className='flex items-center gap-2 mt-4'>
<Badge className={'text-blue-700 font-bold'}
variant="ghost">{singleJob?.postion} Positions</Badge>
<Badge className={'text-[#F83002] font-bold'}
variant="ghost">{singleJob?.jobType}</Badge>
<Badge className={'text-[#7209b7] font-bold'}
variant="ghost">{singleJob?.salary}LPA</Badge>
</div>
</div>
<Button
onClick={isApplied ? null : applyJobHandler}
disabled={isApplied}
className={`rounded-lg ${isApplied ? 'bg-gray-600
cursor-not-allowed' : 'bg-[#7209b7] hover:bg-[#5f32ad]'}`}>
{isApplied ? 'Already Applied' : 'Apply Now'}
</Button>
</div>
<h1 className='border-b-2 border-b-gray-300 font-
medium py-4'>Job Description</h1>
<div className='my-4'>
<h1 className='font-bold my-1'>Role: <span
className='pl-4 font-normal
text-gray-800'>{singleJob?.title}</span></h1>
<h1 className='font-bold my-1'>Location:
<span className='pl-4 font-normal text-gray-
800'>{singleJob?.location}</span></h1>

P a g e 71
|
<h1 className='font-bold my-1'>Description:
<span className='pl-4 font-normal text-gray-
800'>{singleJob?.description}</span></h1>
<h1 className='font-bold my-1'>Experience:
<span className='pl-4 font-normal text-gray-
800'>{singleJob?.experience} yrs</span></h1>
<h1 className='font-bold my-1'>Salary: <span
className='pl-4 font-normal text-gray-
800'>{singleJob?.salary}LPA</span></h1>
<h1 className='font-bold my-1'>Total Applicants:
<span className='pl-4 font-normal text-gray-
800'>{singleJob?.applications?.length}</span></h1>
<h1 className='font-bold my-1'>Posted Date: <span
className='pl-4 font-normal text-gray-
800'>{singleJob?.[Link]("T")[0]}</span></h1>
</div>
</div>
)
}

export default JobDescription

Code for [Link]:-

import React, { useState } from 'react'


import { Dialog, DialogContent, DialogFooter, DialogHeader,
DialogTitle } from './ui/dialog'
import { Label } from './ui/label'
import { Input } from './ui/input'
import { Button } from './ui/button'
import { Loader2 } from 'lucide-react'
import { useDispatch, useSelector } from 'react-redux'
import axios from 'axios'
import { USER_API_END_POINT } from '@/utils/constant'

P a g e 72
|
import { setUser } from '@/redux/authSlice'
import { toast } from 'sonner'

const UpdateProfileDialog = ({ open, setOpen }) => {


const [loading, setLoading] = useState(false);
const { user } = useSelector(store => [Link]);

const [input, setInput] = useState({


fullname: user?.fullname || "",
email: user?.email || "",
phoneNumber: user?.phoneNumber || "",
bio: user?.profile?.bio || "",
skills: user?.profile?.skills?.map(skill => skill) || "",
file: user?.profile?.resume || ""
});
const dispatch = useDispatch();

const changeEventHandler = (e) => {


setInput({ ...input, [[Link]]: [Link] });
}

const fileChangeHandler = (e) => {


const file = [Link]?.[0];
setInput({ ...input, file })
}

const submitHandler = async (e) => {


[Link]();
const formData = new FormData();
[Link]("fullname", [Link]);
[Link]("email", [Link]);
[Link]("phoneNumber", [Link]);
[Link]("bio", [Link]);
[Link]("skills", [Link]);
if ([Link]) {
[Link]("file", [Link]);
P a g e 73
|
}
try {
setLoading(true);
const res = await
[Link](`${USER_API_END_POINT}/profile/update`, formData, {
headers: {
'Content-Type': 'multipart/form-data'
},
withCredentials: true
});
if ([Link]) {
dispatch(setUser([Link]));
[Link]([Link]);
}
} catch (error) {
[Link](error);
[Link]([Link]);
} finally{
setLoading(false);
}
setOpen(false);
[Link](input);
}

return (
<div>
<Dialog open={open}>
<DialogContent className="sm:max-w-[425px]"
onInteractOutside={() => setOpen(false)}>
<DialogHeader>
<DialogTitle>Update Profile</DialogTitle>
</DialogHeader>
<form onSubmit={submitHandler}>
<div className='grid gap-4 py-4'>
<div className='grid grid-cols-4 items-center gap-
P a g e 74
|
4'>
<Label htmlFor="name" className="text-
right">Name</Label>
<Input
id="name"
name="name"
type="text"
value={[Link]}
onChange={changeEventHandler}
className="col-span-3"
/>
</div>
<div className='grid grid-cols-4 items-center gap-
4'>
<Label htmlFor="email" className="text-
right">Email</Label>
<Input
id="email"
name="email"
type="email"
value={[Link]}
onChange={changeEventHandler}
className="col-span-3"
/>
</div>
<div className='grid grid-cols-4 items-center gap-
4'>
<Label htmlFor="number" className="text-
right">
Number</Label>
<Input
id="number"
name="number"
value={[Link]}
onChange={changeEventHandler}
className="col-span-3"
P a g e 75
|
/>
</div>
<div className='grid grid-cols-4 items-center gap-
4'>
<Label htmlFor="bio" className="text-
right">Bio</Label>
<Input
id="bio"
name="bio"
value={[Link]}
onChange={changeEventHandler}
className="col-span-3"
/>
</div>
<div className='grid grid-cols-4 items-center gap-
4'>
<Label htmlFor="skills" className="text-
right">Skills</Label>
<Input
id="skills"
name="skills"
value={[Link]}
onChange={changeEventHandler}
className="col-span-3"
/>
</div>
<div className='grid grid-cols-4 items-center gap-
4'>
<Label htmlFor="file" className="text-
right">Resume</Label>
<Input
id="file"
name="file"
type="file"
accept="application/pdf"
onChange={fileChangeHandler}
P a g e 76
|
className="col-span-3"
/>
</div>
</div>
<DialogFooter>
{
loading ? <Button className="w-full my-4">
<Loader2 className='mr-2 h-4 w-4 animate-spin' /> Please wait
</Button> : <Button type="submit" className="w-full my-
4">Update</Button>
}
</DialogFooter>
</form>
</DialogContent>
</Dialog>
</div>
)
}

export default UpdateProfileDialog

For [Link]:-

import React from 'react'


import LatestJobCards from './LatestJobCards';
import { useSelector } from 'react-redux';

// const randomJobs = [1, 2, 3, 4, 5, 6, 7, 8];

const LatestJobs = () => {


const {allJobs} = useSelector(store=>[Link]);

return (
<div className='max-w-7xl mx-auto my-20'>
<h1 className='text-4xl font-bold'><span className='text-
P a g e 77
|
[#6A38C2]'>
Latest & Top </span> Job Openings</h1>
<div className='grid grid-cols-3 gap-4 my-5'>
{
[Link] <= 0 ? <span>No Job Available</span> :
allJobs?.slice(0,6).map((job) => <LatestJobCards key={job._id}
job={job}/>)
}
</div>
</div>
)
}

export default LatestJobs

[Link]:-

import { createBrowserRouter, RouterProvider } from 'react-router-


dom'
import Navbar from './components/shared/Navbar'
import Login from './components/auth/Login'
import Signup from './components/auth/Signup'
import Home from './components/Home'
import Jobs from './components/Jobs'
import Browse from './components/Browse'
import Profile from './components/Profile'
import JobDescription from './components/JobDescription'
import Companies from './components/admin/Companies'
import CompanyCreate from './components/admin/CompanyCreate'
import CompanySetup from './components/admin/CompanySetup'
import AdminJobs from "./components/admin/AdminJobs";
import PostJob from './components/admin/PostJob'
import Applicants from './components/admin/Applicants'
import ProtectedRoute from './components/admin/ProtectedRoute'

P a g e 78
|
const appRouter = createBrowserRouter([
{
path: '/',
element: <Home />
},
{
path: '/login',
element: <Login />
},
{
path: '/signup',
element: <Signup />
},
{
path: "/jobs",
element: <Jobs />
},
{
path: "/description/:id",
element: <JobDescription />
},
{
path: "/browse",
element: <Browse />
},
{
path: "/profile",
element: <Profile />
},
// admin ke liye yha se start hoga
{
path:"/admin/companies",
element: <ProtectedRoute><Companies/></ProtectedRoute>
},
{
path:"/admin/companies/create",
P a g e 79
|
element: <ProtectedRoute><CompanyCreate/></ProtectedRoute>
},
{
path:"/admin/companies/:id",
element:<ProtectedRoute><CompanySetup/></ProtectedRoute>
},
{
path:"/admin/jobs",
element:<ProtectedRoute><AdminJobs/></ProtectedRoute>
},
{
path:"/admin/jobs/create",
element:<ProtectedRoute><PostJob/></ProtectedRoute>
},
{
path:"/admin/jobs/:id/applicants",
element:<ProtectedRoute><Applicants/></ProtectedRoute>
},

])
function App() {

return (
<div>
<RouterProvider router={appRouter} />
</div>
)
}

export default App

[Link]:-

import React from 'react'


import ReactDOM from 'react-dom/client'
P a g e 80
|
import App from './[Link]'
import './[Link]'
import { Toaster } from './components/ui/[Link]'
import { Provider } from 'react-redux'
import store from './redux/[Link]'
import { persistStore } from 'redux-persist'
import { PersistGate } from 'redux-persist/integration/react'

const persistor = persistStore(store);

[Link]([Link]('root')).render(
<[Link]>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<App />
<Toaster />
</PersistGate>
</Provider>
</[Link]>,
)

BACKEND CODE

Backend Folder Structure:-

JobPortalBackend:-

 Controllers
 [Link]
 [Link]
 [Link]
P a g e 81
|
 [Link]

 Middlewares
 [Link]
 [Link]

 Models
 [Link]
 [Link]
 [Link]
 [Link]

 routes
 [Link]
 [Link]
 [Link]
 [Link]

 utils
 [Link]
 [Link]
 [Link]

Code for [Link]:-

import express from "express";


P a g e 82
|
import cookieParser from "cookie-parser";
import cors from "cors";
import dotenv from "dotenv";
import connectDB from "./utils/[Link]";
import userRoute from "./routes/[Link]";
import companyRoute from
"./routes/[Link]";
import jobRoute from "./routes/[Link]";
import applicationRoute from
"./routes/[Link]";

[Link]({});

const app = express();

// middleware
[Link]([Link]());
[Link]([Link]({extended:true}));
[Link](cookieParser());
const corsOptions = {
origin:'[Link]
credentials:true
}

[Link](cors(corsOptions));

const PORT = [Link] || 3000;


P a g e 83
|
// api's
[Link]("/api/v1/user", userRoute);
[Link]("/api/v1/company", companyRoute);
[Link]("/api/v1/job", jobRoute);
[Link]("/api/v1/application", applicationRoute);

[Link](PORT,()=>{
connectDB();
[Link](`Server running at port ${PORT}`);
})

[Link]

import { Application } from


"../models/[Link]";
import { Job } from "../models/[Link]";

export const applyJob = async (req, res) => {


try {
const userId = [Link];
const jobId = [Link];
if (!jobId) {
P a g e 84
|
return [Link](400).json({
message: "Job id is required.",
success: false
})
};
// check if the user has already applied for the job
const existingApplication = await
[Link]({ job: jobId, applicant: userId });

if (existingApplication) {
return [Link](400).json({
message: "You have already applied for this
jobs",
success: false
});
}

// check if the jobs exists


const job = await [Link](jobId);
if (!job) {
return [Link](404).json({
message: "Job not found",
success: false
})
}
// create a new application
const newApplication = await
P a g e 85
|
[Link]({
job:jobId,
applicant:userId,
});

[Link](newApplication._id);
await [Link]();
return [Link](201).json({
message:"Job applied successfully.",
success:true
})
} catch (error) {
[Link](error);
}
};
export const getAppliedJobs = async (req,res) => {
try {
const userId = [Link];
const application = await
[Link]({applicant:userId}).sort({createdAt:-
1}).populate({
path:'job',
options:{sort:{createdAt:-1}},
populate:{
path:'company',
options:{sort:{createdAt:-1}},
}
P a g e 86
|
});
if(!application){
return [Link](404).json({
message:"No Applications",
success:false
})
};
return [Link](200).json({
application,
success:true
})
} catch (error) {
[Link](error);
}
}
// admin dekhega kitna user ne apply kiya hai
export const getApplicants = async (req,res) => {
try {
const jobId = [Link];
const job = await [Link](jobId).populate({
path:'applications',
options:{sort:{createdAt:-1}},
populate:{
path:'applicant'
}
});
if(!job){
P a g e 87
|
return [Link](404).json({
message:'Job not found.',
success:false
})
};
return [Link](200).json({
job,
succees:true
});
} catch (error) {
[Link](error);
}
}
export const updateStatus = async (req,res) => {
try {
const {status} = [Link];
const applicationId = [Link];
if(!status){
return [Link](400).json({
message:'status is required',
success:false
})
};

// find the application by applicantion id


const application = await
[Link]({_id:applicationId});
P a g e 88
|
if(!application){
return [Link](404).json({
message:"Application not found.",
success:false
})
};

// update the status


[Link] = [Link]();
await [Link]();

return [Link](200).json({
message:"Status updated successfully.",
success:true
});

} catch (error) {
[Link](error);
}
}

[Link]:-

import { Company } from "../models/[Link]";


import getDataUri from "../utils/[Link]";
import cloudinary from "../utils/[Link]";
P a g e 89
|
export const registerCompany = async (req, res) => {
try {
const { companyName } = [Link];
if (!companyName) {
return [Link](400).json({
message: "Company name is required.",
success: false
});
}
let company = await [Link]({ name:
companyName });
if (company) {
return [Link](400).json({
message: "You can't register same company.",
success: false
})
};
company = await [Link]({
name: companyName,
userId: [Link]
});

return [Link](201).json({
message: "Company registered successfully.",
company,
success: true
P a g e 90
|
})
} catch (error) {
[Link](error);
}
}
export const getCompany = async (req, res) => {
try {
const userId = [Link]; // logged in user id
const companies = await [Link]({ userId });
if (!companies) {
return [Link](404).json({
message: "Companies not found.",
success: false
})
}
return [Link](200).json({
companies,
success:true
})
} catch (error) {
[Link](error);
}
}
// get company by id
export const getCompanyById = async (req, res) => {
try {
const companyId = [Link];
P a g e 91
|
const company = await [Link](companyId);
if (!company) {
return [Link](404).json({
message: "Company not found.",
success: false
})
}
return [Link](200).json({
company,
success: true
})
} catch (error) {
[Link](error);
}
}
export const updateCompany = async (req, res) => {
try {
const { name, description, website, location } =
[Link];

const file = [Link];


// idhar cloudinary ayega
const fileUri = getDataUri(file);
const cloudResponse = await
[Link]([Link]);
const logo = cloudResponse.secure_url;

P a g e 92
|
const updateData = { name, description, website,
location, logo };

const company = await


[Link]([Link], updateData,
{ new: true });

if (!company) {
return [Link](404).json({
message: "Company not found.",
success: false
})
}
return [Link](200).json({
message:"Company information updated.",
success:true
})

} catch (error) {
[Link](error);
}
}

[Link]:-

P a g e 93
|
import { Job } from "../models/[Link]";

// admin post krega job


export const postJob = async (req, res) => {
try {
const { title, description, requirements, salary,
location, jobType, experience, position, companyId } =
[Link];
const userId = [Link];

if (!title || !description || !requirements || !salary


|| !location || !jobType || !experience || !position || !
companyId) {
return [Link](400).json({
message: "Somethin is missing.",
success: false
})
};
const job = await [Link]({
title,
description,
requirements: [Link](","),
salary: Number(salary),
location,
jobType,
experienceLevel: experience,
position,
P a g e 94
|
company: companyId,
created_by: userId
});
return [Link](201).json({
message: "New job created successfully.",
job,
success: true
});
} catch (error) {
[Link](error);
}
}
// student k liye
export const getAllJobs = async (req, res) => {
try {
const keyword = [Link] || "";
const query = {
$or: [
{ title: { $regex: keyword, $options: "i" } },
{ description: { $regex: keyword, $options:
"i" } },
]
};
const jobs = await [Link](query).populate({
path: "company"
}).sort({ createdAt: -1 });
if (!jobs) {
P a g e 95
|
return [Link](404).json({
message: "Jobs not found.",
success: false
})
};
return [Link](200).json({
jobs,
success: true
})
} catch (error) {
[Link](error);
}
}
// student
export const getJobById = async (req, res) => {
try {
const jobId = [Link];
const job = await [Link](jobId).populate({
path:"applications"
});
if (!job) {
return [Link](404).json({
message: "Jobs not found.",
success: false
})
};

P a g e 96
|
return [Link](200).json({ job, success:
true });
} catch (error) {
[Link](error);
}
}
// admin kitne job create kra hai abhi tk
export const getAdminJobs = async (req, res) => {
try {
const adminId = [Link];
const jobs = await [Link]({ created_by: adminId
}).populate({
path:'company',
createdAt:-1
});
if (!jobs) {
return [Link](404).json({
message: "Jobs not found.",
success: false
})
};
return [Link](200).json({
jobs,
success: true
})
} catch (error) {
[Link](error);
P a g e 97
|
}
}

[Link]:-

import { User } from "../models/[Link]";


import bcrypt from "bcryptjs";
import jwt from "jsonwebtoken";
import getDataUri from "../utils/[Link]";
import cloudinary from "../utils/[Link]";

export const register = async (req, res) => {


try {
const { fullname, email, phoneNumber, password,
role } = [Link];

if (!fullname || !email || !phoneNumber || !password || !


role) {
return [Link](400).json({
message: "Something is missing",
success: false
});
}

// ✅ Phone number format validation


P a g e 98
|
const phoneRegex = /^[0-9]{10}$/;
if (![Link](phoneNumber)) {
return [Link](400).json({
message: "Invalid phone number. Must be exactly
10 digits.",
success: false,
});
}

// File and cloudinary upload


const file = [Link];
const fileUri = getDataUri(file);
const cloudResponse = await
[Link]([Link]);

// Check if user already exists


const user = await [Link]({ email });
if (user) {
return [Link](400).json({
message: 'User already exist with this email.',
success: false,
});
}

// Hash the password


const hashedPassword = await [Link](password,
10);
P a g e 99
|
// Create user
await [Link]({
fullname,
email,
phoneNumber,
password: hashedPassword,
role,
profile: {
profilePhoto: cloudResponse.secure_url,
}
});

return [Link](201).json({
message: "Account created successfully.",
success: true
});
} catch (error) {
[Link](error);
}
};

export const login = async (req, res) => {


try {
const { email, password, role } = [Link];

if (!email || !password || !role) {


Page
100 |
return [Link](400).json({
message: "Something is missing",
success: false
});
};
let user = await [Link]({ email });
if (!user) {
return [Link](400).json({
message: "Incorrect email or password.",
success: false,
})
}
const isPasswordMatch = await
[Link](password, [Link]);
if (!isPasswordMatch) {
return [Link](400).json({
message: "Incorrect email or password.",
success: false,
})
};
// check role is correct or not
if (role !== [Link]) {
return [Link](400).json({
message: "Account doesn't exist with current
role.",
success: false
})
Page
101 |
};

const tokenData = {
userId: user._id
}
const token = await [Link](tokenData,
[Link].SECRET_KEY, { expiresIn: '1d' });

user = {
_id: user._id,
fullname: [Link],
email: [Link],
phoneNumber: [Link],
role: [Link],
profile: [Link]
}

return [Link](200).cookie("token", token,


{ maxAge: 1 * 24 * 60 * 60 * 1000, httpsOnly: true,
sameSite: 'strict' }).json({
message: `Welcome back ${[Link]}`,
user,
success: true
})
} catch (error) {
[Link](error);
}
Page
102 |
}
export const logout = async (req, res) => {
try {
return [Link](200).cookie("token", "", { maxAge:
0 }).json({
message: "Logged out successfully.",
success: true
})
} catch (error) {
[Link](error);
}
}
export const updateProfile = async (req, res) => {
try {
const { fullname, email, phoneNumber, bio, skills } =
[Link];

const file = [Link];


// cloudinary ayega idhar
const fileUri = getDataUri(file);
const cloudResponse = await
[Link]([Link]);

let skillsArray;
if(skills){
skillsArray = [Link](",");
Page
103 |
}
const userId = [Link]; // middleware authentication
let user = await [Link](userId);

if (!user) {
return [Link](400).json({
message: "User not found.",
success: false
})
}
// updating data
if(fullname) [Link] = fullname
if(email) [Link] = email
if(phoneNumber) [Link] = phoneNumber
if(bio) [Link] = bio
if(skills) [Link] = skillsArray

// resume comes later here...


if(cloudResponse){
[Link] = cloudResponse.secure_url //
save the cloudinary url
[Link] =
[Link] // Save the original file name
}

await [Link]();

Page
104 |
user = {
_id: user._id,
fullname: [Link],
email: [Link],
phoneNumber: [Link],
role: [Link],
profile: [Link]
}

return [Link](200).json({
message:"Profile updated successfully.",
user,
success:true
})
} catch (error) {
[Link](error);
}
}

MIDDLEWARES:-

[Link]:-

import jwt from "jsonwebtoken";

Page
105 |
const isAuthenticated = async (req, res, next) => {
try {
const token = [Link];
if (!token) {
return [Link](401).json({
message: "User not authenticated",
success: false,
})
}
const decode = await [Link](token,
[Link].SECRET_KEY);
if(!decode){
return [Link](401).json({
message:"Invalid token",
success:false
})
};
[Link] = [Link];
next();
} catch (error) {
[Link](error);
}
}
export default isAuthenticated;

[Link]:-
Page
106 |
import multer from "multer";

const storage = [Link]();


export const singleUpload =
multer({storage}).single("file");

Models:-

[Link]:-

import mongoose from "mongoose";

const applicationSchema = new [Link]({


job:{
type:[Link],
ref:'Job',
required:true
},
applicant:{
type:[Link],
ref:'User',
required:true
Page
107 |
},
status:{
type:String,
enum:['pending', 'accepted', 'rejected'],
default:'pending'
}
},{timestamps:true});
export const Application = [Link]("Application",
applicationSchema);

[Link]:-

import mongoose from "mongoose";

const companySchema = new [Link]({


name:{
type:String,
required:true,
unique:true
},
description:{
type:String,
},
website:{
type:String
Page
108 |
},
location:{
type:String
},
logo:{
type:String // URL to company logo
},
userId:{
type:[Link],
ref:'User',
required:true
}
},{timestamps:true})
export const Company = [Link]("Company",
companySchema);

[Link]:-

import mongoose from "mongoose";

const jobSchema = new [Link]({


title: {
type: String,
required: true
},
description: {
type: String,
Page
109 |
required: true
},
requirements: [{
type: String
}],
salary: {
type: Number,
required: true
},
experienceLevel:{
type:Number,
required:true,
},
location: {
type: String,
required: true
},
jobType: {
type: String,
required: true
},
position: {
type: Number,
required: true
},
company: {
type: [Link],
Page
110 |
ref: 'Company',
required: true
},
created_by: {
type: [Link],
ref: 'User',
required: true
},
applications: [
{
type: [Link],
ref: 'Application',
}
]
},{timestamps:true});
export const Job = [Link]("Job", jobSchema);

[Link]:-

import mongoose from "mongoose";

const userSchema = new [Link]({


fullname: {
type: String,
required: true
},
email: {
Page
111 |
type: String,
required: true,
unique: true
},
phoneNumber: {
type: Number,
required: true
},
password:{
type:String,
required:true,
},
role:{
type:String,
enum:['student','recruiter'],
required:true
},
profile:{
bio:{type:String},
skills:[{type:String}],
resume:{type:String}, // URL to resume file
resumeOriginalName:{type:String},
company:{type:[Link],
ref:'Company'},
profilePhoto:{
type:String,
default:""
Page
112 |
}
},
},{timestamps:true});
export const User = [Link]('User', userSchema);

Routes:-

[Link]:-

import express from "express";


import isAuthenticated from
"../middlewares/[Link]";
import { applyJob, getApplicants, getAppliedJobs,
updateStatus } from
"../controllers/[Link]";

const router = [Link]();

[Link]("/apply/:id").get(isAuthenticated, applyJob);
[Link]("/get").get(isAuthenticated, getAppliedJobs);
[Link]("/:id/applicants").get(isAuthenticated,
getApplicants);
Page
113 |
[Link]("/status/:id/update").post(isAuthenticated,
updateStatus);

export default router;

Page
114 |
[Link]:-

import express from "express";


import isAuthenticated from
"../middlewares/[Link]";
import { getCompany, getCompanyById, registerCompany,
updateCompany } from
"../controllers/[Link]";
import { singleUpload } from "../middlewares/[Link]";

const router = [Link]();

[Link]("/
register").post(isAuthenticated,registerCompany);
[Link]("/get").get(isAuthenticated,getCompany);
[Link]("/
get/:id").get(isAuthenticated,getCompanyById);
[Link]("/
update/:id").put(isAuthenticated,singleUpload,
updateCompany);

export default router;

Page
115 |
[Link]:-

import express from "express";


import isAuthenticated from
"../middlewares/[Link]";
import { getAdminJobs, getAllJobs, getJobById, postJob }
from "../controllers/[Link]";

const router = [Link]();

[Link]("/post").post(isAuthenticated, postJob);
[Link]("/get").get(isAuthenticated, getAllJobs);
[Link]("/getadminjobs").get(isAuthenticated,
getAdminJobs);
[Link]("/get/:id").get(isAuthenticated, getJobById);

export default router;

Page
116 |
[Link]:-

import express from "express";


import { login, logout, register, updateProfile } from
"../controllers/[Link]";
import isAuthenticated from
"../middlewares/[Link]";
import { singleUpload } from "../middlewares/[Link]";

const router = [Link]();

[Link]("/register").post(singleUpload,register);
[Link]("/login").post(login);
[Link]("/logout").get(logout);
[Link]("/profile/
update").post(isAuthenticated,singleUpload,updateProfile);

export default router;

Page
117 |
utils:-

[Link]:-

import {v2 as cloudinary} from "cloudinary";


import dotenv from "dotenv";
[Link]();

[Link]({
cloud_name:[Link].CLOUD_NAME,
api_key:[Link].API_KEY,
api_secret:[Link].API_SECRET
});
export default cloudinary;

Page
118 |
[Link]:-

import DataUriParser from "datauri/[Link]"

import path from "path";

const getDataUri = (file) => {


const parser = new DataUriParser();
const extName =
[Link]([Link]).toString();
return [Link](extName, [Link]);
}

export default getDataUri;

[Link]:-

import mongoose from "mongoose";

const connectDB = async () => {


try {
await [Link]([Link].MONGO_URI);
[Link]('mongodb connected successfully');
Page
119 |
} catch (error) {
[Link](error);
}
}
export default connectDB

Page
120 |
BIBLIOGRAPHY

Websites & Online Documentation

1. [Link] Documentation – Official guide to [Link]


2. [Link] Documentation – [Link] official reference
3. [Link] Documentation – Express web framework for [Link]
4. MongoDB Documentation – NoSQL database used for backend
5. Mongoose ODM – MongoDB object modeling for [Link]
6. JWT Documentation – For user authentication
7. MDN Web Docs – In-depth frontend and JavaScript resources

Tools & Platforms Used

 GitHub – Version control and project repository


 Postman – API testing
 VS Code – Code editor used for development

P a g e 121
|

You might also like