DEPARTMENT - INFORMATION TECHNOLOGY
SECTION - A2
YEAR - UG3
DATE - 06/04/2026
TEAM DETAILS :
- Mayukh Sinha - Roll No: 002311001038
- Ankita Dhara - Roll No: 002311001034
- Rounak Mukhopadhyay - Roll No: 002311001040
This project is a full-stack Job Portal application where:
- Recruiters can register/login and post jobs.
- Seekers can register/login, browse jobs, and apply for jobs.
- Both roles get role-specific dashboards.
- React 19
- Vite
- React Router DOM
- Axios
- React Icons
- CSS
- ESLint
- Node.js
- Express.js
- Mongoose
- JWT (jsonwebtoken)
- bcryptjs
- CORS
- dotenv
- Nodemon (development)
- MongoDB
web_application/
backend/
middleware/
models/
routes/
server.js
package.json
frontend/
src/
components/
context/
pages/
App.jsx
main.jsx
package.json
README.md
- User registers via
/api/auth/registerwithname,email,password, androle(seekerorrecruiter). - Password is hashed with
bcryptjsbefore storing in MongoDB. - User logs in via
/api/auth/login. - Backend returns JWT token and user profile data.
- Frontend stores user session in
localStorage. - Axios interceptor automatically attaches
Authorization: Bearer <token>for protected requests.
- Middleware validates token (
protect). - Role guards (
recruiterOnly,seekerOnly) authorize access. - Frontend
PrivateRoutechecks login state and role before rendering dashboard routes.
- Recruiter creates a new job through protected API
POST /api/jobs. - Required fields are validated (
title,company,location,description). - Recruiter can fetch own jobs via
GET /api/jobs/myjobs. - Public job list is available via
GET /api/jobs.
- Seeker applies for a job via
POST /api/applications/:jobId. - Backend prevents duplicate applications for the same job and seeker.
- Seeker checks submitted applications via
GET /api/applications/myapplications. - Recruiter reviews job applications via
GET /api/applications/job/:jobId.
POST /api/auth/registerPOST /api/auth/login
GET /api/jobsGET /api/jobs/myjobs(protected, recruiter only)POST /api/jobs(protected, recruiter only)
POST /api/applications/:jobId(protected, seeker only)GET /api/applications/myapplications(protected, seeker only)GET /api/applications/job/:jobId(protected, recruiter only)
Collection: users
| Field | Type | Constraints |
|---|---|---|
name |
String | Required |
email |
String | Required, Unique |
password |
String | Required (hashed) |
role |
String | Required, enum: seeker, recruiter |
createdAt |
Date | Auto (timestamps) |
updatedAt |
Date | Auto (timestamps) |
Collection: jobs
| Field | Type | Constraints |
|---|---|---|
title |
String | Required |
company |
String | Required |
location |
String | Required |
description |
String | Required |
salary |
String | Optional |
skills |
Array of String | Default: [] |
recruiter |
ObjectId (User) |
Required, reference |
createdAt |
Date | Auto (timestamps) |
updatedAt |
Date | Auto (timestamps) |
Collection: applications
| Field | Type | Constraints |
|---|---|---|
job |
ObjectId (Job) |
Required, reference |
applicant |
ObjectId (User) |
Required, reference |
coverLetter |
String | Required |
skills |
Array of String | Default: [] |
status |
String | enum: pending, reviewed, accepted, rejected; default: pending |
createdAt |
Date | Auto (timestamps) |
updatedAt |
Date | Auto (timestamps) |
/-> Home page/login-> Login page/register-> Register page/seeker-> Seeker dashboard (private, seeker role)/recruiter-> Recruiter dashboard (private, recruiter role)
cd backend
npm install
npm run devcd frontend
npm install
npm run devThis repository is now prepared for deployment as two separate Vercel projects:
frontendproject (React + Vite UI)backendproject (Express API)
- Go to Vercel dashboard and click Add New Project.
- Import this repository.
- Set Root Directory to
backend. - Framework preset can stay as Other.
- Add environment variables in Vercel Project Settings:
MONGO_URI= your MongoDB connection stringJWT_SECRET= a strong secret keyFRONTEND_URL= your frontend Vercel URL (for CORS), for examplehttps://your-frontend.vercel.app
- Deploy and copy your backend URL, for example:
https://your-backend.vercel.app
- Verify backend health:
https://your-backend.vercel.app/api/health
- Create another Vercel project from the same repository.
- Set Root Directory to
frontend. - Framework preset should auto-detect as Vite.
- Add environment variable:
VITE_API_URL=https://your-backend.vercel.app/api
- Deploy.
After frontend deployment, confirm backend env variable:
FRONTEND_URL=https://your-frontend.vercel.app
Then redeploy backend if required.
You can also deploy from terminal:
# Backend project
cd backend
vercel
# Frontend project
cd ../frontend
vercel- Frontend SPA routing fallback is handled via
frontend/vercel.json. - Backend routing to Express handler is handled via
backend/vercel.json. - Keep local
.envfiles out of git and configure production secrets only in Vercel environment variables.